This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're experiencing issues where the 'My Account > My Courses' page only works in English and redirects to the 'My Account' page in other languages, it might be due to incorrect URL handling in your custom theme.
Solution:
We recommend checking the
functions.php
file in your theme. Specifically, look for the function that customizes the WooCommerce menu on the 'My Account' page. You might find that the URL is hardcoded to 'my-account/my-courses', which does not account for language variations. Replace:
echo esc_url( home_url( 'my-account/my-courses' ) );
with:
echo wc_get_account_endpoint_url( 'my-courses' );
This change should correct the URL to reflect the appropriate language-specific endpoint. Please ensure to backup your database and website before making any changes.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, 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 further assistance is needed, please open a new support ticket at WPML support forum.
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 2 replies, has 0 voices.
Last updated by 2 weeks, 1 day ago.
Assisted by: Long Nguyen.


