Skip to content

Commit

Permalink
Launchpad: disable launch site task on already launched sites (#41327)
Browse files Browse the repository at this point in the history
Disable launch site task if site is already launched

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12997789796

Upstream-Ref: Automattic/jetpack@f7def13
  • Loading branch information
p-jackson authored and matticbot committed Jan 27, 2025
1 parent bf0b39e commit 3488495
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 89 deletions.
60 changes: 30 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions jetpack_vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This is an alpha version! The changes listed here are not final.
- Admin Bar: Point the Edit Site menu item to /site-editor.php
- Code: Use function-style exit() and die() with a default status code of 0.
- Coming Soon: Add more checks to the ETK version comparison.
- Launchpad: Launch site task disabled for launched sites
- Remove duplicate views: Enhance notices
- Render the Global Styles frontend bar separately from the .com launch bar.
- Update background pattern image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ function wpcom_launchpad_get_task_definitions() {
},
'isLaunchTask' => true,
'is_complete_callback' => 'wpcom_launchpad_is_site_launched',
'is_disabled_callback' => 'wpcom_launchpad_is_site_launched_disabled',
'add_listener_callback' => 'wpcom_launchpad_add_site_launch_listener',
),
'verify_email' => array(
Expand Down Expand Up @@ -908,6 +909,15 @@ function wpcom_launchpad_is_site_launched( $task, $is_complete ) {
}
}

/**
* Disabled when the site is already launched.
*
* @return boolean
*/
function wpcom_launchpad_is_site_launched_disabled() {
return 'launched' === get_option( 'launch-status' );
}

/**
* Returns true if one of the site's WooCommerce tasks is complete.
*
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
),
'jetpack-mu-wpcom' => array(
'path' => 'jetpack_vendor/automattic/jetpack-mu-wpcom',
'ver' => '6.2.0-alpha1737997918',
'ver' => '6.2.0-alpha1738009945',
),
'jetpack-password-checker' => array(
'path' => 'jetpack_vendor/automattic/jetpack-password-checker',
Expand Down
Loading

0 comments on commit 3488495

Please sign in to comment.