Support » Plugin: Variation Swatches for WooCommerce » Plugin Enqueue and CSS

  • Resolved qeyduey

    (@qeyduey)


    Hello,

    I’m curious… Why does this plugin need to:

    1. add a dozen body tags on every single page?
    2. be enqueued on every single page even if it’s not a product page?

Viewing 6 replies - 1 through 6 (of 6 total)
  • pluginswoo

    (@pluginswoo)

    @qeyduey

    Try the following filter

    add_filter( 'disable_wvs_enqueue_scripts', function(){
    // Load only product page. Return true to disable.
    return !! is_product();
    
    } );

    Thank You

    qeyduey

    (@qeyduey)

    @pluginswoo

    Unfortunately, that code does absolutely nothing.

    qeyduey

    (@qeyduey)

    All of the css classes are still being added to the body on every single page.

    @qeyduey

    I am sorry there is a mistake in the previously given code. Try the following

    add_filter( 'disable_wvs_enqueue_scripts', function(){
    // Load only product page. Return true to disable.
    return !is_product();
    
    } );

    Thank You

    • This reply was modified 7 months, 4 weeks ago by pluginswoo.

    All of the css classes are still being added to the body of every single page:

    – woo-variation-swatches
    – woo-variation-swatches-theme
    – woo-variation-swatches-style-rounded
    – woo-variation-swatches-attribute-behavior-blur
    – woo-variation-swatches-tooltip-enabled
    – woo-variation-swatches-stylesheet-enabled

    @qeyduey

    We can try to add filter to control to handle this.

    Thank You

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin Enqueue and CSS’ is closed to new replies.