Я исправил страницу с корзиной покупок в woocommerce / wordpress, и все умные кнопки работают. Однако я получаю постоянные ошибки в журнале Apache:
get_cart был вызван неправильно. Получить корзину нельзя до начала действия wp_loaded. Обратный след: require_once ('wp-load.php'), require_once ('wp-config.php'), require_once ('wp-settings.php'), do_action ('init'), WP_Hook-> do_action, WP_Hook->apply_filters, Objectiv \ Plugins \ Checkout \ Compatibility \ Base-> compat_init, Objectiv \ Plugins \ Checkout \ Compatibility \ Gateways \ AmazonPay-> run_immediately, Objectiv \ Plugins \ Checkout \ Совместимость \ Шлюзы \ AmazonPay-> get_amazon_gateway, WooCommerceWooCommerce-> payment_gatewa ....
Когда я захожу в plugins / paypal-for-woocommerce / paypal-for-woocommerce.php и изменяю строку:
add_action( 'plugins_loaded', array($this, 'init'))
На:
add_action( 'wp_loaded', array($this, 'init'));
Он очищает все ошибки Apache, и я могу работать без этой ошибки каждую секунду, но тогда моя интеллектуальная кнопка PayPal Express Checkout отключена?
public function __construct()
{
add_action('init', array($this, 'load_plugin_textdomain'));
include_once plugin_dir_path(__FILE__) . 'angelleye-includes/angelleye-payment-logger.php';
AngellEYE_PFW_Payment_Logger::instance();
include_once plugin_dir_path(__FILE__) . 'angelleye-includes/angelleye-utility.php';
if( is_admin() ) {
include_once plugin_dir_path(__FILE__) . 'angelleye-includes/angelleye-admin-order-payment-process.php';
$admin_order_payment = new AngellEYE_Admin_Order_Payment_Process();
}
$plugin_admin = new AngellEYE_Utility($this->plugin_slug, VERSION_PFW);
add_action( 'plugins_loaded', array($this, 'init'));
//add_action( 'wp_loaded', array($this, 'init'));
register_activation_hook( __FILE__, array($this, 'activate_paypal_for_woocommerce' ));
register_deactivation_hook( __FILE__,array($this,'deactivate_paypal_for_woocommerce' ));
add_action( 'admin_notices', array($this, 'admin_notices') );
add_action( 'admin_init', array($this, 'set_ignore_tag'));
add_filter( 'woocommerce_product_title' , array($this, 'woocommerce_product_title') );
add_action( 'woocommerce_sections_checkout', array( $this, 'donate_message' ), 11 );
add_action( 'parse_request', array($this, 'wc_gateway_payment_token_api_parser') , 99);
add_action('wp_ajax_angelleye_dismiss_notice', array($this, 'angelleye_dismiss_notice'), 10);
$basename = plugin_basename(__FILE__);
$prefix = is_network_admin() ? 'network_admin_' : '';
add_filter("{$prefix}plugin_action_links_$basename",array($this,'plugin_action_links'),10,4);
add_action( 'admin_enqueue_scripts', array( $this , 'admin_scripts' ) );
add_action( 'admin_print_styles', array( $this , 'admin_styles' ) );
add_action( 'admin_menu', array( $this, 'angelleye_admin_menu_own' ) );
add_action( 'product_type_options', array( $this, 'angelleye_product_type_options_own' ), 10, 1);
add_action( 'woocommerce_process_product_meta', array( $this, 'angelleye_woocommerce_process_product_meta_own' ), 10, 1 );
add_filter( 'woocommerce_add_to_cart_sold_individually_quantity', array( $this, 'angelleye_woocommerce_add_to_cart_sold_individually_quantity' ), 10, 5 );
add_action('admin_enqueue_scripts', array( $this, 'angelleye_woocommerce_admin_enqueue_scripts' ) );
add_action( 'wp_ajax_pfw_ed_shipping_bulk_tool', array( $this, 'angelleye_woocommerce_pfw_ed_shipping_bulk_tool' ) );
add_action('http_api_curl', array($this, 'http_api_curl_ec_add_curl_parameter'), 10, 3);
add_filter( "pre_option_woocommerce_paypal_express_settings", array($this, 'angelleye_express_checkout_decrypt_gateway_api'), 10, 1);
add_filter( "pre_option_woocommerce_paypal_advanced_settings", array($this, 'angelleye_paypal_advanced_decrypt_gateway_api'), 10, 1);
add_filter( "pre_option_woocommerce_paypal_credit_card_rest_settings", array($this, 'angelleye_paypal_credit_card_rest_decrypt_gateway_api'), 10, 1);
add_filter( "pre_option_woocommerce_paypal_pro_settings", array($this, 'angelleye_paypal_pro_decrypt_gateway_api'), 10, 1);
add_filter( "pre_option_woocommerce_paypal_pro_payflow_settings", array($this, 'angelleye_paypal_pro_payflow_decrypt_gateway_api'), 10, 1);
add_filter( "pre_option_woocommerce_braintree_settings", array($this, 'angelleye_braintree_decrypt_gateway_api'), 10, 1);
add_filter( "pre_option_woocommerce_enable_guest_checkout", array($this, 'angelleye_express_checkout_woocommerce_enable_guest_checkout'), 10, 1);
add_filter( 'woocommerce_get_checkout_order_received_url', array($this, 'angelleye_woocommerce_get_checkout_order_received_url'), 10, 2);
add_action('wp_ajax_wp_paypal_paypal_marketing_solutions_express_checkout_save', array($this, 'wp_paypal_paypal_marketing_solutions_express_checkout_save'));
add_action('woocommerce_product_data_tabs', array( $this, 'angelleye_paypal_for_woo_woocommerce_product_data_tabs' ), 99, 1);
add_action('woocommerce_product_data_panels', array( $this, 'angelleye_paypal_for_woo_product_date_panels' ));
add_action('woocommerce_process_product_meta', array( $this, 'angelleye_paypal_for_woo_product_process_product_meta' ));
add_action('angelleye_paypal_for_woocommerce_multi_account_api_paypal_payflow', array( $this, 'angelleye_paypal_for_woo_product_level_payment_action' ), 10, 3);
add_action( 'wp_head', array( $this, 'paypal_for_woo_head_mark' ), 1 );
add_action( 'admin_footer', array($this, 'angelleye_add_deactivation_form'));
add_action( 'wp_ajax_angelleye_send_deactivation', array($this, 'angelleye_handle_plugin_deactivation_request'));
$this->customer_id;
}
Я ожидаю, что нетесть забитый журнал ошибок apache и для правильной работы умной кнопки PayPal.