From 02bde6c33d7b86236d1c8d75d7c4d1c264bbed19 Mon Sep 17 00:00:00 2001 From: Claudiu Filip Date: Fri, 25 Oct 2024 16:02:37 +0300 Subject: [PATCH 1/2] Add site_partner_bundle option to the sites endpoint response --- .../class.wpcom-json-api-get-site-endpoint.php | 4 ++++ .../plugins/jetpack/sal/class.json-api-site-base.php | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php b/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php index aaa513c86c108..1b844326cd2d1 100644 --- a/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php +++ b/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php @@ -204,6 +204,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint { 'videopress_storage_used', 'is_difm_lite_in_progress', 'site_intent', + 'site_partner_bundle', 'site_goals', 'onboarding_segment', 'site_vertical_id', @@ -878,6 +879,9 @@ protected function render_option_keys( &$options_response_keys ) { case 'site_intent': $options[ $key ] = $site->get_site_intent(); break; + case 'site_partner_bundle': + $options[ $key ] = $site->get_site_partner_bundle(); + break; case 'site_goals': $options[ $key ] = $site->get_site_goals(); break; diff --git a/projects/plugins/jetpack/sal/class.json-api-site-base.php b/projects/plugins/jetpack/sal/class.json-api-site-base.php index ea2342955e33f..0a0e899cc691b 100644 --- a/projects/plugins/jetpack/sal/class.json-api-site-base.php +++ b/projects/plugins/jetpack/sal/class.json-api-site-base.php @@ -1520,6 +1520,15 @@ public function get_site_intent() { return get_option( 'site_intent', '' ); } + /** + * Get the option of site partner bundle which value is coming from the Partner Flow + * + * @return string + */ + public function get_site_partner_bundle() { + return get_option( 'site_partner_bundle', '' ); + } + /** * Get site option to determine if and how to display launchpad onboarding * From b251e4792565aef59b2c2fa1c082e359d113f67e Mon Sep 17 00:00:00 2001 From: Claudiu Filip Date: Fri, 25 Oct 2024 16:05:02 +0300 Subject: [PATCH 2/2] changelog --- .../jetpack/changelog/add-site-partner-bundle-blog-option | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/plugins/jetpack/changelog/add-site-partner-bundle-blog-option diff --git a/projects/plugins/jetpack/changelog/add-site-partner-bundle-blog-option b/projects/plugins/jetpack/changelog/add-site-partner-bundle-blog-option new file mode 100644 index 0000000000000..6b1f9e941bc0e --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-site-partner-bundle-blog-option @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Add site_partner_bundle option to Sites API response.