Noah Smith
Noah Smith

Reputation: 11

WP Woo <noscript> in header Need removal

I am using WP Woo commerce with non woo commerce theme.

When I activate woo commerce plugin this line is inserted into my header:

<noscript>.woocommerce-product-gallery{ opacity: 1 !important; }</noscript>

Could someone help me remove this from header with woocommerce activated?

Upvotes: 1

Views: 302

Answers (2)

mko
mko

Reputation: 71

You can remove the <noscript> element with:

function myplugin_remove_noscript()
{
    remove_action( 'wp_head', 'wc_gallery_noscript' );
}
add_action( 'wp_head', 'myplugin_remove_noscript', 9 );

(WP Woocommerce inserted this element by using add_action)

Upvotes: 1

Noah Smith
Noah Smith

Reputation: 11

Never mind I just changed theme to woo commerce. It happened after their last update, probably will only get worse with future updates. Better to bite the bullet now and change.

close thread

Upvotes: 0

Related Questions