Created
August 17, 2017 14:09
-
-
Save New0/9e52bd235b3b997f56b63068423774b8 to your computer and use it in GitHub Desktop.
Insertion of Direct Stripe shortcode in template files
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
//Allow the Direct Stripe assets to be enqueued in chosen pages | |
add_action( 'wp', function () { | |
global $post; | |
$shortcodePageSlugs = array( | |
'hello-world', | |
'second-page-slug' | |
); | |
if( $post ) | |
if( in_array( $post->post_name, $shortcodePageSlugs ) ) | |
add_filter( 'direct-stripe-shortcode-called', '__return_true' ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment