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

Wordpress menu item --> GET-request for changing currency

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.

Good morning support team,

my goal is that when a user clicks on a standard wordpress menu item "€ EUR", the same logic (GET-request --> without currency parameter in url) is applied as when he clicks on the switcher. As the connection between item and currency is static, it means: item one = EUR, item two = USD and so on. So therefore i would use following script:

<script>
jQuery(function () {
jQuery('.menu-item-1').click(function () {
Call GET-request for changing currency to i.e. EUR
});
});</script>

This link (https://currency-switcher.com/how-to-create-currency-links-without-shortcode) was not fully helpful because if there are already parameters in the URL it will send the user to the front page. Also, I do not want to have the currency parameter in the url.

If this is somehow possible I definitely buy the premium version.

 

Greetings and thanks in advance!

 

 

Hello

Please use  standard  currency  switcher  and an option - https://share.stackovergo.com/image/i20210916105154.png

To  set  [woocs ] to  the  menu - https://wordpress.org/plugins/shortcode-in-menus/

Is there no other way because i need different custom design as what is possible with the plugin.

I found the GET-setting so I thought it would be possible to exchange the red highlighted text with the logic that is behind the normal switcher when clicking.

Hello

Ok!  Use  this  code as  an example :

var currency = 'EUR';

var data = {
action: "woocs_set_currency_ajax",
currency: currency
};

jQuery.post(woocs_ajaxurl, data, function (value) {
location.reload();
});

 

Thank you very much Pablo for the good support, this is the information I was looking for. :)

I just bought the premium version!

Hello

Great! Welcome;)