Product Icon

Product Filters for WooCommerce

This is a tool to create ajax product filters that make the process of finding products in your store simple and fast

Performance: Conditional loading of frontend assets

Problem: These funkcions are not neccessary when we are not at the shop or category or tags pages:
wcpf-plugin-script
wcpf-plugin-vendor-script
wcpf-plugin-style

assets/build/js/plugin.js
assets/js/front-vendor.js
assets/css/plugin.css
assets/css/front-vendor.css

/wp-content/plugins/woocommerce-product-filters/assets/build/js/plugin.js?ver=1.4.41

Because of thies we loose pagespeed when using this plugin.

It would be useful to add an option to the plugin settings that allows users to control where the Product Filters frontend assets are loaded.

By default, this option should be enabled, so the plugin only loads its JavaScript and CSS assets on WooCommerce product listing pages where the filters are actually used, such as:

Shop page
Product category pages
Product tag pages

This would prevent unnecessary JavaScript and CSS from being loaded on other pages, improving frontend performance and PageSpeed scores.

However, the option should also be disableable, so users who use Product Filters on custom pages, landing pages, or other locations can continue to load the required assets there.

Suggested setting:

Load frontend assets only on WooCommerce product archive pages
When enabled, Product Filters JavaScript and CSS will only be loaded on the Shop, Product Category, and Product Tag pages. Disable this option if you use Product Filters on custom pages or other locations.

Default: Enabled

This would provide better performance out of the box while maintaining compatibility and flexibility for advanced use cases.

Author

szuperboci

Current Status

Open

Last updated: September 4, 2026

0 comments

Log in to comment on this feature request.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.