How to only Load scripts on variable products page

I’m looking for a way to load my JavaScript and CSS only on the product page, but only if it’s a Variable Products.

The is_product() function works well, but my scripts are loaded for all types of products: Simple, Variable, Grouped …..

How to limit the loading of scripts only for a variable product?

Read more here:: How to only Load scripts on variable products page

Leave a Reply

Your email address will not be published. Required fields are marked *