WP Rocket WooCommerce Filters Cache
Automatically adds WooCommerce attribute filters to WP Rocket cache_query_strings settings.
by trueqap · github.com/trueqap/wp-rocket-woo-filters-cache · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/trueqap/wp-rocket-woo-filters-cache/archive/refs/heads/main.zipReadme
WP Rocket WooCommerce Filters Cache
Automatically adds WooCommerce attribute filters to WP Rocket cache_query_strings settings.
Description
This WordPress plugin automatically manages the addition of WooCommerce product filters to WP Rocket cache settings. The plugin ensures that WooCommerce filters work properly with WP Rocket caching enabled.
Features
- Automatic filter detection: Recognizes all WooCommerce attributes
- Auto-update: Updates when attributes are added, modified, or deleted
- Safe handling: Places filters between
# filter_startand# filter_endmarkers - Preserves manual modifications: Does not overwrite custom settings outside the markers
Managed Filters
- WooCommerce attribute filters (
filter_*,query_type_*) - Price filters (
min_price,max_price) - Rating filter (
rating_filter) - Sorting options (
orderby,sort) - Product category and tag (
product_cat,product_tag) - Display settings (
per_page,columns)
Requirements
- WordPress 5.0+
- WooCommerce 3.0+
- WP Rocket
Installation
- Download the plugin
- Copy the
wp-rocket-woo-filters-cachefolder to your WordPresswp-content/plugins/directory - Activate the plugin from the WordPress admin panel
- The plugin will automatically add filters upon activation
Usage
The plugin is fully automatic. After activation:
- All existing WooCommerce attribute filters are added to WP Rocket's cache_query_strings setting
- The list automatically updates when new attributes are created
- Updates also occur when attributes are modified or deleted
How It Works
The plugin operates as follows:
- Places filters into WP Rocket's
cache_query_stringsoption - Adds automatic filters between
# filter_startand# filter_endmarkers - Manual settings outside the markers are preserved
- Clears cache after making changes
Development
Hooks
The plugin uses the following WordPress/WooCommerce hooks:
woocommerce_attribute_added- when a new attribute is addedwoocommerce_attribute_updated- when an attribute is updatedwoocommerce_attribute_deleted- when an attribute is deleted
Filter Format
The generated filters format:
# filter_start
filter_color
query_type_color
filter_size
query_type_size
min_price
max_price
rating_filter
orderby
product_cat
product_tag
per_page
columns
sort
# filter_end
Support
If you find a bug or have a feature request, please open an issue in the GitHub repository.
License
GPL v2 or later
Changelog
1.0.1
- Removed admin menu
- Pure automatic operation
1.0.0
- Initial release
- Automatic WooCommerce filter detection
- WP Rocket integration
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| 1.0.1 | Aug 27, 2025 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.