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

[Bug Report] Setting separator as 10.000,00(EUR), order amount become WRONG when status changed

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
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.

Hello FOX (WOOCS) Team,

It seems that I found a bug for the latest free version of FOX (WOOCS) plugin.

Environment: PHP 7.4 + MySQL MariaDB 10.4.27 (utf8mb4_general_ci) + WordPress 6.2.1 + WooCommerce 7.7.0 + StoreFront Theme 2.4.0

Step 1: Now let's set the EUR currency separator as 10.000,00 and of course click save. (Screenshot: https://i.ibb.co/n7BBrxW/001.png)

 

Step 2: Place an order and we can see the order at the backend. Currently, everything is ok. €44,55 × 6 = €267,30 (Screenshot: https://i.ibb.co/bLMsF0m/002.png)

Step 3: Now change the order status, such as Completed or On Hold, and then click Update. (Screenshot: https://i.ibb.co/CvwPz7v/003.png)

Step 4: Now we may find something WRONG! All the prices are multiplied by 100! €445,50 × 6 = €26.73,00 !! (Screenshot: https://i.ibb.co/Thng8Bd/004.png)

I have tested it several times in my local or online test environment, with clean WordPress + WooCommerce + FOX (WOOCS) free installation. I don't know if the bug existed too in the paid version.

Please have a check.

If we set the currency separator as"10 000,00" and repeat the above steps, then the result will be more ridiculous.

"Order Total: €24 981 495 188 749,00" ????? What is that??? (Screenshot: https://i.ibb.co/jDNVn8Y/005.png)

 

I hope this bug can be fixed soon.

 

Hello

I doubt it has anything to do with currency switching

I checked it on our sites - I can't repeat this error

Can  you  drop  me  wp-admin+FTP  access - https://share.pluginus.net/image/i20230222134241.png ->https://share.pluginus.net/image/i20230222134615.png

 

Hello Pablo,

Thanks for your reply.

For better testing, I've created a test demo website that you can use.

https://woocstest.mydailyorchestra.com
(PHP 7.4.33 + MySQL MariaDB 10.4.21 + WordPress 6.2.2 + WooCommerce 7.7.0 + WooCommerce Stripe Gateway 7.4.0 + Storefront Theme 2.4.0 + FOX(WOOCS) Free Plugin  1.4.0)

WP-Admin
--------
username: (Private data sent)
password: (Private data sent)

FTP (Successful via FileZilla)
------------------------------
20.38.12.110, port:21
username: (Private data sent)
password: (Private data sent)

Now, follow these 6 steps to generate the error:

Step 1:
Log in to the wp-admin dashboard, go to WooCommerce -> Settings -> Currency, and set the EUR separation into"10.000,00" or"10 000,00". Update all rates, and Save changes.

Step 2:
Back to the front-end shop, that is https://woocstest.mydailyorchestra.com/shop, switch the currency to EUR at the right side, add some products to the cart then checkout.

Step 3:
Fill in the Checkout form with any name and address, then use the Stripe test card"4242 4242 4242 4242, 01/25, 123" to go through the payment process. Now it shows the order received.

Step 4:
Back to the wp-admin dashboard, and go to WooCommerce -> Orders, click the latest order we've just created. Remember what it shows as the order amount price now.

Step 5:
Simply change the order status from"Processing" to another one, like"On hold". Click"Update".

Step 6:
Now we may see the order total amount price changed!! Either multiplied by 10 or 100 or became a very big number!!

Hope that this can repeat the error of this bug. Please have a check and hope it can be fixed soon.

Also, we may do the following steps to trigger this error (Remember to set the EUR separation as"10.000,00" or"10 000,00":

Step 7:
Login to the wp-admin dashboard and go to WooCommerce -> Orders, choose any existing order (even if it is completed). On the right side, change the order currency back to USD (the base currency) and Recalculate the currency, yes sure.

Step 8:
Now on the right side, change the order currency again to EUR and recalculate, yes sure.

Step 9:
Change the order status to any other, like processing, completed, or on hold. Click update.

Step 10:
Now you may see the order amount price will be a very strange big number.

Hope this can repeat the error of the bug and can be fixed soon.

 

Hello

Great!  We were able to reproduce this error on our site

thank you for  cooperation

The developer has added this to the list of fixes, I will write to you as soon as we fix it

 

Hello

In  file  - \wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php -  change  this  line - https://share.pluginus.net/image/i20230529191719.png to  https://share.pluginus.net/image/i20230529191844.png

if (!(isset($_POST["action"]) && $_POST["action"]== 'editpost' && isset($_POST["post_type"]) && $_POST["post_type"] == 'shop_order')) {
$this->current_currency = $this->default_currency;
}

and  do a test

Hello Pablo,

Thanks for your update about this bug.

I've tried it, and the result is......improved but still has some errors. The error is that it does not work with the official WooCommerce Stripe Gateway plugin. This plugin is made by WooCommerce officially with 900,000+ active installations.

Without further ado, let's repeat this error. You may still try on my test demo site to see what happened.

https://woocstest.mydailyorchestra.com
(PHP 7.4.33 + MySQL MariaDB 10.4.21 + WordPress 6.2.2 + WooCommerce 7.7.1 + WooCommerce Stripe Gateway 7.4.0 + Storefront Theme 2.4.0 + FOX(WOOCS) Free Plugin 1.4.0 with modified woocs.php)

WP-Admin
--------
username: (Private data sent)
password: (Private data sent)

FTP
------------------------------
20.38.12.110, port:21
username: (Private data sent)
password: (Private data sent)

Now, follow these 6 steps to generate the error:

Step 1:
Log in to the wp-admin dashboard, go to WooCommerce -> Settings -> Currency, and set the EUR separation into"10.000,00" or"10 000,00". Update all rates, and Save changes.

Step 2:
Back to the front-end shop, that is https://woocstest.mydailyorchestra.com/shop, switch the currency to EUR at the right side, add some product (e.g. Beanie Cap at €16,80), to the cart then checkout.

Step 3:
Fill in the Checkout form with any name and address, then use the Stripe test card"4242 4242 4242 4242, 01/25, 123" to go through the payment process. Now it shows the order received.

Step 4:
Back to the wp-admin dashboard, and go to WooCommerce -> Orders, click the latest order we've just created. Now let's look at the price list:

----------------------
Items Subtotal: €16,80
Order Total: €16,80
Paid: €16,80
May 30, 2023 via Credit Card (Stripe TEST)
Stripe Fee: -€7,06
Stripe Payout: €131,40
-----------------------

Think carefully now:"Paid" should ="Stripe Fee" +"Stripe Payout". How do the -€7,06 and €131,40 come out? That's the error!

Now you might think that it is a problem caused by the WooCommerce Stripe Gateway plugin, not FOX(WOOCS). Now let's do the above in USD with the separation of"10,000.00". Yes, the normal default currency.

Step 1 in USD:
Log in to the wp-admin dashboard, go to WooCommerce -> Settings -> Currency, and set the USD separation to"10,000.00". Update all rates, and Save changes.

Step 2 in USD:
Back to the front-end shop, that is https://woocstest.mydailyorchestra.com/shop, switch the currency to USD at the right side, add some product (e.g. the same Beanie Cap at $18.00), to the cart then checkout.

Step 3 in USD:
Fill in the Checkout form with any name and address, then use the Stripe test card"4242 4242 4242 4242, 01/25, 123" to go through the payment process. Now it shows the order received.

Step 4 in USD:
Back to the wp-admin dashboard, and go to WooCommerce -> Orders, click the latest order we've just created. Now let's look at the price list:

----------------------
Items Subtotal: $18.00
Order Total: $18.00
Paid: $18.00
May 30, 2023 via Credit Card (Stripe TEST)
Stripe Fee: -$0.91
Stripe Payout: $17.09
----------------------

Wow, everything is perfect in USD!"Paid" ="Stripe Fee" +"Stripe Payout"!
Therefore, we may conclude that the WooCommerce Stripe Gateway plugin is OK. And this error may be made by FOX(WOOCS).

Luckily, no matter how EUR or USD is shown now on the order page, after changing the Order Status and clicking Update, the numbers will not change now.

That's what I found (maybe I should try more payment methods plugins, like the official Paypal and WooCommerce Payments), and hope you can reproduce the error and ultimately fix the bug.

Regards

Hello

This is an incompatibility with a third party plugin. Please  read  this - https://currency-switcher.com/woocs-labs

Hello Pablo,

  1. I've tried WooCommer Paypal Payments v2.0.4 plugin with sandbox accounts, and No errors! Therefore, I don't need to follow the FOX(Woocs) Lab's compatibility instruction about this Paypal plugin.
  2. I've tried to follow the FOX(WOOCS) Lab's compatibility instruction for WooCommerce Stripe Payments 7.4.1 plugins (added the codes in about line 545, similar to the instruction in about line 721). However, nothing changed, and the error I reported yesterday is still there. ("Paid" does NOT equal"Stripe Fee" +"Stripe Payout", when EUR with separation"10.000,00" or"10 000,00".)

So can you look into it? Hoping the bug can be fixed.

Regards,

Hello

Yes, I'll add it to the adaptation queue

Please check  your  FTP access

Hello Pablo,

I've updated the server setting and now you should be able to log in to the FTP.

FTP (Successful via FileZilla v3.64.0)
------------------------------
20.38.12.110, port:21
username: (Private data sent)
password: (Private data sent)

Just simply QuickConnect and it should work. Upload + Download + List + Delete, all should be OK.

Regards

 

Hello Pablo,

If you still encounter problems when using FTP (such as FileZilla), you may also just use a web browser and try to log in to WP-Admin to operate (EDIT, DELETE, UPLOAD, DOWNLOAD, ZIP, COPY AND PASTE FILES AND FOLDERS DIRECTLY FROM THE WORDPRESS BACKEND). I've already installed the File Manager WordPress Plugin 7.1.9.

Regards

 

Hello

Ok!  Please  restore site.

I checked the file -  wp-content\plugins\woocommerce-gateway-stripe\includes\class-wc-gateway-stripe.php -  you didn't follow the instructions -  https://currency-switcher.com/woocommerce-stripe-payment-gateway

It looks like the file manager deleted or moved this file when I closed the editor

First, follow all the recommendations from the article, then do the test and then write to me

Hello Pablo,

Thanks for your quick reply.

I've restored the demo test site (https://woocstest.mydailyorchestra.com) and updated all the plugins to the latest version. Now the site can be viewed at the front end. (WP-admin log in information does not change)

Then, let's use the built-in File Manager plugin to see the codes in the wp-content\plugins\woocommerce-gateway-stripe\includes\class-wc-gateway-stripe.php. Just log in to the WP-admin dashboard, at the left side, File Manager -> Locate to the class-wc-gateway-stripe.php, right-click, and choose Code Editor. Screenshot here: https://i.ibb.co/ZTMLPYM/bug-01.png.

Now, let's modify the codes according to the instructions. It is something different from the instructions at lines 721-725, 740-742, 765-769, and 784-786. So the codes are added at lines 545-549, 566-569,593-597, and 613-616. Screenshot here: https://i.ibb.co/JrGCKw2/bug-02.png. Of course to Save and Close.

Okay, it's time to test a new order. Oops! The error is still there ("Paid" does NOT equal"Stripe Fee" +"Stripe Payout", when EUR with separation"10.000,00" or"10 000,00".) Screenshot here: https://i.ibb.co/6HVvdMC/bug-03.png.

That's it, and please have a try. Hope to hear from you soon.

Regards

 

 

Hello

OK!  I will check  it

Hello Pablo,

Hope everything is running well with you.

I've updated the demo site and tried again 3 payment methods for testing. Here are the details:

UPDATED DEMO SITE URL
-----------
https://woocs.mydailyorchestra.com

CONFIGURATION
-------------
PHP 8.2.4 + MySQL 8.0.24 + WordPress 6.2.2 + WooCommerce 7.7.2 + StoreFront Theme 4.3.0 + WP File Manager 7.1.9
FOX(WOOCS) Free Plugin 1.4.0, with code modification as mentioned in the above #7 on May 29, 2023. Set the EUR separation into"10.000,00" or"10 000,00".

WP-Admin
--------
username: (Private data sent, not changed)
password: (Private data sent, not changed)

FTP (Successful via FileZilla and FlashFXP)
------------------------------
(Updated)20.118.160.87, port:21
username: (Private data sent, not changed)
password: (Private data sent, not changed)
If FTP encounters problems, you may also try to log in to WP-Admin Dashboard and use the File Manager plugin.

Payment methods testing results
-------------------------------
1. (SUCCESS) WooCommerce PayPal Payments by WooCommerce 2.0.5 (in Sandbox Mode), everything is OK!
2. (SUCCESS) WooCommerce Payments by Automattic 6.0.0 (in Dev Mode), everything is OK!
3. (!!FAILED!!) WooCommerce Stripe Gateway by WooCommerce 7.4.1 (in Test Mode). Oops! Error is still there as mentioned in the above #16 on June 3, 2023. ("Paid" does NOT equal"Stripe Fee" +"Stripe Payout", with EUR and USD mixture, when using currency EUR with separation"10.000,00" or"10 000,00", screenshot as: https://i.ibb.co/6HVvdMC/bug-03.png)

Hope this is helpful for you to repeat testing to fix the bug, and looking forward to good news.

Regards,

Hello

Thank  you  for  info.

 

Hello

OK! Everything works correctly.  Please read  this - https://share.pluginus.net/image/i20230616175019.png

The plugin shows these prices in the currency of your account.