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.

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)

Tagged: 

This topic contains 4 replies, has 1 voice.

Last updated by Prosenjit Barman 3 weeks, 6 days ago.

Assisted by: Prosenjit Barman.

Author Posts
April 9, 2026 at 8:22 pm #17960621

markL-59

My website pducredits.com i.e. custom developed LMS n wordpress. My customers getting issue when purchasing the course while the German or SPanish language slected because after pourchasing the post id change is there any solution. because what i found is the post id in english is different and when other language selected it is changed so the purchased course cannot get into the exam page after purchase and if i purchase it in normal english language then no issue. Please resolve it ASAP

April 9, 2026 at 8:54 pm #17960702

markL-59

Still the issue not resolved

April 10, 2026 at 9:33 am #17961765

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hi Mark,

Thank you for contacting WPML Support. I'm Prosenjit from the WPML Development Team and I'll be happy to assist you.

I checked the conversation and ticket description and from what you described, the purchase itself is working correctly in German, Spanish, and the other languages. The problem starts after the purchase, when the user goes to your custom “My Account” section and clicks “View Course”. Instead of opening the user’s actual course material page, it opens the normal pre-purchase course page.

What you found regarding the course ID is expected in WPML. When content is translated, WPML creates connected translations as separate posts, so the English course and the German or Spanish course will normally have different post IDs. This is standard multilingual behavior.
Because of this, any custom LMS code that:

- stores the purchased course ID
- compares course IDs
- checks course access
- builds the “View Course” link

must be compatible with WPML and must retrieve the correct translated course ID and URL for the current language.

At the moment, the issue appears to be in the custom LMS/My Account logic, not in the WPML purchase process itself. Most likely, the custom code is still using the original English course ID or permalink when the customer is browsing in German or Spanish. As a result, the user is redirected to the wrong version of the course page.

To make this work correctly, the custom code should be reviewed by your developer and adjusted to use WPML’s language-aware hooks when retrieving course IDs and links. In particular, the developer should check the code that generates the purchased course list and the “View Course” button/link and ensure it uses the appropriate WPML filters such as:

- wpml_object_id to get the correct translated course ID
- wpml_permalink or wpml_element_link to generate the correct language-specific URL

Please check our WPML Hook guide for more details about the available Hooks/Filters: https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

As an additional test, you may also try changing the translation preference of the course post type to: Translatable - use translation if available or fallback to default language

This will make the courses available in all languages without translation. This can sometimes help in setups where the custom code is sensitive to translated content behavior. However, I want to set expectations clearly: this is only a test and not a guaranteed fix if the custom LMS code is directly relying on English IDs or hardcoded URLs.

Since this part of the functionality is coming from a custom-developed LMS and a custom My Account implementation, we are limited to providing WPML compatibility guidance rather than rewriting that custom code directly. However, the issue does appear technically clear: the custom code needs to load the proper translated course and link for the active language.

I hope that makes sense. If anything above needs clarification, please feel free to let me know. I’ll be happy to help.

Best regards,
Prosenjit

April 17, 2026 at 12:42 am #17975626

markL-59

Thank you. There is also an issue with the categories. Each course has a category of "uncategorized", "exam prep" or "bundle" (in English), so the courses show up on one of those three webpages. Many different categories have been created in different languages and not all the courses are showing up on the proper webpage in different languages.

I've thought of reposting the courses, but I dont want to change the course numbers since some customers have already purchased them.

Also, I cant seem to change the category for courses on sale. That is in English also so likely not a WPML issue.

Any advice is appreciated.

April 17, 2026 at 11:25 am #17976696

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hi there,

Thank you for sharing the details!

Since I’m not fully familiar with how courses are structured in your custom LMS, I’ll do my best to guide you based on the context and the behavior you described.

From what I understand, you have different categories in different languages, but not all translated categories are showing the expected courses. Based on that, one likely reason is that the course-category relationship may not be fully synchronized across translations.

A good first step would be to try synchronizing the course taxonomies:

- Go to WPML > Support > Troubleshooting
- In the Cleanup section, select the Course post type from the dropdown
Click on Synchronize post taxonomies

Please wait until the process is fully completed, then check again to see whether the courses now appear correctly in the translated categories.

Another thing to keep in mind is the timing of when the translations were created.

Sometimes this can happen if:

- the course was translated first
- and the category was created or assigned later in the default language

In that case, the translated course may not automatically pick up the translated category assignment. If that happened, you may need to update the course translation as well so the correct translated category can be assigned properly.

So in short, the most likely cause here looks like a category synchronization issue.

That said, since this is a custom LMS, the exact data structure and workflow are not fully known to me, so I can only provide general WPML guidance here. It would also be a good idea to:

- Open the translated courses in the editor and confirm that the correct translated category is actually assigned
- Check with the custom LMS developer how courses and categories are linked internally
- Make sure that relationship is being handled properly in a multilingual setup, especially through the WPML hooks/filters I shared in my previous reply

If the translated category is not actually assigned to the translated course, then the course will not appear in that category archive.

I hope this helps clarify the likely cause and gives you a good direction to test.

Please feel free to let me know if you have any questions or need any clarification — I’ll be happy to help further.

Best regards,
Prosenjit

The topic ‘[Closed] My website pducredits.com i.e. custom developed LMS n wordpress. My customers getting issue when pur…’ is closed to new replies.