Ecommerce Shopify WordPress Discussion

WooCommerce 8.5+ triggers loading a ton of unnecessary scripts even when wc is disabled for non-wc-pages

Until now, I used this function to prevent WooCommerce loading resources on non WooCommerce pages: add_action( 'template_redirect', 'remove_woocommerce_styles_scripts', 999 ); function remove_woocommerce_styles_scripts() { if ( function_exists( 'is_woocommerce' ) ) { if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { remove_action('wp_enqueue_scripts', [WC_Frontend_Scripts::class, 'load_scripts']); remove_action('wp_print_scripts', [WC_Frontend_Scripts::class, 'localize_printed_scripts'], 5); remove_action('wp_print_footer_scripts', [WC_Frontend_Scripts::class, 'localize_printed_scripts'], 5); } } } With all this, my non WooCommerce pages were freed from unnecessary WooCommerce styles and scripts. No additional scripts were loaded. The performance was good. But with the latest release 8.5.2 something changed, a ton of scripts are suddenly loaded: Handles: wp-polyfill-inert-js, regenerator-runtime-js, wp-polyfill-js, react-js, wp-hooks-js, wp-deprecated-js, wp-dom-js, react-dom-js, and many more... A lot of stuff that wasn’t needed before. I investigated and found a way to remove most of them: //remove a ton of script from non-woocommerce pages function deregister_polyfill(){ wp_deregister_script( 'regenerator-runtime' ); } add_action( 'wp_enqueue_scripts', 'deregister_polyfill'); This prevents WooCommerce from triggering / loading most unnecessary scripts. There are only two still lingering: Handle: wc-cart-fragments-js-extra, Handle: wc-order-attribution-js-extra. Are they needed on non WooCommerce pages? I do not understand this behavior at all. Why is WooCommerce suddenly triggering all these scripts? Is this a dependency issue and if so, what script is responsible for this occurrence? Has anyone else noticed the loading of all these scripts?
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.