Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Error after Update to 2.5.1 #1994

Closed
masti93 opened this issue Jan 26, 2024 · 1 comment
Closed

PHP Error after Update to 2.5.1 #1994

masti93 opened this issue Jan 26, 2024 · 1 comment
Labels
support Support case

Comments

@masti93
Copy link

masti93 commented Jan 26, 2024

Describe the Bug

To Reproduce

When enabled PayPal the cart and checkout page is white.

PHP Error:

[26-Jan-2024 08:40:27 UTC] PHP Fatal error: Uncaught AssertionError: assert($product instanceof WC_Product) in /www/htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-subscriptions/src/Helper/SubscriptionHelper.php:209
Stack trace:
#0 /www/htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-subscriptions/src/Helper/SubscriptionHelper.php(209): assert(false, 'assert($product...')
#1 /www/htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(1044): WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper->paypal_subscription_id()
#2 /www/htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(683): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->script_data()
#3 /www/htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(72): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->enqueue()
#4 /www/htdocs/wp-includes/class-wp-hook.php(324): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button{closure}('')
#5 /www/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#6 /www/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#7 /www/htdocs/wp-includes/script-loader.php(2262): do_action('wp_enqueue_scri...')
#8 /www/htdocs/wp-includes/class-wp-hook.php(324): wp_enqueue_scripts('')
#9 /www/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#10 /www/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#11 /www/htdocs/wp-includes/general-template.php(3052): do_action('wp_head')
#12 /www/htdocs/wp-content/themes/Avada/header.php(21): wp_head()
#13 /www/htdocs/wp-includes/template.php(790): require_once('/www/htdocs/w01...')
#14 /www/htdocs/wp-includes/template.php(725): load_template('/www/htdocs/w01...', true, Array)
#15 /www/htdocs/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)
#16 /www/htdocs/wp-content/themes/Avada/100-width.php(15): get_header()
#17 /www/htdocs/wp-includes/template-loader.php(106): include('/www/htdocs/w01...')
#18 /www/htdocs/wp-blog-header.php(19): require_once('/www/htdocs/w01...')
#19 /www/htdocs/index.php(17): require('/www/htdocs/w01...')
#20 {main}
thrown in /www/htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-subscriptions/src/Helper/SubscriptionHelper.php on line 209

Environment

  • WordPress Version 6.4.2
  • WooCommerce Version 8.5.2
  • Plugin Version: 2.5.1
  • Browser: any browser
  • Any other plugins installed

Additional Details

System status
<!--If applicable, paste the system status here. Please ensure you redact or remove any identifying information. -->
@Sirvijver Sirvijver added the support Support case label Jan 26, 2024
@Sirvijver
Copy link
Collaborator

Hello @masti93

You have reached out to open GitHub forum with a support request. We utilize GitHub mainly for development activities, so I would like to ask you to reach out to the support team directly for more guidance.

We have not received this reported before, but when looking at the error it seems to be a conflict with your theme. You may want to perform a full conflict test to rule out eventual issues with the theme or a different plugin. We recommend temporarily activating the default theme Storefront and disabling all other plugins except for WooCommerce and PayPal Payments to see if the behavior persists. Here's a guide that explains the steps in more detail: How to test for conflicts

If conflict testing does not help you further, please open a support thread as advised above, so we can help you out further. This thread will be closed.

Kind regards,
Joost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Support case
Projects
None yet
Development

No branches or pull requests

2 participants