-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Description
Prerequisites
- I have carried out troubleshooting steps and I believe I have found a bug.
- I have searched for similar bugs in both open and closed issues and cannot find a duplicate.
Describe the bug
When using the all products block, some users are reporting that add to cart results in:
"Cannot set properties of undefined (setting 'cart')"
Expected behavior
That the product is added to the cart
Actual behavior
An error message happens instead
Steps to reproduce
- It seems this happens if "product-button-interactivity-frontend.js" is loaded, so the configuration of whatever needs to be such that this file is loaded.
- Try to add a product to the cart.
WordPress Environment
`
WordPress Environment
WordPress address (URL): https://staging-9c82-allherbsandseedlings.wpcomstaging.com
Site address (URL): https://staging-9c82-allherbsandseedlings.wpcomstaging.com
WC Version: 8.2.1
REST API Version: ✔ 8.2.1
WC Blocks Version: ✔ 11.1.2
Action Scheduler Version: ✔ 3.6.3
Log Directory Writable: ✔
WP Version: 6.3.2
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: en_US
External object cache: ✔
Server Environment
Server Info: nginx
PHP Version: 7.4.33
PHP Post Max Size: 2 GB
PHP Time Limit: 1200
PHP Max Input Vars: 6144
cURL Version: 8.4.0
OpenSSL/1.1.1n
SUHOSIN Installed: –
MySQL Version: 5.5.5-10.4.30-MariaDB-log
Max Upload Size: 2 GB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
Database
WC Database Version: 8.2.1
WC Database Prefix: wp_
Total Database Size: 52.48MB
Database Data Size: 46.72MB
Database Index Size: 5.76MB
wp_woocommerce_sessions: Data: 0.39MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.09MB + Index: 0.09MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Data: 0.45MB + Index: 0.59MB + Engine InnoDB
wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Data: 0.33MB + Index: 0.27MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_failed_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_jetpack_sync_queue: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_options: Data: 1.41MB + Index: 0.06MB + Engine InnoDB
wp_postmeta: Data: 12.52MB + Index: 0.84MB + Engine InnoDB
wp_posts: Data: 4.52MB + Index: 0.23MB + Engine InnoDB
wp_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Data: 0.06MB + Index: 0.05MB + Engine InnoDB
wp_term_taxonomy: Data: 0.13MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.11MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.08MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.06MB + Index: 0.09MB + Engine InnoDB
wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfpklist_template_data: Data: 0.11MB + Index: 0.00MB + Engine InnoDB
__wp_actionscheduler_actions: Data: 0.05MB + Index: 0.13MB + Engine InnoDB
__wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
__wp_failed_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
__wp_jetpack_sync_queue: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
__wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_mailchimp_carts: Data: 0.03MB + Index: 0.00MB + Engine InnoDB
__wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
__wp_options: Data: 1.19MB + Index: 0.08MB + Engine InnoDB
__wp_postmeta: Data: 19.52MB + Index: 0.31MB + Engine InnoDB
__wp_posts: Data: 3.45MB + Index: 0.13MB + Engine InnoDB
__wp_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
__wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_term_taxonomy: Data: 0.09MB + Index: 0.03MB + Engine InnoDB
__wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
__wp_wc_admin_notes: Data: 0.11MB + Index: 0.00MB + Engine InnoDB
__wp_wc_admin_note_actions: Data: 0.09MB + Index: 0.02MB + Engine InnoDB
__wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
__wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
__wp_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
__wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
__wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
__wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
__wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
__wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
__wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_woocommerce_order_itemmeta: Data: 0.08MB + Index: 0.09MB + Engine InnoDB
__wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
__wp_woocommerce_sessions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
__wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
__wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
__wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
__wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
__wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
Post Type Counts
amp_validated_url: 10
attachment: 264
customize_changeset: 82
custom_css: 2
efbl_skins: 3
feedback: 111
jetpack_migration: 2
jp_img_sitemap: 7
jp_pay_product: 4
jp_sitemap: 7
jp_sitemap_master: 7
mif_skins: 1
nav_menu_item: 35
page: 20
post: 7
product: 272
revision: 272
shop_order: 20
shop_order_refund: 1
wp_global_styles: 1
wp_navigation: 1
Security
Secure connection (HTTPS): ✔
Hide errors from visitors: ✔
Active Plugins (17)
Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3
AMP: by AMP Project Contributors – 2.4.2
Easy Social Feed: by Easy Social Feed – 6.5.2
Facebook for WooCommerce: by Facebook – 3.1.2
WordPress.com Editing Toolkit: by Automattic – 4.2070
Gutenberg: by Gutenberg Team – 16.9.0
Jetpack: by Automattic – 12.8-a.7
Mailchimp for WooCommerce: by Mailchimp – 3.2
WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels: by WebToffee – 4.1.3
Storefront Powerpack: by WooCommerce – 2.0.0
Woo AI: by WooCommerce – 0.5.0
WooCommerce PayPal Checkout Gateway: by WooCommerce – 2.1.3
WooCommerce Google Analytics Integration: by WooCommerce – 1.8.8
WooCommerce Product Add-ons: by WooCommerce – 6.5.0
WooCommerce Shipping & Tax: by WooCommerce – 2.3.7
WooCommerce Australia Post Shipping: by WooCommerce – 2.5.7
WooCommerce: by Automattic – 8.2.1
Inactive Plugins (33)
AutomateWoo: by WooCommerce – 6.0.7
Avalara AvaTax: by Avalara – 2.6.1
Classic Editor: by WordPress Contributors – 1.6.3
CoBlocks: by GoDaddy – 3.1.4
Crowdsignal Forms: by Automattic – 1.7.0
Crowdsignal Polls & Ratings: by Automattic
Inc. – 3.0.11
Google Listings and Ads: by WooCommerce – 2.5.10
Klarna Checkout for WooCommerce: by Krokedil – 2.11.5
Klarna Payments for WooCommerce: by krokedil
klarna
automattic – 3.2.2
Layout Grid: by Automattic – 1.8.4
Page Optimize: by Automattic – 0.5.4
Pinterest for WooCommerce: by WooCommerce – 1.3.12
TaxJar - Sales Tax Automation for WooCommerce: by TaxJar – 4.2.1
TikTok: by TikTok – 1.2.1
WooCommerce Back In Stock Notifications: by WooCommerce – 1.6.5
WooCommerce Brands: by WooCommerce – 1.6.61
WooCommerce Canada Post Shipping: by WooCommerce – 2.8.4
WooCommerce EU VAT Number: by WooCommerce – 2.8.8
WooCommerce Eway Payment Gateway: by WooCommerce – 3.7.1
WooCommerce FedEx Shipping: by WooCommerce – 3.8.5
WooCommerce Gift Cards: by WooCommerce – 1.16.6
WooCommerce Min/Max Quantities: by WooCommerce – 4.1.2
WooCommerce Payfast Gateway: by WooCommerce – 1.5.9
WooCommerce Payments: by Automattic – 6.6.2
WooCommerce PayPal Payments: by WooCommerce – 2.3.1
WooCommerce Product Bundles: by WooCommerce – 6.22.4
WooCommerce Product Recommendations: by WooCommerce – 3.0.3
WooCommerce Royal Mail: by WooCommerce – 3.0.1
WooCommerce Shipment Tracking: by WooCommerce – 2.4.1
WooCommerce Square: by WooCommerce – 4.3.0
WooCommerce Stripe Gateway: by WooCommerce – 7.6.1
WooCommerce UPS Shipping: by WooCommerce – 3.5.7
WooCommerce USPS Shipping: by WooCommerce – 4.7.5
Dropin Plugins (2)
advanced-cache.php: advanced-cache.php
object-cache.php: Memcached
Must Use Plugins (1)
WP.com Site Helper: by –
Settings
API Enabled: –
Force SSL: –
Currency: AUD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)
Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: –
HPOS feature screen enabled: –
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: –
WC Pages
Shop base: #1943 - /shop-old/
Cart: #1944 - /cart/
Checkout: #1945 - /checkout/
My account: #1946 - /my-account/
Terms and conditions: #2603 - /terms-and-conditions/
Theme
Name: Natural Herbs Lite
Version: 1.6
Author URL: https://www.sktthemes.org
Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ✔
Templates
Archive Template: Your theme has a woocommerce.php file
you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.
Overrides: –
Admin
Enabled Features: activity-panels
analytics
product-block-editor
coupons
core-profiler
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
onboarding
onboarding-tasks
product-variation-management
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page
Disabled Features: customize-store
minified-js
navigation
new-product-management-experience
settings
async-product-editor-category-field
Daily Cron: ✔ Next scheduled: 2023-10-31 18:32:37 +10:00
Options: ✔
Notes: 187
Onboarding: completed
Action Scheduler
Complete: 1,387
Oldest: 2023-09-30 12:22:01 +1000
Newest: 2023-10-31 11:49:26 +1000
Failed: 19
Oldest: 2022-11-03 07:06:54 +1000
Newest: 2023-10-31 09:00:19 +1000
Pending: 2
Oldest: 2023-11-01 08:24:52 +1000
Newest: 2023-11-01 08:59:16 +1000
Status report information
Generated at: 2023-10-31 11:50:25 +10:00
`
Isolating the problem
- I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
- This bug happens with a default WordPress theme active, or Storefront.
- I can reproduce this bug consistently using the steps above.