How to dequeue script on woocommerce product?
Question
I’m trying to dequeue some scripts on woocommerce product, but for some reason I can’t find a way to check for a single product.
is_singular('product')
doesn’t work for some reason. The dequeue itself works without the checks, e.g.:
add_action( 'wp_enqueue_scripts', 'my_custom_scripts', 100 );
function my_custom_scripts()
{
wp_deregister_script( 'wp-mediaelement' );
wp_deregister_style( 'wp-mediaelement' );
}
0
4 months
0 Answers
16 views
0
Leave an answer
You must login or register to add a new answer .