• My Sentry logged the following error message today:

    Error: Call to a member function get_cart_contents_total() on null
    #10 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(1127): WooCommerce\PayPalCommerce\Button\Assets\SmartButton::is_cart_price_total_zero
    #9 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(378): WooCommerce\PayPalCommerce\Button\Assets\SmartButton::render_button_wrapper_registrar
    #8 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(195): WooCommerce\PayPalCommerce\Button\Assets\SmartButton::render_wrapper
    #7 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(56): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button\{closure}
    #6 /wp-includes/class-wp-hook.php(307): WP_Hook::apply_filters
    #5 /wp-includes/class-wp-hook.php(331): WP_Hook::do_action
    #4 /wp-includes/plugin.php(522): do_action_ref_array
    #3 /wp-includes/class-wp.php(771): WP::main
    #2 /wp-includes/functions.php(1310): wp
    #1 /wp-blog-header.php(16): require
    #0 /index.php(17): null

    Would be great to see this fixed in the next version. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @kittmedia,

    Yes, this should be resolved with the next update.
    In the meantime, a downgrade to the previous version 1.7.0 should prevent the error in case it causes any issues for you.

    Kind regards,
    Niklas

    2022-04-16T11:52:59+00:00 CRITICAL Uncaught Error: Call to a member function get_cart_contents_total() on null in /home/easternwatersports/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:1127
    Stack trace:
    #0 /home/easternwatersports/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(378): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->is_cart_price_total_zero()
    #1 /home/easternwatersports/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(195): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_button_wrapper_registrar()
    #2 /home/easternwatersports/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(56): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_wrapper()
    #3 /home/easternwatersports/public_html/wp-includes/class-wp-hook.php(307): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button\{closure}()
    #4 /home/easternwatersports/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #5 /home/easternwatersports/public_html/wp-includes/plugin.php(522): WP_Hook->do_action()
    #6 /home/easternwatersports/public_html/wp-includes/class-wp.php(771): do_action_ref_array()
    #7 /home/easternwatersports/public_html/wp-includes/functions.php(1310): WP->main()
    #8 /home/easternwatersports/public_html/wp-blog-header.php(16): wp()
    #9 /home/easternwatersports/public_html/index.php(17): require('...')
    #10 {main}
      thrown in /home/easternwatersports/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php on line 1127

    Was this fixed? I still see this in my error log

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    The error is caused by third-party plugins but the issue has been resolved for the next update 1.8.1 which will likely be released sometime next week. Until then, there’s a pre-release version available on GitHub.

    We are still seeing this error on version 1.8.1 – is there a particular third-party plugin causing a problem?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Call to a member function get_cart_contents_total() on null’ is closed to new replies.