Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hey @mikefnl

    Please add the following to your theme in order to exclude the plugin script:

    add_filter( 'sgo_js_async_exclude', 'js_async_exclude' );
    function js_async_exclude( $exclude_list ) {
        $exclude_list[] = 'wc-add-to-cart-composite';
    
        return $exclude_list;
    }

    Regards,
    Stanimir

    Thread Starter mikefnl

    (@mikefnl)

    any particular file in the theme? functions.php?

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    functions.php is fine

    Thread Starter mikefnl

    (@mikefnl)

    I have added it to functions.php and turned on the JS Defer. It still gives the same behaviour, the page is stuck on Loading… when viewed on mobile.

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hey @mikefnl

    Please enable the Defer Render-blocking JS and check your site. Everything should be working now.

    Regards,
    Stanimir

    Thread Starter mikefnl

    (@mikefnl)

    @sstoqnov I enabled it and it is still not working. When visiting the page on mobile it stays stuck on “Loading…”. This is still the case even after adding the filter to functions.php.

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hey,

    Please try again and do not remove the underscore.min.js from Defer Render-blocking JS exclude list.

    Regards,
    Stanimir

    Thread Starter mikefnl

    (@mikefnl)

    @sstoqnov just enabled it with the underscore.min.js in the exclusion list. It still gives the same issue.

    Thread Starter mikefnl

    (@mikefnl)

    I think it was cached, seems to be working now.

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Weird, the underscore.min.js is still missing from the exclude list.

    I’ve added it to the functions.php function, so it should be always excluded.

    Please test again and make sure your have cleared your browser cache.

    Regards,
    Stanimir

    Thread Starter mikefnl

    (@mikefnl)

    Have done so, it’s working now. Thanks very much for all your help @sstoqnov.

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Glad it’s all fine now, marking this as solved ?? Please, don’t hesitate to drop a quick plugin review, it really helps us!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘WooCommerce Composite Products does not work with JS deferring on mobile’ is closed to new replies.