Created
May 16, 2019 11:34
-
-
Save bluedognz/1ad917c0af7b91f475668ceb4c2c36fa to your computer and use it in GitHub Desktop.
Add Currency Symbol to the Woocommerce Cart, Checkout, Product pages and archive pages in the format $199.00 AUD (or whatever currency is set in the shop)
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
function addPriceSuffix($format, $currency_pos) { | |
switch ( $currency_pos ) { | |
case 'left' : | |
$currency = get_woocommerce_currency(); | |
$format = '%1$s%2$s ' . $currency; | |
break; | |
} | |
return $format; | |
} | |
add_action('woocommerce_price_format', 'addPriceSuffix', 1, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment