Created
January 27, 2023 14:54
-
-
Save Pebblo/7b73e620503e1ae4c1c6abba06b33368 to your computer and use it in GitHub Desktop.
Example of how to include the currency code within the Attendee information ticket total row.
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 //Do not include the opening PHP tag if you already have one | |
add_filter('FHEE__EE_Default_Line_Item_Display_Strategy___item_row__total', 'tw_ee_Line_Item_Display_Strategy___price_include_currency_code', 10, 2); | |
function tw_ee_Line_Item_Display_Strategy___price_include_currency_code($price, $line_item) { | |
$mny = EE_Registry::instance()->CFG->currency instanceof EE_Currency_Config | |
? EE_Registry::instance()->CFG->currency | |
: new EE_Currency_Config(); | |
return $price . ' <span class="' . $cur_code_span_class . '">(' . $mny->code . ')</span>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment