Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Code snippet for dequeing a script on the single produt page
function kia_unload_script() {
if ( function_exists( 'is_product' ) && is_product() ) {
wp_dequeue_script( 'wc-single-product' );
add_action( 'wp_enqueue_scripts', 'kia_unload_script', 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment