This PR removes the limit_cart_sync_to_wc_pages, since the cart is present on Storefront on every page we need to always load wc-cart-fragments and not limit it to only WC pages.
Go to a non-WooCommerce page, hover over the cart icon on the header, and confirm it displays the pop-up with the cart info.
Add some products to the cart and go to the cart page, update the quantity of some of them, and make sure it's updated on the cart widget.
Enable a caching plugin (like WP Super Cache) and visit a non-WooCommerce page.
Go to the Shop and add some more products to the cart. Go back to the cached non-WooCommerce page from the last step and check the cart has the correct products and amount.
Changelog
Fix: Enqueue wc-cart-fragments script on all pages.
As stated in https://github.com/woocommerce/storefront/pull/2113
This PR removes the
limit_cart_sync_to_wc_pages
, since the cart is present on Storefront on every page we need to always loadwc-cart-fragments
and not limit it to only WC pages.Fixes https://github.com/woocommerce/storefront/issues/2101 & https://github.com/woocommerce/storefront/issues/2114
How to test the changes in this Pull Request:
Changelog