Skip to content Skip to sidebar

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 0 voices.

Last updated by George Botsev 9 months, 2 weeks ago.

Author Posts
July 6, 2025 at 1:09 pm #17204922

cristinaM-43

Background of the issue:
I am trying to make the WooCommerce 'Order Received' page load correctly in Italian (and English) after a customer completes an order. I’ve already opened a detailed thread here with all the troubleshooting steps I’ve taken: https://wordpress.org/support/topic/woocommerce-order-received-page-returns-404/. As a temporary workaround, I added code to functions.php to load the thank-you template manually. The code is: /** * If we're on the 'riepilogo-ordine' page and ?order-received=ID is present, * load the order confirmation template instead of the checkout form. */ add_action( 'template_redirect', function() { if ( is_page( 'riepilogo-ordine' ) && get_query_var( 'order-received' ) ) { $order_id = absint( get_query_var( 'order-received' ) ); if ( $order = wc_get_order( $order_id ) ) { wc_get_template( 'checkout/thankyou.php', array( 'order' => $order ) ); exit; } } }); Link to a page where the issue can be seen: hidden link.

Symptoms:
The confirmation URL in Italian (/riepilogo-ordine/ordine-ricevuto/...) returns a 404 error. The issue disappears on a staging site when WPML Multilingual & Multicurrency is deactivated. On the live site, deactivating the plugin doesn’t fix the issue. I expected to see the standard WooCommerce thank-you page with full site styling and layout. Instead, I got a 404 error (before workaround), or now a raw, unstyled page due to manually loading the thank you template via wc_get_template().

Questions:
Why does the 'Order Received' page return a 404 error in Italian?
How can I ensure the thank-you page displays with full site styling and layout?

July 8, 2025 at 2:56 pm #17214847

George Botsev

Hello!
Please check the endpoint registered in WPML > String Translation when you filter by domain "WP Endpoints" -> /wp-admin/admin.php?page=wpml-string-translation%2Fmenu%2Fstring-translation.php&context=WP+Endpoints

Make sure that your endpoint is not registered twice or twice in different language - as this might create the issue that you are describing.
You could probably take a backup of your site (to be on the safe side) and remove the strings related to "order-received" endpoint and re-visit your site and then re-translate (if needed change string language and re-translate) and it should work, if that was the issue.

The topic ‘[Closed] WooCommerce Order Received Page Returns 404 due to WPML Multilingual & Multicurrency’ is closed to new replies.