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
{{ message }}
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Add an item to the cart and visit the Cart Block page
See Warning/TypeError:
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php:604
Stack trace:
#0 woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php(879): WC_Stripe_Payment_Request->allowed_items_in_cart() #1 woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php(757): WC_Stripe_Payment_Request->should_show_payment_request_button() #2 wp-includes/class-wp-hook.php(308): WC_Stripe_Payment_Request->scripts('') #3 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #4 wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 wp-includes/script-loader.php(2194): do_action('wp_enqueue_scri...') #6 wp-includes/class-wp-hook.php(308): wp_enqueue_scripts('') #7 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #8 wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 wp-includes/general-template.php(3049): do_action('wp_head') #10 wp-content/themes/storefront/header.php(18): wp_head() #11 wp-includes/template.php(783): require_once('...') #12 wp-includes/template.php(718): load_template('...', true, Array) #13 wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #14 wp-content/themes/storefront/page.php(13): get_header() #15 wp-includes/template-loader.php(106): include('...') #16 wp-blog-header.php(19): require_once('...') #17 index.php(17): require('...') #18 {main}
thrown in woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php on line 604
Expected behavior
No Warning/Error should be displayed.
Additional context
The problem seems to be the output of "woocommerce_cart_shipping_packages" filter, as it is expecting an array explicitly (L828 rules out object implementing Countable).
Note: This could be a good opportunity to revisit the TODO comment and address the duplicate code present there.
The text was updated successfully, but these errors were encountered:
This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.
Describe the bug
A Warning/ TypeError (depending on PHP version used) is displayed on the front end when Multiple Packages for WooCommerce is activated but not yet configured, while WooCommerce Stripe Gateway is enabled and configured.
To reproduce
Steps to reproduce the behavior:
Expected behavior
No Warning/Error should be displayed.
Additional context
The problem seems to be the output of "woocommerce_cart_shipping_packages" filter, as it is expecting an array explicitly (L828 rules out object implementing Countable).
Note: This could be a good opportunity to revisit the TODO comment and address the duplicate code present there.
The text was updated successfully, but these errors were encountered: