I have “manual” mode selected for minification in w3 total cache plugin settings.
I have a list of js/css files that are used in almost all templates and so have added them to minification under the “all templates” and those files are getting minified on every page along with the Woocommerce Single Product page.
But I also have some js/css files that are exclusive to the Woocommerce Single Product page. So I added them to minification and selected “Single-product” from the template drop down.
But somehow, those js/css exclusive to Woocommerce Single Product template are not being minified. Even the minify debug is ON and it doesnt show those files in the list.
Can anyone please help me out, running crazy regarding the same as this issue is coming only on Woocommerce Single Product. This same use-case is working fine for other templates also.
I’ve noticed the exact same problem happen to myself. I believe it’s to do with how W3 Total Cache determines which template is being displayed. In my case, I had a
woocommerce/single-product.php
file in my theme, but W3 Total Cache says the template being used to display issingle
.I managed to sort this by just placing the
single-product.php
file in the root of the theme as I would for any other custom post type, and then W3 Total Cache recognised the correct template and loaded in the CSS/JS as normal.