MarketPress change "$" to "USD"

When I check my product pages in Google Structured Data Testing Tool, it asks me to provide the currency in ISO 4217 format, that is in "USD" instead of the "$" currency symbol. Is there any way I can change that in my product page?

  • Ash

    Hello tristajensen

    Please try the following code:

    add_filter( 'mp_format_currency_symbol', function() {
    	return 'USD ';
    } );

    You can use this code in your child theme's functions.php if the theme is not changed. Otherwise mu-plugin is the best option. To create a mu-plugin, go to wp-content/mu-plugins folder. If there is no mu-plugins folder then, create one. Now, inside the mu-plugins folder create file with name anything.php (make sure file extension is .php). Now start with a <?php tag and then put the above code.

    Hope it helps! Please feel free to ask more questions if you have any.

    Have a nice day!

    Cheers,
    Ash