Display Currency Code Infront of Symbol in WooCommerce
WooCommerce has the use of options for multiple currencies right out of the box. WooCommerce comes bundled with dozens of different currencies you can use in your store, there are snippets to add extra currencies, there’s also have a really nice Currency Converter Widget to help you display different currencies in your store.
<?php function patricks_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'USD': $currency_symbol = 'USD $'; break; case 'NZD': $currency_symbol = '$NZ'; break; case 'AUD': $currency_symbol = 'AUD $'; break; } return $currency_symbol; } add_filter('woocommerce_currency_symbol', 'patricks_currency_symbol', 30, 2); ?>
Author: Learn Tutorials Point
We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.
Trending Posts
Tags
ACF
Ading custom columns
admin
Bootstrap
Cart Price
categories
Change Price
class
Code
comments
Create
Creating custom post Type
CSS
current
custom
Customizing
Custom Post
Custom Post Type
Custom Taxonomy
database
Date
Fatch
form
function
HTML
Image
Install
javascript
jQuery
Menu
PHP
Post
Post Type
Price
product
responsive
Resular price
Single product
Table
taxonomy
Theme
Title
woocommerce
Wordpress
Wordpress Code