-
Notifications
You must be signed in to change notification settings - Fork 4
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 conditional check to replace launch-site task with LYS task #1509
Add conditional check to replace launch-site task with LYS task #1509
Conversation
62d7e30
to
a7507f1
Compare
…apply proper sorting
Size Change: 0 B Total Size: 201 kB ℹ️ View Unchanged
|
*/ | ||
public function add_tasks() { |
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.
Entirely merged this function into replace_tasks
if ( ! Features::is_enabled( 'launch-your-store' ) ) { | ||
require_once WC_CALYPSO_BRIDGE_PLUGIN_PATH . '/includes/tasks/class-wc-calypso-task-launch-site.php'; | ||
$launch_site_task = new \Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\LaunchSite( $lists['setup'] ); | ||
$lists['setup']->tasks[$index + 1] = $launch_site_task; |
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.
$index + 1
because index was bumped up since we added domain task above
@ilyasfoo Can you explain this further? Do you mean leave them uncommented or set If the feature flag is set to true, then I get the same results as the first section, which makes sense. If I leave that code as-is, I get the following: |
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.
LGTM and tested well! 👍
…-launch-site-task-with-lys
@psealock Good question! This is expected. The |
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.
Thanks for the clarification @ilyasfoo, this is all working well then. 🚢
Changes proposed in this Pull Request:
Closes #1497
launch-site
task with LYS task when LYS feature is enabled.add_tasks
function toreplace_tasks
to consolidate logic and enable easier tasks sortingI decided to skip adding a redirect from
/wp-admin/admin.php?page=wc-admin&task=launch_site
because it doesn't seem to be a simple endeavour and it only serves a tiny edge case like users having the link opened.This PR does not handle free trial detection yet.
How to test the changes in this Pull Request:
Test LYS feature enabled
true
).launch-site
task is hiddenAdd a domain
taskTest LYS feature disabled
false
).launch-site
task is displayed and LYS task is hiddenlaunch-site
task is displayed afterAdd a domain
taskOther information:
FOR PR REVIEWER ONLY: