Skip to content

Commit

Permalink
Fix logic for disabling lys task on trial sites
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasfoo committed Sep 10, 2024
1 parent 6b6c4ff commit c1672e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions includes/class-wc-calypso-bridge-setup-tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ public function replace_tasks( $lists ) {
unset( $lists['setup']->tasks[$index] );
break;
case 'launch-your-store':
if ( wc_calypso_bridge_is_trial_plan() ) {
// Don't show launch your store task for trial sites.
unset( $lists['setup']->tasks[$index] );
}
if ( $ecommerce_custom_setup_tasks_enabled ) {
// Append add domain task before launch your store task.
require_once __DIR__ . '/tasks/class-wc-calypso-task-add-domain.php';
Expand All @@ -128,9 +132,6 @@ public function replace_tasks( $lists ) {
$launch_site_task = new \Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\LaunchSite( $lists['setup'] );
$lists['setup']->tasks[$index + 1] = $launch_site_task;
}
} else if ( wc_calypso_bridge_is_trial_plan() ) {
// Don't show launch your store task for trial sites.
unset( $lists['setup']->tasks[$index] );
}
break;
}
Expand Down

0 comments on commit c1672e4

Please sign in to comment.