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.

This topic contains 1 reply, has 2 voices.

Last updated by Riffaz 4 months, 1 week ago.

Assigned support staff: Riffaz.

Author Posts
June 11, 2019 at 2:12 am #3991085

phetM

I'm using this code snippet to be able to redirect clients after WooCommerce payment completion.

Snippet can be found here: hidden link

I'm using the code "as is" (minor customizing the URL).

This work fine to redirect to the "main Thank You page" in the main language, but it doesn't work when I'm on the 2nd language in the site.

Any suggestions on how to levitate this issue?

Thank you.

June 11, 2019 at 3:02 am #3991479

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for contacting WPML support.

This is a custom work.

Anyhow, try replacing your

$url = '<em><u>hidden link</u></em>';

with:

if(ICL_LANGUAGE_CODE=='fr'){
	$url = '<em><u>hidden link</u></em>';
}
else {
	$url = '<em><u>hidden link</u></em>';
}

and check.

Let me know how it goes.

Regards,
Riffaz.