• Resolved EliteGent

    (@gentlemako)


    Hello there,

    After latest update we starting seeing the following error.

    2024-01-06T05:19:26+00:00 CRITICAL Uncaught TypeError: WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentSource::name(): Return value must be of type string, null returned in /var/www/gg/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/PaymentSource.php:50 Stack trace: #0 /var/www/gg/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Helper/ContextTrait.php(182): WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentSource->name() #1 /var/www/gg/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-session/src/Cancellation/CancelController.php(66): WooCommerce\PayPalCommerce\Session\Cancellation\CancelController->is_paypal_continuation() #2 /var/www/gg/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-session/src/SessionModule.php(57): WooCommerce\PayPalCommerce\Session\Cancellation\CancelController->run() #3 /var/www/gg/wp-includes/class-wp-hook.php(324): WooCommerce\PayPalCommerce\Session\SessionModule->WooCommerce\PayPalCommerce\Session\{closure}(”) #4 /var/www/gg/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #5 /var/www/gg/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /var/www/gg/wp-content/plugins/woocommerce/includes/class-woocommerce.php(712): do_action(‘woocommerce_ini…’) #7 /var/www/gg/wp-includes/class-wp-hook.php(324): WooCommerce->init(”) #8 /var/www/gg/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #9 /var/www/gg/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /var/www/gg/wp-settings.php(643): do_action(‘init’) #11 /var/www/gg/wp-config.php(85): require_once(‘/var/www/gg/wp-…’) #12 /var/www/gg/wp-load.php(50): require_once(‘/var/www/gg/wp-…’) #13 /var/www/gg/wp-admin/admin-ajax.php(22): require_once(‘/var/www/gg/wp-…’) #14 {main} thrown in /var/www/gg/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/PaymentSource.php on line 50 2024-01-06T05:19:26+00:00 CRITICAL Uncaught TypeError: WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentSource::name(): Return value must be of type string, null returned in /var/www/gg/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/PaymentSource.php:50 Stack trace: #0 /var/www/gg/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Helper/ContextTrait.php(182): WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentSource->name() #1 /var/www/gg/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-session/src/Cancellation/CancelController.php(66): WooCommerce\PayPalCommerce\Session\Cancellation\CancelController->is_paypal_continuation() #2 /var/www/gg/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-session/src/SessionModule.php(57): WooCommerce\PayPalCommerce\Session\Cancellation\CancelController->run() #3 /var/www/gg/wp-includes/class-wp-hook.php(324): WooCommerce\PayPalCommerce\Session\SessionModule->WooCommerce\PayPalCommerce\Session\{closure}(”) #4 /var/www/gg/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #5 /var/www/gg/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /var/www/gg/wp-content/plugins/woocommerce/includes/class-woocommerce.php(712): do_action(‘woocommerce_ini…’) #7 /var/www/gg/wp-includes/class-wp-hook.php(324): WooCommerce->init(”) #8 /var/www/gg/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #9 /var/www/gg/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /var/www/gg/wp-settings.php(643): do_action(‘init’) #11 /var/www/gg/wp-config.php(85): require_once(‘/var/www/gg/wp-…’) #12 /var/www/gg/wp-load.php(50): require_once(‘/var/www/gg/wp-…’) #13 /var/www/gg/wp-blog-header.php(13): require_once(‘/var/www/gg/wp-…’) #14 /var/www/gg/index.php(17): require(‘/var/www/gg/wp-…’) #15 {main}

    In addition, we still have the problem with the safari option hiding IP address and the buttons not showing in the cart and the checkout page.

    Please advise.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @gentlemako,

    Thank you for reaching out to us, we are here to help.

    There is no known issue about this failure, and we have no real solution for this at the moment. Our best guess is that a caching issue (or something similar) could have occurred during the last update, but we can’t be certain about this. If the error persists, I recommend reinstalling the latest plugin version and see if that resolves the issue for you. If that does not work, you might want to check if the previous release improves the situation.

    Please try this and let us know if that helps you avoid this failure. If you need us to look closer into the Safari situation, I would suggest opening another thread for this or opening a private engagement with us via these instructions.

    Kind regards,
    Joost

    I am also having a couple users reporting they can’t use our website and are getting this error message on a white screen “There has been a critical error on this website. Learn more about troubleshooting WordPress.” One user sent a screenshot and he was using Safari. The logs show this error:

    2024/01/12 04:44:28 [error] 108346#108346: *739183 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught TypeError: WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentSource::name(): Return value must be of type string, null returned in /www/familylocket_327/public/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/PaymentSource.php:50

    I reverted the Woocommerce Paypal plugin to the previous version and the user who was having problems was able to use our site again.

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @nicolee3,

    the issue you reported is not the same as the one this thread has been created for. If you require support, please open a new thread or create a private engagement with our support team.

    I did look in our support history and found a very similar failure that indicated that this could simply be a failure that occurred during the installation process (not a plugin bug). The solution could be to re-install the last release, so that would be worth a try before you create a new engagement.

    Kind regards,
    Joost

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello,

    Since we did not receive any response or follow-up questions from you, we will assume you got this working to your requirements. If you still have any more questions for us, please open a new thread, because we will mark this one as resolved.

    Kind regards,
    Joost

    I had the same issue. It was with a customer who apparently had an order attached to them (their session?) that had a PaymentSource with a blank name. All attempts to load any page while they were logged in generated the error.

    I was able to fix it for this customer by temporarily rewriting the name() function in woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/PaymentSource.php to

    $result = $this->name ?? "unknown";

    return $result;

    After loading pages while logged in as this customer, I then reverted my code and the error went away. Perhaps it flushed the session somehow?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatar Error’ is closed to new replies.