Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 38 replies, has 2 voices.

Last updated by Prosenjit Barman 9 months, 1 week ago.

Assisted by: Prosenjit Barman.

Author Posts
January 1, 2024 at 12:27 pm #15139446

guy@media-vision.co.il

Bugs only for the second currency - USD.

Created brand new WP with the latest versions of the needed plugins.
Clean minimum plugins just to show the bugs.

BUG 2 - charge client alot more on switching subscription. (1 parameter mistake)

bug related to the multicurrency.

************* bug 2 ******************
I am trying to: Switch subscription from 119$ to 179$

Link to a page where the issue can be seen: after buying the Standard plan in this link: hidden link getting back to this link to upgrade to Medium.

I expected to see: Total price to pay = 60$

Instead, I got: Total price to pay = 471$ - instead of taking the USD price (179) it takes the ILS price (590) and this make the wrong gap price.

only 1 parameter that make it impossible to switch subscriptions for our USD clients.

you can buy this is test website. no money charged it doesnt ask for credit card.

See images and some more info in the word doc (google drive): hidden link

January 1, 2024 at 4:29 pm #15139728

guy@media-vision.co.il

i just gave you in private comment:

- wp-admin user
- ftp
- 2 users for testing.

in this ticket: https://wpml.org/forums/topic/woo-subscriptions-price-mistake-1-parameter-is-taking-wrong-currency-in-2-pages/

do you want me to send also here?

January 2, 2024 at 7:58 am #15140329

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
I hope this message finds you well.

After conducting a thorough investigation, I have successfully reproduced the issue in our sandbox environment. This confirms that the problem is consistent and not isolated to a specific set of conditions.

During my initial investigation, it seems the pricing rule in other languages hasn't been integrated yet, which led to this issue. However, the issue has already been escalated to our 2nd tier team for further investigation. They will dive deeper into the issue to identify the root cause and work towards a resolution.

We understand the importance of resolving this issue promptly and efficiently. Rest assured, we are making every effort to address it as quickly as possible. As soon as we have more updates or progress on this matter, you will be immediately notified.

Thank you for your patience and understanding in this matter. If you have any further concerns or require additional information, please do not hesitate to reach out.

Best regards and wishing you a happy new year!
Prosenjit

January 2, 2024 at 9:05 am #15142396

guy@media-vision.co.il

OK thank you

January 10, 2024 at 6:54 am #15167294

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well.

I'm pleased to share some good news with you! Our team has thoroughly investigated the issue and successfully found a workaround for the issue you've been experiencing. We've detailed this solution in an errata, which you can see here: https://wpml.org/errata/woocommerce-subscriptions-incorrect-price-filtering-on-upgrade-downgrade/

Please apply the steps mentioned in the errata and hopefully, it will help to solve the issue. rest assured that the permanent fix for this issue will be included in the future version of the WooCommerce Multilingual plugin.

Let me know the update, please!

Best regards,
Prosenjit

January 14, 2024 at 12:47 pm #15182290

guy@media-vision.co.il

Hi,

I was also glad to hear, but we are not there yet; the bug still exists. This solution did not solve it.

1. I clicked to upgrade my $119 subscription (see: 01_my_subscription_page.png).

2. I chose the $178 subscription (02_grouped_product_page.png).

It feels like you fixed the "From" price bug I reported here: https://wpml.org/forums/topic/woo-subscriptions-price-mistake-1-parameter-is-taking-wrong-currency-in-2-pages/ .

03_cart.png
** But the bug in the cart is not fixed. **
The gap payment can be a maximum of $59 (178 - 119), but the cart shows $273.48.
I know why. Instead of taking the new subscription price in USD, which is $178, it takes the ILS, which is $590.

Only the first calculation is wrong; it miscalculates the gap between $178 and $119. It mistakenly calculates the gap between $590 and $119.

03_cart.png
02_grouped_product_page.png
01_my_subscription_page.png
January 14, 2024 at 12:49 pm #15182333

guy@media-vision.co.il

Just to say that i tried this fix: https://wpml.org/errata/woocommerce-subscriptions-incorrect-price-filtering-on-upgrade-downgrade/

Maybe it fixed the grouped page "From" price. but not the cart bug.

January 15, 2024 at 9:05 am #15183735

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for the feedback.

The proposed solution has been thoroughly tested in a sandbox environment, and I can confirm it working perfectly. The calculations are also happening correctly on the cart page. You can test in our sandbox site as well by purchasing a smaller subscription from this grouped product: hidden link

Following this, you can proceed to upgrade the subscription to the Medium tier. Please note that English is configured as the secondary language and USD is the enabled currency for transactions in this language. For the completion of your purchase, feel free to utilize the test Visa card number 4242 4242 4242 4242, accompanied by any CVC and expiry date of your choice.

I tried to access your site for further investigation, but I am encountering a 404 error every time I try to reach the wp-admin page. Since I'm unable to access the backend, could you please verify that the configuration for both the Upgrade and Grouped products in the WooCommerce Subscription plugin is set up correctly?

If everything is setup correctly there, I kindly request you to fix the 404 error so that I can investigate the issue directly from your end and let you know what to do next. I also have enabled the private box for you in case you want to share new access information.

Looking forward to your response and appreciate your kind cooperation in this matter.

Best regards,
Prosenjit

January 15, 2024 at 1:10 pm #15185399

guy@media-vision.co.il

I tested your sandbox, and I think your sandbox is not set up correctly. The French subscription didn't switch at all.

I can trust my settings. Please try the admin again; it will work.

Don't doubt my settings so quickly. Your colleague doubted, and after another check, he saw that I'm not mistaken, and we solved this bug just today: https://wpml.org/forums/topic/woo-subscriptions-price-mistake-1-parameter-is-taking-wrong-currency-in-2-pages/

So please recheck. I applied the fix from here: https://wpml.org/errata/woocommerce-subscriptions-incorrect-price-filtering-on-upgrade-downgrade/

Still, it's not solving the issue.

This is the grouped product that I created: hidden link

January 16, 2024 at 6:57 am #15187852

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the clarification.

I want to assure you that I'm not questioning the settings you've implemented. My inability to access them led me to request a confirmation of their correctness. I hope you can understand.

However, the login works correctly now. While checking the status tab of WooCommerce Multilingual, I noticed that the translation preference for two fields was added incorrectly. I modified the translation settings for the "_subscription_price" to "Copy" and "_wcml_custom_prices_status" to "Don't Translate" in WPML > Settings.

After that, I added the code correctly again and then tried to update the subscription. The price difference now appears correctly on the cart page. For a clearer view, please refer to this screenshot: hidden link

Please test by yourself and let me know if there is anything else you need help with. I will be happy to help.

Best regards,
Prosenjit

January 16, 2024 at 3:37 pm #15190994

guy@media-vision.co.il

Dear Prosenjit,
<b>the bug didnt solved just migrated becuase you cnanged the main language</b>
Appriciate the time you invested.
You confused your self. and made the test enviorment "dirty"
it is not the same website since you changed the main language.

<b>You forgot to mention that you changed the main language of the website.
Changing the website's main language interfear with our efforts to find the 1 bug since it crated totlay new enviorment</b>

i found that the bug migrated to the second language thast was working.
But it doesnt matter because we needed the website to stay in its main language.
so we wont argue on this.

<b>
also, it is not really clear that you did only 2 settings in "WPML > Settings" since i cant find this settings and also because you forgot mentioning that you also changed the website language </b>

this explanation you gave is blury. with more than 10 years expirience with WPML i still couldnt find this 2 settings in "WPML > Settings".
please explain this 2 things you say here:
I modified the translation settings for the "_subscription_price" to "Copy" and "_wcml_custom_prices_status" to "Don't Translate" in WPML > Settings.

and last thing:
i had to revert the website since you just broke it in a different place.

Please do the same 2 fixes withput forgeting other steps you make and withput changing the main language.

please give me clear explanation to the 2 steps or more.

3.i changed the main website to english - all the product disapear from the english.
you just did to much here. now i needed to restore to what it was.

4. now please do again you minor 2 changes <b>this time dont change the website main language and try to be clear about the settings you do </b>

You can try now to buy smaller plan and click upgrade from here:
hidden link

<b>Please note that the page is in english and so the main language is english - dont change it</b>

January 17, 2024 at 4:15 am #15192633

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,

Thank you for your detailed feedback and for highlighting the issues you encountered. I sincerely apologize for any confusion or inconvenience caused by my recent actions.

Regarding the language change, my understanding was that English was mistakenly set as a non-default language, because the English products were appearing as translations. But, thank you for your clarification on this matter. Further tests will be conducted without changing the default language.

For the settings in "WPML > Settings", I understand now that my explanation was not clear enough. The custom fields "_subscription_price" and "_wcml_custom_prices_status" can be found under "WPML > Settings > Custom Field Translation", by clicking on the "Show system field" button. I apologize for omitting this crucial detail in my previous communication.

I have taken another look at the setup and understand the unique aspects of your configuration better now. However, while implementing the suggested changes from the Errata in the PHP file, a fatal error occurred on your site. I attempted to access the site via FTP to resolve this, but unfortunately, the FTP access information is not working.

Could you please provide the FTP details so I can address this error and proceed with the necessary adjustments? I have enabled the private field for you so that you can securely share the access. Additionally, to further refine my approach, I have a couple of queries:

1. If English is set as the default language, why are the English products showing as translations? This understanding is crucial for me to ensure the correct configuration.

2. I noticed that ILS is the default currency for your site. If the intention is for USD to appear in the English version, may I ask why USD is not set as the default currency in WooCommerce > Settings? This information will help me align the settings more accurately with your requirements.

I assure you that I am committed to resolving the issues efficiently by giving it a top priority. Your guidance and clarifications will be invaluable in this process.

Thank you for your patience and cooperation. Looking forward to your response.

Best regards,
Prosenjit

January 17, 2024 at 4:44 am #15192640

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

[A small Update]

I've revised my setup after reviewing yours, making several adjustments:

1. Changed the site's Default language from French to English.
2. Set "Euro" as the primary currency for the site.
3. In "WooCommerce > WooCommerce Multilingual > Multicurrency", I added USD as a secondary currency, associating it with the English language. Now, Euro is assigned to French (the site's secondary language) and USD to English (the site's primary language).
4. Created subscription products and a Group Product in French, then translated them into English.
5. When accessing the English product, USD was displayed. I completed a purchase in USD for a small-tier subscription.
6. When upgrading to a Medium tier subscription, the price difference was correctly calculated on the Cart page.

Please review the product here: hidden link.

Please let me know if there's anything I missed in the setup or if any additional adjustments are needed. I'll be more than happy to assist you in resolving the pricing issue.

Best regards,
Prosenjit

January 17, 2024 at 8:05 am #15193224

guy@media-vision.co.il

[A small Update]

Sincerely apologize for any confusion or inconvenience caused by my partial description.
I can see why you found the settings strange.

you have asked the right questions.

perhaps it was the longer way but it looks like you really understand the root of the problem - special settings that the wpml/wcml code in 1 place didnt took care of it (doesnt check what currency is set for the language in wcml and just take the main currecny)

i wrote the background that led to this settings in previous comment.

also reverted the files (the site is working again)
also restored the DB so you will have the test enviorment as it should be.

i just did this fix:https://wpml.org/forums/topic/woo-subscriptions-price-mistake-1-parameter-is-taking-wrong-currency-in-2-pages/

in the file:MulticurrencyHooks.php

change of this line:
$subscriptionSignUpFee = get_post_meta( $originalProductId, '_subscription_sign_up_fee_' . $currency, true );

it it fixes the "From" price

no other change made.
this fix:https://wpml.org/errata/woocommerce-subscriptions-incorrect-price-filtering-on-upgrade-downgrade/

i didnt ad it to the file so you will be able to have clean enviorment of testing.

Thanks

January 17, 2024 at 4:43 pm #15196245

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for your concise explanation and for clarifying the issue. I now have a clear understanding of the issue and will do my best to resolve it for you.

Unfortunately, the same critical error has recurred on your website after adding the workaround, which was working fine previously. I tried to solve it using the FTP credentials you provided, but still can't access the FTP. Could you please provide instructions on how to access your site's file system via FTP? Additionally, if there are any country-based restrictions in place, I would appreciate it if you could temporarily lift them while we conduct our investigation. This would enable me to swiftly address the issue without further inconveniencing you. Sorry for any inconvenience this may cause.

Actions taken: I applied only the code workaround as outlined in the Errata.

In the meantime, I will continue the investigation in my development environment and update you if I'm able to trace anything.

I truly appreciate you patience and kind cooperation in this matter.

Best regards,
Prosenjit

The topic ‘[Closed] Split: Woo subscriptions wrong price’ is closed to new replies.