Skip to content

Instantly share code, notes, and snippets.

@bluedognz
Created May 16, 2019 11:34
Show Gist options
  • Save bluedognz/1ad917c0af7b91f475668ceb4c2c36fa to your computer and use it in GitHub Desktop.
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)
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