S
S
Stanislav62020-08-08 00:09:55
WordPress
Stanislav6, 2020-08-08 00:09:55

How to disable all Woocommerce styles?

In general, I'm trying to disable as Woocommerce says:

/**
 * 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;
}

Does not work. It still pulls up Woocommerce styles.

And it doesn't work like this:
// Or just remove them all in one line
add_filter( 'woocommerce_enqueue_styles', '__return_false' );


How to disable?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question