Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- This script will disable stripe from loading its JS file on every page on your site,
- apart from event pages and page with ID 123. Edit 123 to your desired page.
- To just load this on event pages, remove 'is_page(123) ||' from the code below.
- For installation instructions see here - http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
- */
- add_action('wp_enqueue_scripts', function(){
- if( !(is_page(123) || em_is_event_page()) ){
- wp_dequeue_script('stripe-v3');
- }
- }, 100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement