Woocommerce Style Error

Hi there

site: https://fantasy-books.live
version: X-Pro
Wordpress: 4.9.7

So, I use query monitor, and I’ve noticed woocommerce is loading stylesheet, ‘woocommerce-style’, ‘woocommerce-smallscreen’, and ‘woocommerce-general’, which I do not know where it is loading from and how to stop it.

Considering x-theme’s integration with woocommerce, do you know where this is?

This failed addition is slowing the front end of the site by 0.1 seconds. Although it is miniscule, it signifies an optimization problem and possible issues further on.

Thanks.

J.

nvm. I found the fix.

To disable the default woocommerce styles so I con customize X Pro without error
/**

  • Set WooCommerce image dimensions upon theme activation
    */
    // Remove each style one by one
    add_filter( ‘woocommerce_enqueue_styles’, ‘jk_dequeue_styles’ );
    function jk_dequeue_styles( $enqueue_styles ) {
    unset( $enqueue_styles[‘woocommerce-general’] ); // Remove the gloss
    unset( $enqueue_styles[‘woocommerce-layout’] ); // Remove the layout
    unset( $enqueue_styles[‘woocommerce-smallscreen’] ); // Remove the smallscreen optimisation
    return $enqueue_styles;
    }

// Or just remove them all in one line
add_filter( ‘woocommerce_enqueue_styles’, ‘__return_false’ );

Glad to hear that you found the solution. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.