• Resolved keithhill1968

    (@keithhill1968)


    hi Guys, I am suddenly seeing logs size increasing very quickly with the error below , there doesn’t seem to need to be any visit to a particular page. check the firewall and not too many blocks .

    Everything looks to be running ok, except the below notice was present 25000 times. Any guidance on what could possible be causing this would be greatly appreciated

    Thanks
    Keith

    [26-Mar-2021 02:07:26 UTC] get_cart was called incorrectly. Get cart should not be called before the wp_loaded action. Backtrace: require('wp-blog-header.php'), 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, WC_Braintree->maybe_init_apple_pay, SkyVerge\WooCommerce\PluginFramework\v5_10_5\SV_WC_Payment_Gateway_Plugin->maybe_init_apple_pay, WC_Braintree->build_apple_pay_instance, SkyVerge\WooCommerce\PluginFramework\v5_10_5\SV_WC_Payment_Gateway_Apple_Pay->__construct, SkyVerge\WooCommerce\PluginFramework\v5_10_5\Payment_Gateway\External_Checkout\External_Checkout->__construct, SkyVerge\WooCommerce\PluginFramework\v5_10_5\Payment_Gateway\External_Checkout\External_Checkout->init, SkyVerge\WooCommerce\PluginFramework\v5_10_5\Payment_Gateway\External_Checkout\External_Checkout->get_processing_gateway, SkyVerge\WooCommerce\PluginFramework\v5_10_5\Payment_Gateway\External_Checkout\External_Checkout->get_supporting_gateways, WC_Payment_Gateways->get_available_payment_gateways, apply_filters('woocommerce_available_payment_gateways'), WP_Hook->apply_filters, WC_Gateway_Afterpay->check_cart_within_limits, WC_Cart->get_cart, WC_Cart_Session->get_cart_from_session, WC_Cart->calculate_totals, WC_Cart->is_empty, WC_Cart->get_cart, wc_doing_it_wrong. This message was added in version 2.3.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Simon

    (@simonskyverge)

    Hi @keithhill1968,

    Thanks for reaching out and thanks so much for sharing that log snippet, that’s very useful!

    It looks like our Braintree Gateway is checking if Apple Pay should be initiated on ‘init’, which eventually works it’s way through the code to the External_Checkout code. Here it’s confirming what payment gateways are available by calling ‘woocommerce_available_payment_gateways‘ which the WC_Gateway_Afterpay then seems to jump onto.

    Here, the Afterpay gateway looks to be calling the get_cart() function which is generating the error.

    To confirm I’m reading this correctly, can you let me know if you’re also running the Afterpay gateway on your site? If so, has this only occurred since upgrading either Braintree or have you also upgraded Afterpay recently too?

    Cheers!

    Simon.

    Thread Starter keithhill1968

    (@keithhill1968)

    Hi Simon, thanks for the response,
    Yes I am running the braintree payment gateway, but I don’t have apple pay enabled. I have the afterpay gateway running, and seem to recall it was recently updated, honestly don’t recall when though. within the last few weeks I think

    Current versions :
    wordpress is running 5.7

    woocommerce is version 5.1.0
    BrainTree for woocommerce is version 2.5.0
    Afterpay gateway is 2.2.2

    Simon

    (@simonskyverge)

    Hey @keithhill1968,

    Thanks for confirming! Even without Apple Pay enabled, these functions would still be run by our plugin, as they check to see if Apple Pay should be added as an available gateway (in case it was enabled!).

    Thanks for confirming you are running AfterPay on your site and that it was recently updated. I would recommend reaching out to their support team and sharing the stack trace you’ve shared with us. Hopefully, they’ll be able to add some preventative code to stop the error from being logged!

    I’m sorry I can’t help directly, though I hope this was useful nonetheless. Is there anything else I can help out with today?

    Cheers!

    Simon.

    Thread Starter keithhill1968

    (@keithhill1968)

    Hi Simon, I’ll chase Afterpay

    Appreciate your support

    thanks
    Keith

    Simon

    (@simonskyverge)

    Hey @keithhill1968,

    Great stuff! Thanks for keeping me in the loop. If there’s anything else I can help with, or if they have any suggestions for us, please don’t hesitate to reach out!

    Cheers,

    Simon.

    Steve

    (@skyvergesteve)

    Hey @keithhill1968 ,

    It has been a long time since we heard from you, so I’m going to mark this topic as resolved.

    If you’re still experiencing issues please take a look at our documentation for more information and create a new thread if you have further questions.

    Cheers,

    Steve

    Sorry, but I have the same error. No apple pay running on the site

    [06-Apr-2021 17:46:38 UTC] get_cart was called incorrectly. Get basket should not be called before the wp_loaded action. Backtrace: require('wp-blog-header.php'), 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, WC_Braintree->maybe_init_apple_pay, SkyVerge\WooCommerce\PluginFramework\v5_10_5\SV_WC_Payment_Gateway_Plugin->maybe_init_apple_pay, WC_Braintree->build_apple_pay_instance, SkyVerge\WooCommerce\PluginFramework\v5_10_5\SV_WC_Payment_Gateway_Apple_Pay->__construct, SkyVerge\WooCommerce\PluginFramework\v5_10_5\SV_WC_Payment_Gateway_Apple_Pay->is_available, SkyVerge\WooCommerce\PluginFramework\v5_10_5\Payment_Gateway\External_Checkout\External_Checkout->is_available, SkyVerge\WooCommerce\PluginFramework\v5_10_5\SV_WC_Payment_Gateway_Apple_Pay->get_accepted_currencies, SkyVerge\WooCommerce\PluginFramework\v5_10_5\Payment_Gateway\External_Checkout\External_Checkout->get_processing_gateway, SkyVerge\WooCommerce\PluginFramework\v5_10_5\Payment_Gateway\External_Checkout\External_Checkout->get_supporting_gateways, WC_Payment_Gateways->get_available_payment_gateways, apply_filters('woocommerce_available_payment_gateways'), WP_Hook->apply_filters, Alg_WC_PGPP_Core->filter_available_payment_gateways_per_category, Alg_WC_PGPP_Core->do_disable_gateway_by_terms, WC_Cart->get_cart, wc_doing_it_wrong. This message was added in version 2.3.

    Steve

    (@skyvergesteve)

    Hey @keithhill1968 ,

    Thanks for the update on this, sorry to hear that the issue persists. Following up on Simon’s last post, did you get any additional information from AfterPay on this?

    Cheers,

    Steve
    SkyVerge

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘recurring message in php_errorlog’ is closed to new replies.