-
-
Save Pebblo/fec9ba9c123186500c4e2940313bb680 to your computer and use it in GitHub Desktop.
Example of how to dequeue the Stripe JS file on all pages except the 'registration-checkout' 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
<?php //Please do not include the opening PHP tag if you already have one | |
add_action( 'wp_enqueue_scripts', 'tw_ee_dequeue_stripe_js', 20 ); | |
function tw_ee_dequeue_stripe_js() { | |
if(! is_page('registration-checkout')) { | |
wp_dequeue_script( 'stripe_js' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment