-
Notifications
You must be signed in to change notification settings - Fork 197
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 woothemes-sensei detection to the extensions API #5282
Conversation
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.
Just a few useful comments to understand the code better.
Codecov Report
@@ Coverage Diff @@
## trunk #5282 +/- ##
=========================================
Coverage 40.75% 40.75%
Complexity 8616 8616
=========================================
Files 284 284
Lines 29042 29042
=========================================
Hits 11837 11837
Misses 17205 17205 Continue to review full report at Codecov.
|
const replaces = {}; | ||
|
||
if ( wizardData.title ) { | ||
replaces[ 'sensei-content-title' ] = wizardData.title; | ||
} | ||
|
||
const isSenseiProActivated = | ||
! senseiProExtension || senseiProExtension.is_activated === true; | ||
const isSenseiProActivated = useHideEditorWizardUpsell(); |
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.
Could we update the variable naming to match the logic? So instead of isSenseiProActivated
maybe we use shouldHideEditorWizardUpsell
? (Also in the Course wizard below)
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.
Sure, fixed in 6ef29d3.
Co-authored-by: Alex Sanford <alex.sanford1@gmail.com>
c3b049b
to
6ef29d3
Compare
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.
It works! 🎉
Changes proposed in this Pull Request
Testing instructions
woothemes-sensei
based on this branch;/wp-admin/edit.php?post_type=course&page=sensei-extensions
;I also recommend testing in another WordPress installation to check if both upsells don't appear when Sensei LMS (based on this branch) + Sensei Pro is installed and activated.