• Resolved growthgun

    (@growthgun)


    Hi,

    First let me just say that this is a fantastic plugin, nothing out there really compares to it!

    I’ve stumbled across one issue though it somehow breaks the gallery on our product pages. We use the plugin “Additional Variation Images Gallery for WooCommerce – Pro” to have a better gallery on these pages and this plugin handles the width and the size of the images. You can see from this link how it should look: https://swallows-jag.co.uk/product/swallows-racing-5-0-200-cell-sports-cats/ (its a live site so for obvious reasons we have had to turn asset cleanup off temporarily)

    But when the plugin is enabled and having all javascript settings off and making sure we have reset the unloaded files it somehow does this: https://share.getcloudapp.com/5zuJwx5j

    I have found a way to fix it by manually going to each product and selecting “Do not apply any CSS & JS settings” :https://share.getcloudapp.com/p9u5wgDe

    What I really need is to somehow have this setting on for all products as we don’t want to have to do this for very product as there are going to be a lot of products eventually. Is there something we can put in functions.php which will turn it off on all products or is there a setting i am missing.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @growthgun thank you for the feedback! I’m glad you like the plugin! As for the issue you’re having, I’m positive that it’s related to either an unloaded CSS/JS (you said you don’t have any, perhaps you missed one or two, since “Do not apply any CSS & JS settings” that you activated doesn’t trigger any of the plugin’s unload rules) or there’s something wrong with the configuration of the combine CSS/JS feature.

    Anyway, the easiest & quickest way to solve this would be (unless you want to use “Test Mode” and edit a product page via trial and error to see which assets shouldn’t be unloaded) to indeed, deactivate Asset CleanUp on all product pages.

    You can do that with an MU plugin. Within /wp-content/mu-plugins/ you can place a PHP file (e.g. wpacu-disable-on-pages.php) which would contain the following code:

    <?php
    /**
     * Plugin Name: Asset CleanUp Filter
     * Description: Deactivate the plugin on specific pages
     * Version: 1
     * Author: Gabriel Livan
     * Author URI: https://gabelivan.com/
     */
    
    if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/product/') !== false) {
    	add_filter( 'wpacu_plugin_no_load', '__return_true' );
    }

    This will instruct Asset CleanUp to ignore any of its rules from triggering. It’s like have it inactive for all the pages containing /product/ in the URL.

    Please try this snippet and let me know how it works for you! Happy winter holidays!

    Thread Starter growthgun

    (@growthgun)

    Hi Guys,

    Thank you for the swift response, sorry there for the huge delay in replying but we have re activated the plugin and used your code snippet within the must use plugins and everything is working as normal!

    Thanks agin for the great plugin and great support!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Breaks Woocommerce Variation Gallery’ is closed to new replies.