Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where the 'Shopping cart', 'Checkout details', 'Order complete' breadcrumbs are missing on the Portuguese version of their site, while they appear as expected on the original English site.
Solution:
We recommend checking the slug of the secondary language checkout pages. If you change the slug to checkout, it should resolve the issue. This problem occurs because the theme checks for specific slugs, and when these slugs are translated, it fails to recognize them. Here is an example of how the theme handles breadcrumbs:

function flatsome_checkout_breadcrumb_class( $endpoint ) {
	$classes = array();
	if ( $endpoint == 'cart' && is_cart() ||
		 $endpoint == 'checkout' && is_checkout() && ! is_wc_endpoint_url( 'order-received' ) ||
		 $endpoint == 'order-received' && is_wc_endpoint_url( 'order-received' ) ) {
		$classes[] = 'current';
	} else {
		$classes[] = 'hide-for-small';
	}

	return implode( ' ', $classes );
}

Additionally, ensure that your theme, in this case, Flatsome, is updated to the latest version as an outdated theme can also cause such issues.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.

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.

Our next available supporter will start replying to tickets in about 5.68 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 9 replies, has 3 voices.

Last updated by Shekhar Bhandari 3 months ago.

Assisted by: Shekhar Bhandari.

Author Posts
June 26, 2024 at 7:43 am

filipC-6

Background of the issue:
I am trying to: So the 'Shopping cart', 'Checkout details', 'Order complete' breadcrumbs are missing on the second language page. On the original English site they are working as intended, but they are not there on the Portuguese version of the site. Any ideas what could be the issue? Link to a page where the issue can be seen: hidden link

Symptoms:
The 'Shopping cart', 'Checkout details', 'Order complete' breadcrumbs are not showing on the Portuguese version of the site, while they are working as intended on the original English site.

Questions:
Why are the breadcrumbs not showing on the Portuguese version of the site?
How can I fix the issue with the missing breadcrumbs on the second language page?

June 26, 2024 at 9:05 am
June 26, 2024 at 9:05 am #15831715

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

1. Please login to the fresh WP site by clicking on the auto login URL: hidden link

2. Please install the Flatsome theme and configure configure it as you did on your site.

3. Please create a test product and see if the issue still persists.

Please note that we only need above mentioned theme functionality, you don't need to set up an entire website or clone your existing site. You can see more details here: https://wpml.org/faq/how-to-reproduce-issues-and-share-them-with-wpml-support/

Please let me know the results,
Thank you

July 3, 2024 at 8:21 am #15882132

filipC-6

So i set up the dummy site, and I tried to translate the Checkout site, because that is the one that we are having issues with, and I came to the same exact problem.

If we click the Portuguese language in the footer for the checkout site, the checkout breadcrumbs are gone. Can you see it at your end?

Képernyőkép 2024-07-03 102000.png
Képernyőkép 2024-07-03 101938.png
July 5, 2024 at 7:01 am #15896591

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Noman is on vacation so I am taking care of this ticket. I hope that's okay.

If you go to Dashboard->Pages and change the slug of the secondary language checkout pages to checkout it works, hidden link

This is happening because theme is checking for specific slugs and since slugs are translated, it's not working:
hidden link

function flatsome_checkout_breadcrumb_class( $endpoint ) {
	$classes = array();
	if ( $endpoint == 'cart' && is_cart() ||
		 $endpoint == 'checkout' && is_checkout() && ! is_wc_endpoint_url( 'order-received' ) ||
		 $endpoint == 'order-received' && is_wc_endpoint_url( 'order-received' ) ) {
		$classes[] = 'current';
	} else {
		$classes[] = 'hide-for-small';
	}

	return implode( ' ', $classes );
}

I also noticed that you are using an oudated version of the flatsome theme, so can you update the theme to the latest version and see if it helps.

Look forward to your reply.

Thanks

July 5, 2024 at 1:20 pm #15898759

filipC-6

I tried doing that on the original site and then the site just becomes 404, I am not sure why?

I updated the site to the latest version.

July 8, 2024 at 4:25 am #15909401

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Strange, can you provide me login details of the live site?

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

July 8, 2024 at 7:36 am #15910542

filipC-6

The login details are in the first message of the post in the "Private message".

July 8, 2024 at 7:42 am #15910606

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello

I just changed the slug to hidden link and it's working, can you confirm this?

To do this:
- I went to Dashboard->Pages
- Changed the language from top-bar to PT
- Quick edit the checkout page and changed the slug.

Look forward to your reply.

Thanks

July 8, 2024 at 8:41 am #15911133

filipC-6

Okay it seems it works on the Checkout page, but on the Cart page it is still missing for the Portuguese language. Is it the same at your end?

Edit: Nevermind, I fixed it the same way that you explained for the cart as well, now the question is what is the easiest way to translate these strings for the portuguese language?

July 8, 2024 at 10:13 am #15912233

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Please follow the below steps:

- Go to WPML->Strings Translations->Auto Register strings for translations
- Enable the "Look for strings while pages are rendered" option
- Now visit the page on front-end where the string is shown, this will automatically register strings from that page
- Now go to WPML->Strings Translations->Auto Register strings for translations and disable the options
- Search for the strings in WPML->String Translations and translate it

Let me know if this helps.

Thanks

July 8, 2024 at 10:28 am #15912317

filipC-6

Thank you very much, that pretty much solved it!

Also thank you Shekhar for a very quick response as well!

filipC-6 confirmed that the issue was resolved on 2024-07-08 10:28:08.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.