Code

Discussion on WooCommerce Multiple Currencies

Discussion on WooCommerce Multiple Currencies

Cart 174 sales

vanquish supports this item

Supported

147 comments found.

Hello,

WordPress says that I have a critical error on my website, medievalinx.com I already posted on the WooCommerce forum and they suggested that I contact you for more support with the Multiple currencies plugin.

Here is a copy of the critical error report from WordPress.

WordPress version 6.1.1 Active theme: Divi (version 4.19.2) Current plugin: WooCommerce (version 7.1.1) PHP version 8.1.12

Error Details

An error of type E_ERROR was caused in line 1353 of the file /home/c7ecxn9rjj28/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php. Error message: Uncaught Error: Call to a member function get_allowed_countries() on null in /home/c7ecxn9rjj28/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php:1353 Stack trace: #0 /home/c7ecxn9rjj28/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store-session.php(129): wc_get_customer_default_location() #1 /home/c7ecxn9rjj28/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store-session.php(118): WC_Customer_Data_Store_Session->set_defaults() #2 /home/c7ecxn9rjj28/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Customer_Data_Store_Session->read() #3 /home/c7ecxn9rjj28/public_html/wp-content/plugins/woocommerce/includes/class-wc-customer.php(125): WC_Data_Store->read() #4 /home/c7ecxn9rjj28/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(840): WC_Customer->__construct() #5 /home/c7ecxn9rjj28/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(2550): WooCommerce->initialize_cart() #6 /home/c7ecxn9rjj28/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(659): wc_load_cart() #7 /home/c7ecxn9rjj28/public_html/wp-includes/class-wp-hook.php(308): WooCommerce->init() #8 /home/c7ecxn9rjj28/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #9 /home/c7ecxn9rjj28/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #10 /home/c7ecxn9rjj28/public_html/wp-settings.php(617): do_action() #11 /home/c7ecxn9rjj28/public_html/wp-config.php(105): require_once(’/home/c7ecxn9rj…’) #12 /home/c7ecxn9rjj28/public_html/wp-load.php(50): require_once(’/home/c7ecxn9rj…’) #13 /home/c7ecxn9rjj28/public_html/wp-login.php(12): require(’/home/c7ecxn9rj…’) #14 {main} thrown

Note that this errors seems related to WooCommerce, here a report done to the WooCommerce support: https://wordpress.org/support/topic/after-woocommerce-update-it-throws-error-while-first-time-loading-the-site/

What they suggest: Please navigate to WP Dashboard > plugins > locate WooCommerce and update it to the latest versions.

Also, please go to WooCommerce > status > tools > update database.

Hello! I have a critical error problem with the plugin since version 5.8 and now 5.9…

I need help and a correction to the plugin.

This is the error message:

Fatal error: Uncaught Error: Call to a member function get_allowed_countries() on null in /home/educandomovimiento.cl/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php:1353 Stack trace: #0 /home/educandomovimiento.cl/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store-session.php(129): wc_get_customer_default_location() #1 /home/educandomovimiento. cl/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store-session.php(118): WC_Customer_Data_Store_Session->set_defaults() #2 /home/educandomovimiento.cl/ public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Customer_Data_Store_Session->read() #3 /home/educandomovimiento.cl/public_html/wp-content/plugins/woocommerce/ includes/class-wc-customer.php(125): WC_Data_Store->read() #4 /home/educandomovimiento.cl/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(835): WC_Customer ->_construct() #5 /home/educandomovimiento.cl/public in /home/educandomovimiento.cl/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1353

Sonds very strange, because this issue some times was also reported for 5.4 version.

It is more likely that WooCommerce in the latest version implemented something that triggers that issue. The hard part is to identify what triggers that issue.

Are you sure you are running the latest 5.9 version? Because since the 5.9 version, no other user reported this kind of issue. Furthermore, since that version, from my tests all works as expected.

If you are still experiencing the issue with 5.9 version, please as a final test, perform this: Try editing the Customer.php located in the classes\com folder.

Replace from lines 16 to 23 with just:
return false;
It should look like this:
public function get_geo_location($country_name = false)
    {
    return false;
    }

Note that this errors seems related to WooCommerce, here a report done to the WooCommerce support: https://wordpress.org/support/topic/after-woocommerce-update-it-throws-error-while-first-time-loading-the-site/

What they suggest:
Please navigate to WP Dashboard > plugins > locate WooCommerce and update it to the latest versions.

Also, please go to WooCommerce > status > tools > update database.

Hi, I bought this add-on about 3 days ago and it is giving me the same critical error as indicated by the user Webmaster FM. I understand that in this error there is no reference to any script of the WooCommerce Multiple Currencies add-on, but for some reason when I activate this add-on this error occurs on my website.

The error doesn’t happen all the time, it’s just sometimes.

In fact, I tried to access the demo that you have of this plugin and it also threw the same error:

Fatal error: Uncaught Error: Call to a member function get_allowed_countries() on null in /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-content/plugins/woocommerce/includes/wc-core-functions.php:1353 Stack trace: #0 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store-session.php(129): wc_get_customer_default_location() #1 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store-session.php(118): WC_Customer_Data_Store_Session->set_defaults(Object(WC_Customer)) #2 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Customer_Data_Store_Session->read(Object(WC_Customer)) #3 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-content/plugins/woocommerce/includes/class-wc-customer.php(125): WC_Data_Store->read(Object(WC_Customer)) #4 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-content/plugins/woocommerce/includes/class-woocommerce.php(838): WC_Customer->__construct(0, true) #5 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-content/plugins/woocommerce/includes/wc-core-functions.php(2550): WooCommerce->initialize_cart() #6 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-content/plugins/woocommerce/includes/class-woocommerce.php(657): wc_load_cart() #7 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-includes/class-wp-hook.php(308): WooCommerce->init(’’) #8 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #9 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-settings.php(617): do_action(‘init’) #11 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-config.php(96): require_once(’/customers/6/1/...’) #12 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-load.php(50): require_once(’/customers/6/1/...’) #13 /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-login.php(12): require(’/customers/6/1/...’) #14 {main} thrown in /customers/6/1/c/codecanyondemo.work/httpd.www/wcmc/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1353

After this error appeared, I reloaded the page and was able to access the demo.

The same happens on my website, sometimes the error appears and then I reload the page and it shows correctly.

It could just be an issue related to the latest version of WooCommerce more than a plugin issue.

I’ve performed some further analysis on the stack trace you reported, and the the issue is triggered by the wc_load_cart() function (https://woocommerce.github.io/code-reference/files/woocommerce-includes-wc-core-functions.html#source-view.2511 ) when executing the WC()- >initialize_cart(); function that during its initialization is invoking the wc_get_customer_default_location in which the WC()->countries object seems to be null: https://www.dropbox.com/s/ukr3ivh2orap72h/wccm_currency.jpg?dl=0

During this process, the plugin is not invoked in any way. Please, make however sure you are running the latest 5.8 version.

From my tests nothing strange happened, I’ll try to perform some further tests. If you could however provide a detailed step-by-step guide (or any clue) on how to experience it, It would be very useful. Thank you.

Hi, I had version 5.7 active on my website, I didn’t realize that there is a new version available. I have already upgraded to the latest version and so far it has not thrown the error.

Thanks for your reply!

Glad to hear that. If experience it, please try (if possible) to report any clue that could help to recreate the scenario. Meanwhile, have a great day!

Hi, I just bought the plugin, but it is loading me with a critical error on the web. I did the debug that I found in the forum and this is the message.

[06-Nov-2022 17:01:02 UTC] PHP Notice: Trying to get property ‘query_vars’ of non-object in /var/www/wp-content/plugins/woocommerce-multiple-currencies/classes/com/Currency .php online 86

Hi, I still get the error.

Fatal error: Uncaught Error: Call to a member function get_allowed_countries() on null in /var/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php:1353 Stack trace: #0 /var/www/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store-session.php(129): wc_get_customer_default_location() #1 /var/www/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store-session.php(118): WC_Customer_Data_Store_Session->set_defaults(Object(WC_Customer)) #2 /var/www/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Customer_Data_Store_Session->read(Object(WC_Customer)) #3 /var/www/wp-content/plugins/woocommerce/includes/class-wc-customer.php(125): WC_Data_Store->read(Object(WC_Customer)) #4 /var/www/wp-content/plugins/woocommerce/includes/class-woocommerce.php(838): WC_Customer->__construct(0, true) #5 /var/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php(2550): WooCommerce->initialize_cart() #6 /var/www/wp-content/plugins/woocommerce/inclu in /var/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1353

Hi,
I’m sorry, but from the stack trace you reported there isn’t any reference to any script of the WooCommerce Multiple Currencies plugin.

As you can see there isn’t any script belonging to the woocommerce-multiple-currencies folder as for the first error log you reported in the first message.

You’re right, let me try it at night. because this time is sales time.

Version 5.6 and 5.5 damage my web page throwing me a critical error. How can I get version 5.4 or 5.3 of the plugin? It is the only thing that occurs to me at the moment to avoid the critical error.

Hi,
if you enable the WordPress debug mode: To do insert the following lines in the wp-config.php you find on the root of your site:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

and report to me which critical error it is reporting, I’ll be glad to fix it.

I’m sorry, but unfortunately, is not possible to download older versions.

Dear, in the latest update version, the website presents a critical error related to the plugin. The theme used is Skillate from Themeum. It is possible to see a security update and compatibility with themes.

Hi,
if you repot me the error message you are getting, I can further investigate. Ty to enable the WordPress debug mode and debug log ( https://wp-staging.com/docs/enable-wordpress-debug-log-mode/ ). To do that insert the following lines in the wp-config.php you find on the root of your site:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
The error message should be displayed and reported in the the debug.log you find in the in the wp-content folder.

UPDATE: Found the solution

Change of currency text. (...)

Hi. I am looking for currency plugin which can display two currencies at the same time. So, no switching, I need 2 currencies to be visible in the same time. One should be main one and the other secondary but roles must be switchable. Is this possible and please I need to see demo for this. Thanks

Hi,
I’m sorry, but the plugin hasn’t such a feature.

Hello! The plugin is great, but I have one issue: - I need the default currency displayed when entering the site to be EURO, so for this I’d need to set EURO as base currency, BUT - I must process orders in the second currency, that is RON, so checkout page must be in RON. So what i’d need is that base currency be RON, when I’m entering product prices, and also at checkout, but prices should be displayed in EURO by default for visitors. Can we do that? Or maybe vice versa: let the base currency be euro, but then force checkout in RON. Thank you.

Hi,
I’m sorry the plugin hasn’t such a feature. Thank you however for your suggestion, I’ll try doing my best for a future release!

Hello, I’ve downloaded the plugin from Envato elements. and installed on my website. but i saw i can change the currency by clicking the flag icon only. and other options are not working. most of the customers of my website might think it’s a bug. so it is possible to make it work when they click anywhere in the switcher?

License code: LAN5QVFX4J

Hello,
Make sure that other plugins are not interfering, try eventually switching theme. It might be the cause of the issue as well.

For further support, you need to use an account with a valid purchase and support licenses associated with it.

hello,when I install the plugin,my site page open will so slowly,when I unstall will be normal,why?

Hello,
it could be to the fact your hosting profile is not powerful enough to run all your current plugins. Plugins are software that are performing some computations to implement their features. Unfortunately, computation doesn’t come at zero cost.

As you can test on the demo site, running the plugin in an adequate hosting profile doesn’t produce any slowdown.

Try eventually switching to a more powerful hosting profile.

Hi this plugin doesn’t work with wpml multilinguage and woocommerce multivalue. Could you sen me a refund please?

Regarding the “WooCommerce multivalue”, the plugin doesn’t have any special support for that plugin feature. On the description page, in fact, you do not find any description of that feature.

Regarding the WPML, if you report a more detailed description of the issue you are experiencing, I’ll be glad to assist.

Note also that the Envato refund policy won’t grant a refund just for claiming a malfunctioning or because the plugin hasn’t any support or a feature that never claimed to have. Furthermore, authors cannot directly emit any refund. You have to eventually ask for a refund via the codecanyon refund page.

Is this plugin compatible / working with NestPay Payment Gateway?

Hi,
the plugin has never been teste with that payment gateway. I can, however, setup a private demo site where you can tests both in actions to be sure they work as you expect.

Please send me a private message (click on my name then use the low-right box) to send me your private email address. I’ll reply with mine where you can send me the plugin.

Could you sedn me a refund? The plugin doesn’t work

Authors cannot emit refunds. You have to eventually use the code canyon refund form, they will investigate further. Note, However, that just claiming that the plugin doesn’t work won’t make you elegible for a refund. Expecially if the issue is caused by a 3rd party plugins or themes.

If you report to me more details about the issue you are experiencing, I’ll be glad to assist.

Could you send me a refund for the plugin? Because It doesn’t work with my e commerce

Hi, in the Multiple Currencies plugin I can set a fixed value per product. Instead of using the tax exchange. For example I want a product to cost 10 Dollars / 25 Euros nomatter the current exchange rates

Thanks

I’m sorry, the plugin hasn’t such a feature :(

hello, I’m interested in your plugin, I’ll tell you what I want to see if I understood how it works.

I will have a site in URUGUAY that I will sell to Uruguay and the World, obviously in Uruguay I want to see the prices in Uruguayan Pesos and the rest see them in Dollars, 1 – in what currency do I charge the price of the products? in the “Base” price 2 – I saw the option that the payment is in the “Base” currency, for example dollars 3 – DHL shipping method always shows me the value in dollars, can I add it if the base price is dollars only?

Thank you

Hello
  1. In the base currency you select
  2. yes, there is an option that allows the checkot to be performed using only the base currency
  3. if you enable the option to foce the base currency in the checkout page (https://nimb.ws/wj4L2Q ) yes shipping will use the base currency. if you disable, the shipping will use the currency selected by the user: https://nimb.ws/9ETpxz

I was wondering if this plugin can help me to achieve the following: I have a product, let’s say a t-shirt, and that product have different prices in three currencies, something like: In EUR is $2,1, USD is $1 and in COP is $10,000.

One product with different prices for each currencies.

And also, in order to make a payment, it needs to convert the given price to a standard one.

Hi,
I’m sorry, the plugin hasn’t such a feature :(

Hi

Your plugin allows the option to force a base currency on checkout.

But what if we only want to force a base currency for one payment gateways and leave Paypal open to transact in any currency?

Would that be possible – maybe with some custom code you can give us?

Hi,
I’m sorry, it is not possible.

Hello, I made changes to display currencies in header menu but it doesn’t change, kindly help. Thanks

Hello,
what do you mean that you “made changes”? did you alter in any way the code? Please provide some more detailed info about the issue you are experiecing. Thank you.

No I didn’t modify the code, but simply didn’t want the currencies to show on my menu and toggled it off but it’s still there

Before you toggled it on, was it displayed anyway?

If no, it means that the issue you are experiecing might just related to a caching issue. In this case, purge your browser and server cache (if you are using any caching plugin).

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey