Skip to content

Instantly share code, notes, and snippets.

@New0
Created August 17, 2017 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save New0/9e52bd235b3b997f56b63068423774b8 to your computer and use it in GitHub Desktop.
Save New0/9e52bd235b3b997f56b63068423774b8 to your computer and use it in GitHub Desktop.
Insertion of Direct Stripe shortcode in template files
//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