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

[WOOCS LABS] WOOCS causes Stripe Fee and Stripe Payout to show up in local currencies in WooCommerce Orders

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.

I didn't hear back from you in February, so I am repeating my ticket of Feb 3 here:

Stripe and WooCommerce currencies are not in agreement. Not all of the numbers being passed to WooCommerce from Stripe are in the purchase currency, but WOOCS treat them as if they are. This discrepancy shows up in WooCommerce Orders / Edit Order page.

Here in my Stripe account, test user, Sachiko Ito, purchased a 30 EM Credit Pack (a WooCommerce Subscription product) for JPY3,034, English Momentum - Order #12865.

https://www.dropbox.com/s/9oaa4wbxsij9zza/Screenshot%202020-02-01%2022.41.00.png?dl=0

The Description shows the WooCommerce Order Number:

https://www.dropbox.com/s/olrbsmjzy24s1ev/Screenshot%202020-02-01%2022.46.44.png?dl=0

As you scroll down, you can see that this was charged in Japanese Yen, the customer’s local currency, but Stripe transferred the funds to me in CAD because my Stripe account default is Canadian dollars, so the $36.10 is CAD. The fee is also shown in CAD as $1.35, so my Net is CAD $34.75. WooCommerce calls this"Stripe Payout".

https://www.dropbox.com/s/olrbsmjzy24s1ev/Screenshot%202020-02-01%2022.46.44.png?dl=0

https://www.dropbox.com/s/8bifqr44a127h1a/Screenshot%202020-02-01%2022.46.50.png?dl=0

In WooCommerce, the order looks like this:

https://www.dropbox.com/s/k9gxartufvihu88/Screenshot%202020-02-01%2022.50.11.png?dl=0

https://www.dropbox.com/s/m99w7fa9oj0tq50/Screenshot%202020-02-01%2022.50.32.png?dl=0

You can see that the Total is in agreement with Stripe, Y3,034, but the Stripe Fee is recorded here as -Y1. It should say -$1.35 (which is my default currency of CAD), so you can see that it was rounded down, and the Japanese Yen currency symbol was applied incorrectly. You can also see that the Stripe Payout is recorded here as Y35, but it should say $34.75 (CAD). You can see that this was rounded up because it mistakenly sees it as Japanese Yen which is a zero decimal currency.

So there are two problems. (1) The currency symbol is not being passed on to WooCommerce correctly, and (2) zero decimal currencies round up or down, but since the amount being rounded is actually in CAD, so it should not get rounded up or down. Correcting the first problem should make the second problem non-existent.

Hello

I didn't hear back from you in February, so I am repeating my ticket of Feb 3 here: - Unfortunately, I can’t track when you change private data(  ). You should write me a message. For example,"added"  - https://c2n.me/47PoZKV.png

I added the plugin to the adaptation queue

Hi Pablo,

I noticed you usually ask people to give you access to their staging site, so I have changed my private data so that now it gives you access to my staging site.

I am also wondering where I am in your adaptation queue. Really appreciate your help with this,

Wendy

Hello Wendy

Now you are the eighth in line.

I think it will take 3 weeks

Hello

We started to research your problem.

We have questions

https://c2n.me/483vh5Z.png -  we should convert this to one currency(order currency). in  this  case  is JPY.  I think it should work like that

And  please  update  plugin  to latest  version - https://currency-switcher.com/how-to-make-auto-update-for-wordpress-plugins-and-themes-bought-on-envato/

 

 

 

Hi Pablo,

Thank you so much for getting to this issue so soon.  Actually, what you are seeing in your https://c2n.me/483vh5Z.png in the WooCommerce Order is correct, but it is working because WooCommerce Multi-Currency plugin was activated. (WooCommerce Multi-Currency gets this right, but if you can get this working in WOOCS, I prefer your plugin for other reasons.) I have now deactivated WooCommerce Multi-Currency, so WOOCS is the only active currency switcher now. I have also added the Envato Market plugin and updated WOOCS.
I made a test purchase using WOOCS. You can see that on the WooCommerce Order page, the Stripe fee and Stripe payout are listed in the transaction currency, New Taiwan Dollars, but they should be in my Stripe account's base currency, CAD. That is what I want you to fix.
Wendy

Hello Wendy

Yes I understand. But the problem is that if on one order has several currencies it is not a good idea.

If it( https://c2n.me/483vh5Z.png ) is not involved in the calculations and is displayed for information only - in this case it makes sense

Hi Pablo,

This is how my Stripe account is set up. I want the Stripe fee to be my cost, not the client's. That way, there are no added fees to the price they see in the store. I'm hoping it encourages repeat sales. The transaction will go into QuickBooks Online as a receipt in the user's local currency and a credit memo in my Stripe account base currency. (If you know a better way to do this without charging the payment gateway fees to the client, please let me know.)

Hello Wendy

The meaning of LABS is to make adaptation for all users.

With your help, I want to find this solution. The problem is that I am a developer and I don’t know the business logic.

For this reason, I want to find out if these amounts are used in other calculations (on the side of woocommerce) or is this just for information

In  file - \wp-content\plugins\woocommerce-gateway-stripe\includes\class-wc-gateway-stripe.php

add  code - https://c2n.me/486oTOZ.png

if (class_exists('WOOCS')) {
global $WOOCS;
$order_currency=$WOOCS->current_currency;
$WOOCS->set_currency($currency);
}

//code

if (class_exists('WOOCS')) {
$WOOCS->set_currency($order_currency);
}

AND  add  code -  https://c2n.me/486p15r.png

if (class_exists('WOOCS')) {
global $WOOCS;
$order_currency=$WOOCS->current_currency;
$WOOCS->set_currency($currency);
}

//code

if (class_exists('WOOCS')) {
$WOOCS->set_currency($order_currency);
}

And  do  test.

My  test - https://c2n.me/486oJl4.png

Hi Pablo,

In WooCommerce 4.0, the analytics should now be able to be viewed for each currency. These are not yet able to be viewed aggregately as a base currency equivalency, but WC says this may be coming in the future. So for now, we should be able to view our revenue for USD, and then change the filter and view our sales this month in another currency, like TWD. This should now work in WooCommerce/Analytics/Revenue (https://www.dropbox.com/s/aidyp94ybbp9hbt/Screenshot%202020-06-23%2000.04.12.png?dl=0) and as well in the WP Dashboard WooCommerce Status widget (https://www.dropbox.com/s/fnm9j2h1955p1k0/Screenshot%202020-06-23%2000.05.45.png?dl=0). You can see this working in the screenshots because I have turned on WooCommerce Multi-currency instead of WOOCS. WooCommerce Multi-currency also has an aggregate page showing the transactions in both the currency of the transaction and the base currency equivalent. If you log into the admin area on my main site (not my staging site), you can see this. On the staging site, where I have WOOCS activated, you can see from this screen shot that the currency dropdown is missing and the gross sales is ridiculously high because it adds all the transactions together and then uses C$ as the currency symbol, https://www.dropbox.com/s/fz2k5s0kduk9ey4/Screenshot%202020-06-23%2001.04.18.png?dl=0 and https://www.dropbox.com/s/ff1r96n714qlgws/Screenshot%202020-06-23%2001.08.11.png?dl=0. So for you to be able to say your plugin is compatible with WooCommerce 4.0 and above, you will need to have it working with the WooCommerce/Analytics and with the WC Status widget on the main WP dashboard. These are all just for information, and actually don't even show the payment gateway fees.

However, the Stripe Fee and Stripe Payout that can be seen on WooCommerce Order pages come into WooCommerce from the payment gateway. For Stripe, these are in the base currency of the Stripe account, but for PayPal these are in the transaction currency. Stripe converts currencies to the base currency first and then takes off the currency conversion fee and transaction fee in the base currency. PayPal, on the other hand, calculates the fees in the transaction currency but the PayPal payout would still be in the PayPal account's base currency. So when Stripe sends a number like 5.41 back to WooCommerce as the Stripe fee, it is CAD $5.41 for me. Currently, WOOCS does not pay attention to the currency of the fee, so when it gets the numbers from Stripe, i.e. 5.41, WOOCS treats it as if it is in the transaction currency, i.e. NT$5.41 (which would only be about 25 cents CAD). The problem comes when a plugin is added to enter the transactions into accounting software. I am using"WooCommerce QuickBooks Connector" by Techspawn. This kind of plugin grabs the data from the WooCommerce Order. If the site does not accept payments in international currencies, there would be no issue and the transaction and the fees could be entered into the accounting software on the same receipt, but when international currencies are involved and the transaction currency differs from the gateway fees and payout currency, they can go into the accounting software as a sales receipt (or invoice) in the transaction currency and a credit memo (for the fees in the base currency). Once it is in the accounting software, it will be used in calculations to equate each transaction to the base currency, so it is very important to keep the different currencies separate by marking the currencies accurately.

I tested your code, and yes, it looks like it is working now. Thank you so very much!

Do you plan on making WOOCS compatible with WooCommerce Analytics? If so, when do you expect to have it done?

 

Hello

Do you plan on making WOOCS compatible with WooCommerce Analytics? - Yes. Developers are working on it

 

Today I updated the WooCommerce Stripe Gateway plugin. When I later made a test transaction, the custom changes you made to"class-wc-gateway-stripe.php" got overwritten. I updated it with the code you provided above, but how do I avoid having this code overwritten again? Should I put"class-wc-gateway-stripe.php" in my child theme? If so, do I create these two directories (woocommerce-gateway-stripe\includes) and then put it here? \wp-content\themes\hellopro\woocommerce-gateway-stripe\includes\class-wc-gateway-stripe.php

Hello

Unfortunately, you will need to add this code after each update of a third-party plugin.

Okay, thanks for letting me know.

Hello

Welcome;)