Fix course item templates with custom course layouts - #637
Open
mauropereiira wants to merge 1 commit into
Open
Conversation
Collaborator
|
Hi mauropereiira, Thank you for sharing your feedback. Our team is currently investigating the issue, and we will update you as soon as it is resolved. Kind regards! |
Collaborator
|
Hi @mauropereiira , Thank you for your feedback. We have fixed this issue in version 4.4.5. Please update your plugin, check if everything works properly, and let us know if you need any further assistance. Best regards, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Clear competing block-template candidates after LearnPress confirms that the request is for a course item. The existing
SingleCourseItemBlockTemplateis then the only candidate for lesson and quiz routes.Why
A course-level custom template appears first in WordPress's single-template hierarchy. LearnPress previously appended its item template without removing that higher-priority course template, so lesson and quiz URLs rendered the course overview. LearnPress still added
course-item-popup, leaving the page unable to scroll normally.Course overview requests do not enter this branch, so their assigned custom templates remain unchanged. Custom
single-lp_course_itemtemplates are still loaded into the item template before it is appended.Closes #636
Testing
Tested with WordPress 7.0.3, LearnPress 4.4.4, PHP 8.4, Assembler 0.0.29, and Twenty Twenty-Five 1.5.
Also verified:
phpcs --standard=phpcs.xml inc/Gutenberg/GutenbergHandleMain.phpphp -l inc/Gutenberg/GutenbergHandleMain.phpgit diff --checkThe full PHPUnit suite was attempted on the current
developbranch but does not complete because existing tests reference missing subscription files and later redeclarelearn_press_get_order().