Last active
January 27, 2023 14:55
-
-
Save joshfeck/d11316439abe6441736ab52d3d66405d to your computer and use it in GitHub Desktop.
Add currency code to the checkout display in Event Espresso 4.
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
<?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