Currency Suffix on Cart/Checkout Pages
-
function addPriceSuffix($format, $currency_pos) { switch ( $currency_pos ) { case 'left' : $currency = get_woocommerce_currency(); $format = '%1$s%2$s ' . $currency; break; } return $format; } function addPriceSuffixAction() { add_action('woocommerce_price_format', 'addPriceSuffix', 1, 2); } add_action('woocommerce_before_cart', 'addPriceSuffixAction'); add_action('woocommerce_review_order_before_order_total', 'addPriceSuffixAction');
I have used the above code to add USD to the cart and checkout pages on my site. I think the latest WC update broke this code.
How would I edit this code to have the USD suffix appear again on my cart and checkout pages only (it gets a little long/cluttered on catalog and product pages).
Thanks in advance and have a great day.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Currency Suffix on Cart/Checkout Pages’ is closed to new replies.