• rafiktech

    (@rafiktech)


    Hello,

    I’m trying to add a flag to the multi-currency switcher but it doesn’t work, is that possible or not?

    I’m using this code in function.php

    do_action(‘wcml_currency_switcher’, array(‘format’ => ‘(<img src=”/wp-content/uploads/2024/08/currency-aed.png” width=”26″ height=”26″/>) %code%’));

    Do I know where the problem is?

    Best Regards,

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Andrés Cifuentes

    (@andrescifuentesr)

    Hello @rafiktech,

    According to our documentation:

    Additionally, you can use HTML tags (img, span, em, strong, u) to customize the output when the switcher style is set to List of currencies, in line with official HTML standards for the select tag.

    However, you are using a dropdown switcher. According to this, you may need to create a custom currency switchers Using template files:
    https://wpml.org/documentation/related-projects/woocommerce-multilingual/designing-custom-currency-switchers-using-template-files/

    Please, keep in mind that you are using an Elementor widget as well, I would recommend you to try adding your currency switcher directly just to verify if there could be any compatibility issue with Elementor.

    Regards

    Thread Starter rafiktech

    (@rafiktech)

    Hello @andrescifuentesr ,

    Thank you for reply,

    I’m sorry but this is not clear and I don’t understand that in your documentation

    Additionally, you can use HTML tags (img, span, em, strong, u) to customize the output when the switcher style is set to List of currencies, in line with official HTML standards for the select tag.

    what does that mean, and how can I use the HTML tag if I can’t access the currency switcher list!!?

    Best Regards,

    Plugin Support Andrés Cifuentes

    (@andrescifuentesr)

    I’m not sure to understand what you mean when you say that you can’t access to the currency switcher list. Do you mean that this option is not available in your WooCommerce Multilingual settings?

    If what you mean is that you need to use a dropdown menu, I’m afraid that you need some custom code which is out of the scope of this forum.

    Finally, keep in mind that you are using an Elementor widget and this may limit the options available. Please try also using our native functions:
    https://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.