Forked from helgatheviking/dequeue-script-example.php
Created
January 6, 2021 21:05
-
-
Save cre8tivediva/d000bb6ce02d8d73359ce39d9e446974 to your computer and use it in GitHub Desktop.
Code snippet for dequeing a script on the single produt page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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