Skip to content

WPML Fix: Switching language throws error on translated courses dashboard - #2956

Open
Anindra123 wants to merge 1 commit into
devfrom
wpml_fixes
Open

WPML Fix: Switching language throws error on translated courses dashboard#2956
Anindra123 wants to merge 1 commit into
devfrom
wpml_fixes

Conversation

@Anindra123

@Anindra123 Anindra123 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator
  • Translated course if enrolled shows on both main dashboard and other language dashboard when language is switched, but since there is no course progress it was throwing error as the $result returned is 0 on get_course_completed_percent and it does not find the key completed_percent, to fix this i have checked if result is 0 and is get_stat is called then return the default stats array with all key value being 0

  • Another issue was in get_enrolled_courses_by_user if the post id is not matched , the new_array remains empty and this modifies the WP_Query->posts array and the the_post() call returns null which is throwing error, to fix this i have checked if the new_array is empty so that it does not modify the posts array with empty array

https://app.clickup.com/t/9018365849/z8zyy1c5p2

@Anindra123
Anindra123 requested a review from shewa12 August 12, 2026 11:07
@Anindra123 Anindra123 added the 4.0.6 Tutor v4.0.6 label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0.6 Tutor v4.0.6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant