Created
January 6, 2021 19:50
-
-
Save helgatheviking/58d1f43970a745f250e9c9599784236b 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