Support » Plugin: WooCommerce PayPal Checkout Payment Gateway » CRITICAL Uncaught Error after woocommerce update

  • Resolved ooluwole

    (@ooluwole)


    After completing the woocommerce data update my products stopped loading on the website. I am currently using the Divi theme. Here’s the error from my error log. Any help would be very much appreciated!! Thank you

    2018-01-30T22:04:33+00:00 CRITICAL Uncaught Error: Call to a member function get() on null in /home4/parilico/public_html/christinescreatives/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-checkout-handler.php:704
    Stack trace:
    #0 /home4/parilico/public_html/christinescreatives/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/abstracts/abstract-wc-gateway-ppec.php(63): WC_Gateway_PPEC_Checkout_Handler->is_started_from_checkout_page()
    #1 /home4/parilico/public_html/christinescreatives/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-with-paypal.php(12): WC_Gateway_PPEC->__construct()
    #2 /home4/parilico/public_html/christinescreatives/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(105): WC_Gateway_PPEC_With_PayPal->__construct()
    #3 /home4/parilico/public_html/christinescreatives/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(67): WC_Payment_Gateways->init()
    #4 /home4/parilico/public_html/

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Praveen

    (@spraveenitpro)

    Automattic Happiness Engineer

    Hi @ooluwole,

    firstly ensure that you are on the most recent version of PayPal express.
    Then let’s rule out a plugin or theme conflict. Please attempt to disable all plugins [except WooCommerce and PP express], and switch to the default Twenty Seventeen theme. If the problem goes away, enable them one by one to identify the source of the problem.
     
    If you can install plugins, install Health Check. On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you’re still logged in, without affecting normal visitors to your site

    Cheers!

    First: Your site is *NOT* showing that you’re using the Official WooCommerce PayPal Express Plugin. @spraveenitpro should probably note that before anything else 😉

    https://prnt.sc/ia6civ

    2nd: @ooluwole Your using Chris’s Plugin so it’d probably be best to run over to that plugin FIRST, then post your concern. For simplicity, this whole sentence is a direct link to the *CORRECT* plugin’s support.

    C.) You’re using a child theme from DiviCake. So, once you’ve established which PayPal you’re actually going to use, it’d probably be best to open a support thread which accurately notes and mentions the actual correct theme that you’re using as well.

    Fourth: You’re also using Diego’s currency switcher. That would be a *SUBSTANTIAL* detail that you might want to mention when getting support as well. (….just sayin’)

    e: You’ve got an SSL error on Christine’s site. Not sure why the logo is coming from https://christinescreatives.parili.com/wp-content/uploads/2018/01/CC-logo-min.png But that URLs SSL cert is either expired or not configured correctly

    https://prnt.sc/ia6hie

    6th: Here is line 63 (of the correct plugin):

    if ( wc_gateway_ppec()->checkout->is_started_from_checkout_page() ) {

    https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/blob/master/includes/abstracts/abstract-wc-gateway-ppec.php#L63

    Yet, here’s a product page on Christine’s site: https://christinescreatives.com/product/red-pink-white-flower-box/
    And, as you’ll notice, there is NOT a PayPal Express Checkout button on the product page itself.

    Seventh: Let’s stop with attempting to help for a now, and just point out that the site you’re actually needing help with does not have www in front of it, and it is secured via an SSL – so the correct site is actually https://christinescreatives.com

    H.) Best of luck to both you & Christine. Here’s the direct links to the rest of the files:
    Line 704:
    Look right above line 704 and you’ll see this: public function is_started_from_checkout_page() { (again, let’s first try putting a PayPal Express Checkout Button on the actual product page itself) 😉

    Line 63:

    if ( wc_gateway_ppec()->checkout->is_started_from_checkout_page() ) {

    Line 12:

    parent::__construct();

    Line 105:

    $load_gateway = is_string( $gateway ) ? new $gateway() : $gateway;

    I have the same error.
    In my case, I’m investigating why webhooks doesn’t fire.
    CRITICAL Uncaught Error: Call to a member function get() on null in … /wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-checkout-handler.php

    The line which gives the error is:
    $session = WC()->session->get( ‘paypal’ );
    in class-wc-gateway-ppec-checkout-handler.php, public function is_started_from_checkout_page()

    If I bypass this function and return false, my webhooks work!
    Very strange, realy. I don’t understand why this error stops webhooks to fire when customer profile is modified … or customer cretaed!!!

    Stack trace:

    #0 … /wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/abstracts/abstract-wc-gateway-ppec.php(63): WC_Gateway_PPEC_Checkout_Handler->is_started_from_checkout_page()

    #1 … /wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-with-paypal.php(12): WC_Gateway_PPEC->__construct()
    #2 … /wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php(42): WC_Gateway_PPEC_With_PayPal->__construct()
    #3 … /wp-includes/class-wp-hook.php(286): WCML_WC_Gateways->loaded_woocommerce_payment_gateways(Array)

    • This reply was modified 2 years, 8 months ago by .
    • This reply was modified 2 years, 8 months ago by .

    Hi Automattic Team.

    I HAVE the official Paypal Express Checkout plugin and have the same error also.

    I Use Flatsome Theme & Woocommerce. All Theme and plugins are up to date.

    What could be the issue ?

    Here’s my log:

    PHP Fatal error: Uncaught Error: Call to a member function get() on null in /home/mysite/public_html/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-checkout-handler.php:704
    
    Stack trace:
    #0 /home/mysite/public_html/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/abstracts/abstract-wc-gateway-ppec.php(63): WC_Gateway_PPEC_Checkout_Handler->is_started_from_checkout_page()
    #1 /home/mysite/public_html/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-with-paypal.php(12): WC_Gateway_PPEC->__construct()
    #2 /home/mysite/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(105): WC_Gateway_PPEC_With_PayPal->__construct()
    #3 /home/mysite/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(67): WC_Payment_Gateways->init()
    #4 /home/mysite/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(40): WC_Payment_Gateways->__construc in /home/mysite/public_html/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-checkout-handler.php on line 704
    Plugin Support John Coy

    (@johndcoy)

    Automattic Happiness Engineer

    Solving this and replying to separate thread for last comment.

    • This reply was modified 2 years, 7 months ago by John Coy.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CRITICAL Uncaught Error after woocommerce update’ is closed to new replies.