Conditionally loading the 5 plugin assets on specific pages
-
Hello,
I just installed the plugin and am enjoying the features. Unfortunately I’ve had to disable the plugin as I’ve noticed it’s loading 5 files across all my products:
JAVASCRIPT:
‘cwginstock_js-js’
‘sweetalert2-js’
‘cwginstock_popup-js’CSS:
‘cwginstock_frontend_css-css’
‘cwginstock_bootstrap-css’Other plugins I use, like wpforms, use conditional loading of the files only on the pages that need them, to optimize the load time of the site, especially after Google’s Core Vitals update.
I’ve tried adding the products I want to show the form on under the “Show/Hide Subscribe Form for specific products” setting in the backend, but this still loads the 5 files above on all my products, even the digital ones that are always in stock.How can I load the above 5 files ONLY on the products that I want this plugin to show a subscribe form on when they are out of stock?
Thank you
- The topic ‘Conditionally loading the 5 plugin assets on specific pages’ is closed to new replies.