Skip to content

Commit

Permalink
Lanchpad: Customization hooks: Make more resilient (#33923)
Browse files Browse the repository at this point in the history
* Lanchpad: Customization hooks: Make more resilient
* changelog
* Bump version

---------

Co-authored-by: Dale du Preez <dale@automattic.com>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/6731261261
  • Loading branch information
daledupreez authored and matticbot committed Nov 2, 2023
1 parent 0e78e0e commit 7d44f0a
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "wordpress-plugin",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-mu-wpcom": "^4.16.1"
"automattic/jetpack-mu-wpcom": "^4.16.2-alpha"
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
Expand Down
8 changes: 4 additions & 4 deletions composer.lock

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

8 changes: 8 additions & 0 deletions vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.16.2-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Fixed
- Launchpad hooks: Made more resilient against non-array values

## [4.16.1] - 2023-10-31
### Fixed
- Clicking on the 'Choose a plan' task would not redirect to the plans page. [#33872]
Expand Down Expand Up @@ -414,6 +421,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Testing initial package release.

[4.16.2-alpha]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v4.16.1...v4.16.2-alpha
[4.16.1]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v4.16.0...v4.16.1
[4.16.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v4.15.1...v4.16.0
[4.15.1]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v4.15.0...v4.15.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class Jetpack_Mu_Wpcom {

const PACKAGE_VERSION = '4.16.1';
const PACKAGE_VERSION = '4.16.2-alpha';
const PKG_DIR = __DIR__ . '/../';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1702,13 +1702,15 @@ function wpcom_launchpad_is_edit_page_task_visible() {
* if the subscription_options['invitation'] value
* for the welcome message has changed on option update.
*
* @param string $old_value The old value of the welcome message.
* @param string $value The new value of the welcome message.
* @param mixed $old_value The old value of the welcome message.
* @param mixed $value The new value of the welcome message.
*
* @return void
*/
function wpcom_launchpad_mark_customize_welcome_message_complete_on_update( $old_value, $value ) {
if ( $value['invitation'] !== $old_value['invitation'] ) {
$new_invitation = is_array( $value ) && isset( $value['invitation'] ) ? $value['invitation'] : '';
$old_invitation = is_array( $old_value ) && isset( $old_value['invitation'] ) ? $old_value['invitation'] : '';
if ( $new_invitation !== $old_invitation ) {
wpcom_mark_launchpad_task_complete( 'customize_welcome_message' );
}
}
Expand All @@ -1719,12 +1721,12 @@ function wpcom_launchpad_mark_customize_welcome_message_complete_on_update( $old
* if the subscription_options['invitation'] value
* for the welcome message has been added.
*
* @param string $value The value of the welcome message.
* @param mixed $value The value of the welcome message.
*
* @return void
*/
function wpcom_launchpad_mark_customize_welcome_message_complete_on_add( $value ) {
if ( $value['invitation'] ) {
if ( is_array( $value ) && $value['invitation'] ) {
wpcom_mark_launchpad_task_complete( 'customize_welcome_message' );
}
}
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"packages": [
{
"name": "automattic/jetpack-mu-wpcom",
"version": "4.16.1",
"version_normalized": "4.16.1.0",
"version": "4.16.2-alpha.1698920672",
"version_normalized": "4.16.2.0-alpha1698920672",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-mu-wpcom",
"reference": "53089b4c61704de508eb019982657f8399854679"
"reference": "635abaa77b6c4f70ab9c045802dff143e336923e"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
),
'versions' => array(
'automattic/jetpack-mu-wpcom' => array(
'pretty_version' => '4.16.1',
'version' => '4.16.1.0',
'reference' => '53089b4c61704de508eb019982657f8399854679',
'pretty_version' => '4.16.2-alpha.1698920672',
'version' => '4.16.2.0-alpha1698920672',
'reference' => '635abaa77b6c4f70ab9c045802dff143e336923e',
'type' => 'jetpack-library',
'install_path' => __DIR__ . '/../automattic/jetpack-mu-wpcom',
'aliases' => array(),
Expand Down

0 comments on commit 7d44f0a

Please sign in to comment.