• Resolved devinv

    (@devinv)


    Hi there,

    Is there a shortcode for the currency switcher? I’m trying to include the currency switcher in my site’s header, but my current theme doesn’t support widgets in the header. Is there a shortcode that I could use instead?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    I understand the site is using a third party theme, and that you would like to show currency switcher.

    Can you try the following snippet?

    <?php 
    	if ( function_exists( 'wc_get_currency_switcher_markup' ) ) {
    		$instance = [
    			'symbol' => true,
    			'flag'   => false,
    		];
    		$args = [];
    		echo wc_get_currency_switcher_markup( $instance, $args );
    
    	}
    ?>

    Source: https://woocommerce.com/document/woocommerce-payments/currencies/multi-currency-setup/#section-15

    You can add the custom code directly on your functions.php file, or you can add the snippet as well using the Code Snippets plugin.

    Hope this helps 😉

    • This reply was modified 3 years, 1 month ago by Igor H.
    Igor H

    (@ihereira)

    Hi,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Best.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multi-Currency Switcher Shortcode’ is closed to new replies.