-
Notifications
You must be signed in to change notification settings - Fork 199
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 hook to conditionally show the lesson actions block in the frontend #7677
Add hook to conditionally show the lesson actions block in the frontend #7677
Conversation
Test the previous changes of this PR with WordPress Playground. |
@@ -1358,6 +1358,21 @@ public function testShouldShowLessonActions_WhenPrerequisiteFoundAndWasNotLesson | |||
self::assertFalse( $result ); | |||
} | |||
|
|||
public function testShouldShowLessonActions_WhenHookSetsFalce_ReturnsFalse(): void { |
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.
This test case name is somewhat misleading. In particular, the WhenHookSetsFalse
part because in this test case we're testing both true
and false
. We could split these into 2 separate use cases to test each since there isn't much repetitive setup code.
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.
Looks good. I added a small comment about the tests though.
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
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.
🚀
Resolves https://github.com/Automattic/sensei-pro/issues/1956 (partial)
Proposed Changes
We've added a hook here which will allow us to conditionally render the lesson actions block in the frontend from elsewhere (i.e. Sensei-pro)
Testing Instructions
New/Updated Hooks
Pre-Merge Checklist