Skip to content

Commit

Permalink
Launchpad: Update is_enabled_callback for Keep Building checklist (#3…
Browse files Browse the repository at this point in the history
…1623)

* [not verified] Only enable Keep Building if the site has launched.

* changelog

* Update with a comment to explain why we're not checking the other launch statuses
  • Loading branch information
sixhours committed Jul 3, 2023
1 parent a081662 commit 2285799
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: changed

Update keep building task list visibility logic to check if a site is launched
Original file line number Diff line number Diff line change
Expand Up @@ -562,10 +562,14 @@ function wpcom_get_launchpad_task_list_is_enabled( $checklist_slug ) {
* @return bool True if the task list is enabled, false otherwise.
*/
function wpcom_launchpad_is_keep_building_enabled() {
$intent = get_option( 'site_intent', false );
$blog_id = get_current_blog_id();
$intent = get_option( 'site_intent', false );
$launchpad_task_statuses = get_option( 'launchpad_checklist_tasks_statuses', array() );

if ( 'build' === $intent && $blog_id > 220443356 ) {
// We don't care about the other *_launched tasks, since this is specific to the Build flow.
$launched = isset( $launchpad_task_statuses['site_launched'] ) && $launchpad_task_statuses['site_launched'];
$blog_id = get_current_blog_id();

if ( 'build' === $intent && $blog_id > 220443356 && $launched ) {
return true;
}

Expand Down

0 comments on commit 2285799

Please sign in to comment.