New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add translations for lessons and quizzes that were created while saving the course structure #7383
Conversation
…ng the course structure
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## trunk #7383 +/- ##
============================================
+ Coverage 50.94% 51.21% +0.26%
- Complexity 11149 11184 +35
============================================
Files 613 614 +1
Lines 47062 47214 +152
Branches 404 405 +1
============================================
+ Hits 23975 24179 +204
+ Misses 22760 22708 -52
Partials 327 327
... and 26 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem is solved. 👍🏻 Left a few comments. Feel free to merge after addressing.
Resolves #6978
When we create a lesson or a quiz while saving the course structure, the translation is not created in WPML. Unfortunately, I didn't find why it works that way specifically for this case: if you create a course or a lesson in UI, everything work fine. I suppose it might happen with loading meta boxes or saving data from them.
Proposed Changes
Testing Instructions
SELECT * FROM wp_icl_translations WHERE element_id=7686; -- 7686 is Lesson ID
New/Updated Hooks
sensei_course_structure_lesson_created
- Fires after a lesson is created while saving the course structure.sensei_course_structure_quiz_created
- Fires after a quiz is created while saving the course structure.Pre-Merge Checklist