Forked from joshfeck/add_currency_code_spco.php
Last active
January 27, 2023 14:59
-
-
Save Pebblo/7312d7f6a5f1198e5f3e8e9ac7ea6337 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 .total:nth-of-type(2)") | |
.append("<span>(CHF)</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