You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The WooCommerce Stripe plugin causes a critical error when accessing and editing the checkout page in the WordPress backend. The issue occurs specifically when using the Classic Checkout block, whereas using the [woocommerce_checkout] shortcode works without issues.
Error Log
[07-Feb-2025 17:09:49 UTC] PHP Fatal error: Uncaught Error: Call to a member function needs_shipping() on null in /srv/htdocs/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-express-checkout-helper.php:629
Stack trace:
#0 /srv/htdocs/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-blocks-support.php(302): WC_Stripe_Express_Checkout_Helper->should_show_express_checkout_button()
#1 /srv/htdocs/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-blocks-support.php(197): WC_Stripe_Blocks_Support->should_show_express_checkout_button()
#2 /wordpress/plugins/woocommerce/9.6.1/src/Blocks/Payments/PaymentMethodRegistry.php(62): WC_Stripe_Blocks_Support->get_payment_method_data()
#3 /wordpress/plugins/woocommerce/9.6.1/src/Blocks/Payments/Api.php(92): Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry->get_all_registered_script_data()
#4 /wordpress/core/6.7.1/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\Payments\Api->add_payment_method_script_data('')
#5 /wordpress/core/6.7.1/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#6 /wordpress/core/6.7.1/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#7 /wordpress/plugins/woocommerce/9.6.1/src/Blocks/BlockTypes/Cart.php(265): do_action('woocommerce_blo...')
#8 /wordpress/plugins/woocommerce/9.6.1/src/Blocks/BlockTypes/AbstractBlock.php(111): Automattic\WooCommerce\Blocks\BlockTypes\Cart->enqueue_data()
#9 /wordpress/core/6.7.1/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->enqueue_editor_assets('')
#10 /wordpress/core/6.7.1/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#11 /wordpress/core/6.7.1/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#12 /wordpress/core/6.7.1/wp-admin/edit-form-blocks.php(302): do_action('enqueue_block_e...')
#13 /wordpress/core/6.7.1/wp-admin/post.php(187): require('/wordpress/core...')
#14 {main}
thrown in /srv/htdocs/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-express-checkout-helper.php on line 629
To Reproduce
Steps to reproduce the behavior:
Install and activate the WooCommerce Stripe plugin.
Go to WooCommerce > Settings > Payments and enable Stripe.
Ensure the Checkout page is using the Classic Checkout block, not the [woocommerce_checkout] shortcode
Attempt to edit the Checkout page in the WordPress backend. Pages > Checkout > Edit Page
A critical error appears, preventing page access.
Expected behavior
The checkout page should be editable in the backend without errors.
Screenshots The block that causes the critical error:
Error while trying to edit the checkout page when the stripe payment options are active:
Adding [woocommerce_checkout] in a shortcode block does not cause any issue
Environment (please complete the following information):
WordPress Version 6.7.1
WooCommerce Version 9.6.1
Stripe Plugin Version 9.1.1
WooCommerce and Stripe Plugin only.
Additional context
Switching to the [woocommerce_checkout] shortcode bypasses the problem.
9349477-zen
The text was updated successfully, but these errors were encountered:
Describe the bug
The WooCommerce Stripe plugin causes a critical error when accessing and editing the checkout page in the WordPress backend. The issue occurs specifically when using the Classic Checkout block, whereas using the [woocommerce_checkout] shortcode works without issues.
Error Log
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The checkout page should be editable in the backend without errors.
Screenshots
![Image](https://private-user-images.githubusercontent.com/193439048/411012165-59420de4-59ff-46b7-871f-82f86d2540fc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjI5NTAsIm5iZiI6MTczOTYyMjY1MCwicGF0aCI6Ii8xOTM0MzkwNDgvNDExMDEyMTY1LTU5NDIwZGU0LTU5ZmYtNDZiNy04NzFmLTgyZjg2ZDI1NDBmYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQxMjMwNTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zM2NmYjVhY2FjNzVjZmUzYzlhOWNiYzNmMjM4NzlmZWM1Mzc3MjZiNjQ5M2YxY2Q0MTIxMDY1NjA3ZGExZWU4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.6g5LGdptuHtwdyKZBkZ61SZsZmz2yf6-CmhkLLFWr48)
The block that causes the critical error:
Error while trying to edit the checkout page when the stripe payment options are active:
![Image](https://private-user-images.githubusercontent.com/193439048/411012419-5db59715-7972-4af4-a7e6-279eedb1012a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjI5NTAsIm5iZiI6MTczOTYyMjY1MCwicGF0aCI6Ii8xOTM0MzkwNDgvNDExMDEyNDE5LTVkYjU5NzE1LTc5NzItNGFmNC1hN2U2LTI3OWVlZGIxMDEyYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQxMjMwNTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02N2U0ZjU5NjM2ZjBlMTVlOTMyYjE4MDQwZDc0M2YzYjA0YmM2ZjU5YjE5ZjhlZDVmMjZiY2ViMDU1YzhjMjg2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.yzSFVZMED0ssQ7rWMxssUDA6Ts7qa6vrY1trtQNvc78)
Adding [woocommerce_checkout] in a shortcode block does not cause any issue
![Image](https://private-user-images.githubusercontent.com/193439048/411013183-f50018f6-0b74-492a-a080-4ff723e85eab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjI5NTAsIm5iZiI6MTczOTYyMjY1MCwicGF0aCI6Ii8xOTM0MzkwNDgvNDExMDEzMTgzLWY1MDAxOGY2LTBiNzQtNDkyYS1hMDgwLTRmZjcyM2U4NWVhYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQxMjMwNTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mMzYyMTdkYjYzMGFhMWVjYTBhYjY2NjY2NTM4ZjczNDQxMjQ5M2YwY2M2N2RlNGVlYzAxZTIwZGIwMjc5NTVlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.KTfkFNWGFaHgrwnnroWAfnyO58R-sZGLbKeH-4TAQTc)
Environment (please complete the following information):
Additional context
Switching to the [woocommerce_checkout] shortcode bypasses the problem.
9349477-zen
The text was updated successfully, but these errors were encountered: