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 14 replies, has 3 voices.

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

Assisted by: Prosenjit Barman.

Author Posts
August 13, 2024 at 12:33 pm #16066085

pavolS-4

Background of the issue:
show purchase summary after checkout in english language mutation. Purchase summary si not shown due to corrupted url. We are using 2 lang mutation (SK - default, EN - second). We created a page for purchase summary, for EN mutation the page is duplicated without content. For content we are using elementor with purchase summary widget. After checkout in SK mutation is purchase summary shown, in EN mutation not.

We tried your workaround in elementor module.php, but its not working.

Please investigate some time to solve check what is the problem.

If you need a temporary access or meeting with us, we do all you need.

Many thanks.

Symptoms:
corrupted endpoint order-received

Questions:

August 13, 2024 at 3:57 pm #16067407

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Welcome to the WPML support forum. Before assigning your ticket to one of my colleagues, please allow me to guide you through some initial debugging steps to help speed up the support process.

This may be related to the following known issues. So please try the workaround suggested there after a full site backup and make sure the issue exists or not.

https://wpml.org/errata/elementor-pro-custom-thank-you-page-not-displaying-in-second-language-when-woocommerce-endpoint-is-translated/

Also, increase the *MaxInputVars* of PHP settings to *10000* for better performance. Please check the following article for more details and contact your system admin/hosting provider to upgrade this configuration.

hidden link

--
Thanks!

Bigul

August 14, 2024 at 10:58 am #16069928

pavolS-4

Hi Bigul.

I created a full copy of eshop localy on my laptop and checked the problem. The workaround is not working because the order-received endpoint is not translated, contains the same slug for SK and EN mutation.

I found another problem. The finall url sent from woocommerce doesnt contains a language url atribute lang=en.

here is the modification of module.php, I did after your recommendation

public function get_order_received_endpoint_url( $url, $endpoint, $value ) {
$order_received_endpoint = get_option( 'woocommerce_checkout_order_received_endpoint', 'order-received' );

// WPML Workaround for compsupp-6790
if ( class_exists('Sitepress') ) {
$order_received_endpoint = apply_filters('wpml_translate_single_string', $order_received_endpoint, 'WP Endpoints', $order_received_endpoint );
}

if ( $order_received_endpoint === $endpoint ) {
$woocommerce_purchase_summary_page_id = get_option( 'elementor_woocommerce_purchase_summary_page_id' );
$order = wc_get_order( $value );

if ( $woocommerce_purchase_summary_page_id && $order ) {
$url = trailingslashit( trailingslashit( trailingslashit( get_permalink( $woocommerce_purchase_summary_page_id ) ) . $order_received_endpoint ) . $order->get_id() );
}
}

return $url;
}

Here is the method called form woocommerce to get order-received endpoint url located in wp_content/plugins/woocommerce/includes/class-wc-orderp.php. I found the problem here:

public function get_checkout_order_received_url() {
$order_received_url = wc_get_endpoint_url( 'order-received', $this->get_id(), wc_get_checkout_url() );
$order_received_url = add_query_arg( 'key', $this->get_order_key(), $order_received_url );

return apply_filters( 'woocommerce_get_checkout_order_received_url', $order_received_url, $this );
}

Maybe there is an configuration error in permalinks. I am using for translations url atribute /?lang=[lang]

many thanks

wpml_language_settings_url.png
qubit_permalinks.png
August 15, 2024 at 9:21 am #16073712

pavolS-4

Hi Bigul.

Its here a progress?

Please inform me.

BR,
Pavol

August 16, 2024 at 7:32 am #16077131

Prosenjit Barman
Supporter

Languages: English (English )

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

Hello Pavol,
I hope you're doing well. Sorry for the delay in responding.

I took this ticket and will try my best to assist you in this matter.

If you change the Language URL format to "Different languages in directories," does the issue still occur?

If the issue persists, please try the following steps to see if they resolve the problem:

1. Go to WooCommerce > WooCommerce Multilingual > Store URLs.
2. Translate the `order-received` endpoint. You can use the default slug or provide a translated slug.
3. Once completed, switch to the secondary language, English from your WordPress Dashboard, using the language switcher on the topbar of the Admin.
4. Correctly set up the Purchase Summary page in Elementor by following this guide: hidden link

Please let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

August 16, 2024 at 8:40 am #16077369

pavolS-4

Hi Prosenjit.

I tried your workaround, but without any change.

I tried to translate 'order-received' to slovak endpoint 'objednavka-prijata', didn help. I cant switch to another language url, because all translation link are corrected to this argument. Another reason is that I do not want to split trafic from audience form EN and SK to different urls.

Can we meet by zoom, or google meet? I can show you the whole problem, or I can create you a eshop clone.

I add you here screenshots.

Many thanks.

woocommerce_settings01.png
woocommerce_settings02.png
woocommerce_settings03.png
woocommerce_settings04.png
woocommerce_settings05.png
woocommerce_settings06.png
August 19, 2024 at 3:37 am #16081976

Prosenjit Barman
Supporter

Languages: English (English )

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

Hi There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

Thank you for trying out the suggestions. As the issue persists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

August 20, 2024 at 7:24 am #16085848

Prosenjit Barman
Supporter

Languages: English (English )

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

Hello There,
Thank you for sharing the access details.

I’ve checked and successfully resolved the issue on the staging site. The Summary page is now displaying correctly in the English version. You can refer to this screenshot(hidden link) for clarity.

The issue was primarily caused by an incorrect source language and translation for the `order-received` endpoint. To fix it, I:

- Navigated to string translation and searched for `order-received`.
- Changed the source language of the string to the default language, Slovak. Here’s how I did that: https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/
- Translated the `order-received` endpoint by adding `order-received-en` for English.
- Cleared the caches and completed the checkout process again.

Please make the same changes on your main site and I hope it will help. Feel free to let me know if you need further assistance or clarification. I will be happy to help.

Best regards,
Prosenjit

August 21, 2024 at 10:56 am #16090097

pavolS-4

Hi Prosenjit.

Sorry I cant reproduce your fix by the steps you described me.

I changed the source language of order-received to slovak and translated order-received to order-received-en. After I delete cache in wocoomerce tools by clicking delete cache in theme, I deleted transient. After all these steps I get the same scenario.

Meanwille my customer come with wish to translate all endpoint to slovak language. So I decided to let the endpoints in english and translate it in wpml string translation to slovak language. This process didnt solve problem.

I will prepare you new clone with all these changes.

Please investigate some time to solve this issue. I am just a little bit nervous, that this thing doenst work. I have freezed money in development until I solve this issue.

Please prepare me more detailed manual how to solve this problem.

Many thanks,

Pavol

August 22, 2024 at 4:37 am #16092544

Prosenjit Barman
Supporter

Languages: English (English )

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

Hi Pavol,

I'm sorry to hear that the changes didn't make a difference on your main site. However, these adjustments successfully fixed the display of the Order Summary page in English, which you can verify by testing on the site you've shared.

Since the adjustments didn't resolve the issue, I'm more than willing to take another look and recommend the next steps. Please share access to your main site or a new clone. I will create a video of the solution so you can see what needs to be adjusted to fix the issue.

The private box field is enabled for you to securely share the access.

Looking forward to your response and I'm always here to help.

Best regards,
Prosenjit

August 23, 2024 at 5:20 am #16097186

Prosenjit Barman
Supporter

Languages: English (English )

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

Hello Pavol,
Thank you for sharing the access.

I tried to access your site, but it now requires verification through a link sent to your email. Please see this screenshot for reference: hidden link

Could you please share the link with me so I can continue the investigation? The private box is enabled for you in case if you want to share the link securely.

Looking forward to your response.

Best regards,
Prosenjit

August 23, 2024 at 7:41 am #16097466

pavolS-4

Hi Prosenjit.

I temporary deactivated security plugin. Now you will have access without aditional authentication.

Pavol

August 26, 2024 at 5:04 am #16102315

Prosenjit Barman
Supporter

Languages: English (English )

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

Hello Pavol,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

Thank you for disabling the security. I've checked and successfully resolved the issue on the other site as well. However, I've noticed an issue with the "order-received" slug. It seems this slug is already being used elsewhere, which is causing the Order-review page to not work when I use the same slug for the order-received endpoint. Adjusting the slug slightly corrects the page display in English. Could you please check if this slug is being used elsewhere in the English version? If it's okay for you, you can continue using the modified slug.

For now, please check this hidden link">video to understand the adjustments I've made to ensure the Checkout Summary page functions correctly in English.

Please make the same adjustments on your main site and I hope it will help.

Feel free to let me know if you have any other question or need clarification. I will be happy to help.

Best regards,
Prosenjit

August 27, 2024 at 8:07 am #16107945

pavolS-4

Hi Prosenjit.

your workaround is working on main site. Problem is that after changing endpoints, we have problem with my account templates.

I send you links where the template replacing due wpml it is not working. In english mutation all links are shown correctly. In slovak mutation we have 3 url, we are templates not working:

(my account / my orders)
hidden link
- is getting 'woolentor môj účet' template, instead of 'Woolentor moje objednávky'

(my account / edit address)
hidden link
- is getting 'woolentor môj účet' template, instead of 'Woolentor adresy'

(my account / edit account)
hidden link
- is getting 'woolentor môj účet' template, instead of 'Woolentor detail účtu'

Name of taken template you see in 'Upraviť s Elementorom' (edit with elementor). I think main reason will be in endpoints translations.

All these template are created with shoplentor in admin menu -> template builder

I will clone actual main site and give you access.

Please help to solve this last issue.

Many thanks Pavol

shoplentor-templatebuilder.png
myaccount-myorders.png
myaccount-editaddress.png
myaccount-editaccount.png
August 28, 2024 at 5:26 am #16112449

Prosenjit Barman
Supporter

Languages: English (English )

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

Hello Pavol,
Thank you for the update.

Glad to hear that the solution helped on the main site.

Regarding the issue on the My-Account page, please note that translating the "order-received" endpoint or changing its language should not cause any issues with the My-Account endpoint. The "Order-received" endpoint is not related to the My Account section and should not impact its functionality.

It's possible that the conditions weren't applied correctly to the template you created in Woolentor, which might be causing the template to not function properly in the links you've shared.

Please review the Woolentor template and ensure that the conditions are correctly applied. If you suspect that modifying the endpoint caused the issue, please try reverting any changes you made to the My-Account endpoints and then check again.

If the issue persists after following these steps, I kindly request you to create a new ticket with as many details as possible. To maintain clarity in each thread, we handle one issue per ticket. Since the template issue differs from the main issue reported in this ticket, it would be best to create a new ticket and we can address the other issue separately. I hope you can understand.

Please don't hesitate to reach out if you need further assistance with the Purchase Summary page in English. I'll be happy to help.

Best regards,
Prosenjit

The topic ‘[Closed] Purchase summary not shown in EN lang mutation’ is closed to new replies.