PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

change the currency switcher from drop down menu to list all the flags in horizontal

This support system is for all types of the plugins as for premium versions, so for free ones! If you have premium version do not forget in the private data of the request (!!not in the text of the support request!!) after its publishing insert purchase code please (see blue-green button on the right side) and press Save button.
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi

i want to change the currency switcher from drop down menu to list all the flags in horizontal to use it in mobile version please check the screenshot that describe what i mean.

https://files.fm/u/yrwacczx4

Best Regards,

 

Hello

I can suggest you next way:

  • create new shortcode woocs_custom in file functions.php of the current wp theme and use it
  • in that new shortcode using function as condition https://developer.wordpress.org/reference/functions/wp_is_mobile/ use usual shortcode AND set of images with links like '?currency=USD'
  • Example:
    add_shortcode('woocs_custom', function($args) {
    if (wp_is_mobile()) {
    global $WOOCS;
    $currencies = $WOOCS->get_currencies();
    foreach ($currencies as $currency) {
    echo "<a href='?currency={$currency['name']}' class='woocs_custom_flags' title='{$currency['description']}'><img src='{$currency['flag']}' alt='{$currency['description']}'></a>";
    }
    } else {
    echo do_shortcode('[woocs]');
    }
    });
  • Using CSS class 'woocs_custom_flags' set your style