Support » Plugin: Afterpay Gateway for WooCommerce » PHP Fatal error: Uncaught Error: Call to a member function get_cart()

  • Resolved keithhill1968

    (@keithhill1968)


    Hi there, I have started seeing errors in my PHP log
    I am hoping you will be able to advise how best to remediate
    – Thanks Keith

    ===================

    [03-Sep-2020 21:08:04 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_cart() on null in /home/clairehi/public_html/wp-content/plugins/afterpay-gateway-for-woocommerce/class/WC_Gateway_Afterpay.php:294
    Stack trace:
    #0 /home/clairehi/public_html/wp-includes/class-wp-hook.php(287): WC_Gateway_Afterpay->check_cart_within_limits(Array)
    #1 /home/clairehi/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
    #2 /home/clairehi/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(160): apply_filters(‘woocommerce_ava…’, Array)
    #3 /home/clairehi/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/WC_Admin_Notes_Onboarding_Payments.php(36): WC_Payment_Gateways->get_available_payment_gateways()
    #4 /home/clairehi/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/NoteTraits.php(74): Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Onboarding_Payments::get_note()
    #5 /home/clairehi/public_html/wp-content/plugins/woocommerce/packages/wooc in /home/clairehi/public_html/wp-content/plugins/afterpay-gateway-for-woocommerce/class/WC_Gateway_Afterpay.php on line 294
    [04-Sep-2020 00:13:40 UTC] PHP Warning: Error while sending QUERY packet. PID=50254 in /home/clairehi/public_html/wp-includes/wp-db.php on line 2033
    [04-Sep-2020 21:03:31 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_cart() on null in /home/clairehi/public_html/wp-content/plugins/afterpay-gateway-for-woocommerce/class/WC_Gateway_Afterpay.php:294
    Stack trace:
    #0 /home/clairehi/public_html/wp-includes/class-wp-hook.php(287): WC_Gateway_Afterpay->check_cart_within_limits(Array)
    #1 /home/clairehi/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
    #2 /home/clairehi/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(160): apply_filters(‘woocommerce_ava…’, Array)
    #3 /home/clairehi/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/WC_Admin_Notes_Onboarding_Payments.php(36): WC_Payment_Gateways->get_available_payment_gateways()
    #4 /home/clairehi/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/NoteTraits.php(74): Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Onboarding_Payments::get_note()
    #5 /home/clairehi/public_html/wp-content/plugins/woocommerce/packages/wooc in /home/clairehi/public_html/wp-content/plugins/afterpay-gateway-for-woocommerce/class/WC_Gateway_Afterpay.php on line 294
    [05-Sep-2020 00:16:43 UTC] PHP Warning: Error while sending QUERY packet. PID=41096 in /home/clairehi/public_html/wp-includes/wp-db.php on line 2033
    [05-Sep-2020 21:16:35 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_cart() on null in /home/clairehi/public_html/wp-content/plugins/afterpay-gateway-for-woocommerce/class/WC_Gateway_Afterpay.php:294
    Stack trace:
    #0 /home/clairehi/public_html/wp-includes/class-wp-hook.php(287): WC_Gateway_Afterpay->check_cart_within_limits(Array)
    #1 /home/clairehi/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
    #2 /home/clairehi/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(160): apply_filters(‘woocommerce_ava…’, Array)
    #3 /home/clairehi/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/WC_Admin_Notes_Onboarding_Payments.php(36): WC_Payment_Gateways->get_available_payment_gateways()
    #4 /home/clairehi/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/NoteTraits.php(74): Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Onboarding_Payments::get_note()
    #5 /home/clairehi/public_html/wp-content/plugins/woocommerce/packages/wooc in /home/clairehi/public_html/wp-content/plugins/afterpay-gateway-for-woocommerce/class/WC_Gateway_Afterpay.php on line 294

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter keithhill1968

    (@keithhill1968)

    I should have included some additional info

    wordpress 5.5.1
    woocommerce 4.4.1
    afterpay 2.2.0

    php version is 7.3

    site has memcache enabled

    as of 8/9/20 7:30am (AEST) i am still seeing this fatal error appear in the logs.

    thanks

    Plugin Author Afterpay

    (@afterpayit)

    Hi @keithhill1968,

    Thank you for your message.

    Our engineers have been trying to reproduce this error, but with no success.

    While we are still investigating, could you please submit a dedicated support request from the Afterpay Help Centre here:
    https://help.afterpay.com/hc/en-au/requests/new?ticket_form_id=193406

    A team member will then reach out to you within 1 business day.

    Thank you.

    Hi Afterpay and @keithhill1968 I am seeing the same errors:

    WP 5.5.1
    Woo 4.4.1
    AP 2.2.0
    PHP 7.4

    [07-Sep-2020 12:42:56 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_cart() on null in /home/fc3j9zd7ue7r/public_html/wp-content/plugins/afterpay-gateway-for-woocommerce/class/WC_Gateway_Afterpay.php:294
    Stack trace:
    #0 /home/fc3j9zd7ue7r/public_html/wp-includes/class-wp-hook.php(287): WC_Gateway_Afterpay->check_cart_within_limits(Array)
    #1 /home/fc3j9zd7ue7r/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
    #2 /home/fc3j9zd7ue7r/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(160): apply_filters(‘woocommerce_ava…’, Array)
    #3 /home/fc3j9zd7ue7r/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/WC_Admin_Notes_Onboarding_Payments.php(36): WC_Payment_Gateways->get_available_payment_gateways()
    #4 /home/fc3j9zd7ue7r/public_html/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/NoteTraits.php(74): Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Onboarding_Payments::get_note()
    #5 /home/fc3j9zd7ue7r/public_html/wp-content/plugi in /home/fc3j9zd7ue7r/public_html/wp-content/plugins/afterpay-gateway-for-woocommerce/class/WC_Gateway_Afterpay.php on line 294

    Just to add to this, mine does not get this error.

    The only difference is that I am running PHP 7.2 because it’s not compatible with a lot of plugins used. I had to downgrade from 7.3 -> 7.2 so that my site worked properly.

    WP 5.5.1
    Woo 4.4.1
    AP 2.2.0
    PHP 7.2

    Plugin Author Afterpay

    (@afterpayit)

    Hi @chvtech and @wilfredswholesale,

    Thank you both for providing more information.

    The team is working on a solution, which will soon undergo testing. The fix will be released as soon as possible.

    We will keep you all posted.

    Thank you.

    Plugin Author Afterpay

    (@afterpayit)

    Hi @keithhill1968 and @chvtech,

    Thank you for your patience.

    The issue has been addressed in the latest release v2.2.1. Please update the Afterpay plugin.

    Thank you.

    Thread Starter keithhill1968

    (@keithhill1968)

    Thanks Guys, Much appreciated

    Thanks AP Team, you rock!! @afterpayit

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP Fatal error: Uncaught Error: Call to a member function get_cart()’ is closed to new replies.