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
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

This topic contains 8 replies, has 2 voices.

Last updated by Dražen 2 years, 8 months ago.

Assisted by: Dražen.

Author Posts
May 24, 2022 at 11:07 am

Wannes

hello, we're having an issue with woocommerce and wpml. When paying for an order, not in the main site language, the url redirects to the main site language after clicking on the 'place order' button.
for example: hidden link
goes to
hidden link

May 24, 2022 at 11:37 am
May 26, 2022 at 7:51 am #11312665

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks for the patience.

1) As I understand this your staging website, can you please confirm it is okay to disable some plugins and switch themes in order to check further?

2) Can you please share URLs where I can see the issue happening, the ones originally shared are not giving me the same issue. I understand I should create a new order in 2nd language?

3) Please also share the FTP access account in the next private reply.

4) I am afraid I can not email you to another email, as the ticket is related to your user account email, and we provide support via forum or chat support. But you can add your developer under another connected user account as explained here:

- https://wpml.org/announcements/2020/09/add-other-people-to-your-wpml-cms-or-agency-account/

Thanks,
Drazen

May 30, 2022 at 6:08 am
May 30, 2022 at 6:14 am #11339427

Wannes

I don't see the 'My team' on our wpml account page so I'm not sure how to add another person.

May 31, 2022 at 7:07 am #11349135

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks for getting back.

1) For account issues please use the next form, maybe it needs to change or added to your account:

- https://wpml.org/home/contact-us/contact-form/

2) I am trying to check the issue on minimal, but I see your auction sub-products are not translated and you are using an older version of pluging.

Please update the plugin and make sure you translate the auction products, and test if the issue happens.

Please share then the steps or video on how can I see the problem.

Thanks,
Drazen

May 31, 2022 at 9:37 am #11351467

Wannes

I have updated wordpress and the auction plugin, copied the product in french, but the issue stays the same. After I click the 'completez la commande' button I get redirected to the dutch thank you (order received) page

The steps to recreate the issue are:
1. win an auction when you are on the french site
2. click on the button that is now visible on the auction product to complete the order
3.on the 'Complétez la commande' page (still in French) click the button to complete the order
4. you will see that you are nog on the dutch page and there is no more /fr/ in the url

this issue occurs when both 'WooCommerce Multilingual & Multicurrency' and 'WPML String Translation' are active

May 31, 2022 at 11:21 am #11352633

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks for taking your time to try my suggestion and getting back.

I have debuted further and could see the issue, it happens only for auction products, for simple works fine.

I tried deleting endpoints translation, setting a new one, and translating sub-action product, but the issue still happens.

It could be that this is a general compatibility bug with the YITH Auction plugin.

I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons.

You can access the WordPress dashboard using the link below:
- hidden link

Kindly follow the steps below:
- Set up WPML and WooCommerce as on your website
- Install the YITH auction plugin.
- Try to replicate the issue with simple dummy example
- Share with me the steps you did

This will help us to report the probable issue to the compatibility team and solve the possible problem faster.

Let me know how it goes.

Thanks,
Drazen

May 31, 2022 at 12:25 pm #11353133

Wannes

I set up your demo site and it has the same issue (same steps as before to replicate the issue).

I did discover it has something to do with the following yith setting: Automatically create a “Pending payment” order assigned to winner

You can find this setting in Yith -> Auctions -> General -> Auctions Payments

So maybe it has something to do with the 'after pay' functionality. because when going through the normal checkout page there was no issue. I always stayed on the French pages.

I did another test whit a simple product and it has the same issue. If you create an order in the backend with a normal product for your user account and set the status to 'pending payment', then in the front end go to your account page (in french), click 'commandes', then click 'payer' and complete the order. The thank you page then redirects back to Dutch. I also tested the last scenario with yith auctions plugin deactivated and the issue stays.

So it seems to be an 'after pay' issue and it's probably not connected to yith auctions.

May 31, 2022 at 1:52 pm #11353991

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks for getting back.

I checked further and actually, the issue is not reproducible from scratch when not using the YITH auction plugin, in the same matter.

I tested and debuged further and it seems it happens because of a known bug when an order is created in the default language, as it happens with an auction order, and you try to pay it in 2nd language.

You can read more on the next errata page:

- https://wpml.org/errata/woocommerce-you-are-redirected-to-the-wrong-confirmation-page-if-you-finish-the-payment-process-in-the-default-language-but-ordered-in-a-secondary-language/

Either way, I have escalated the issue to our compatibility team as a YITH Auction plugin bug, since it should work as it is a compatible plugin, so our team will check and debug further and get back with more info or contact further YITH to see if the order can be made in a correct language not always default, no matter in which the bid is made.

I will update you as soon as I have more news.

Kind regards,
Drazen

June 2, 2022 at 5:25 am #11368519

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks for the patience.

Our team checked, and it seems for now we will just have to wait for the bug to be fixed from the WPML core side.

Please note: the payment is correctly received despite the redirection to the confirmation page in the incorrect language.

We can suggest a workaround that can prevent broken payment URLs but users still have to pay in the primary language always. If you agree you can add this code in theme functions.php

add_filter('yith_wcact_get_order_url', function($order_url, $product_id, $order){
	do_action( 'wpml_switch_language', apply_filters( 'wpml_default_language', null ) );
	$order_url = $order->get_checkout_payment_url();
	return $order_url;
},10,3);

I will update you when the fix is released and version is out.

It will take some time.

Thanks,
Drazen