Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active January 27, 2023 14:55
Show Gist options
  • Save joshfeck/d11316439abe6441736ab52d3d66405d to your computer and use it in GitHub Desktop.
Save joshfeck/d11316439abe6441736ab52d3d66405d to your computer and use it in GitHub Desktop.
Add currency code to the checkout display in Event Espresso 4.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function my_ee_add_currency_checkout() {
wp_add_inline_script(
'single_page_checkout',
'jQuery( document ).one( "ajaxStop", function() {
jQuery("#spco-payment-info-table")
.find(".spco-grand-total td:contains(\'$\')")
.append("<span>(USD)</span>");
} );'
);
}
add_action( 'wp_enqueue_scripts', 'my_ee_add_currency_checkout', 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment