Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cre8tivediva/d000bb6ce02d8d73359ce39d9e446974 to your computer and use it in GitHub Desktop.
Save cre8tivediva/d000bb6ce02d8d73359ce39d9e446974 to your computer and use it in GitHub Desktop.
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