Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created April 4, 2019 17:26
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 Pebblo/6b56ed1c33e6d6f67a2747fb40b81b96 to your computer and use it in GitHub Desktop.
Save Pebblo/6b56ed1c33e6d6f67a2747fb40b81b96 to your computer and use it in GitHub Desktop.
Example of how to add the 'qbutton' class to the Stripe checkout 'pay now' button.
<?php //Please do not include the opening PHP tag if you already have one
function tw_ee_stripe_checkout_button_class() {
wp_add_inline_script(
'espresso_stripe_payment_js',
'jQuery( document ).ready(function($) {
$("#ee-stripe-button-btn").addClass("qbutton");
});'
);
}
add_action( 'wp_enqueue_scripts', 'tw_ee_stripe_checkout_button_class', 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment