diff --git a/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php b/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php index ed2f725fea882..df9332be3b482 100644 --- a/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php +++ b/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php @@ -964,6 +964,12 @@ private function _process_onboarding( $data ) { $site_title = get_option( 'blogname' ); $author = get_current_user_id() || 1; + if ( ! empty( $data['siteType'] ) ) { + if ( ! ( update_option( 'jpo_site_type', $data['siteType'] ) || get_option( 'jpo_site_type' ) == $data['siteType'] ) ) { + $error[] = 'siteType'; + } + } + // If $data['homepageFormat'] is 'posts', we have nothing to do since it's WordPress' default if ( isset( $data['homepageFormat'] ) && 'page' === $data['homepageFormat'] ) { if ( ! ( update_option( 'show_on_front', 'page' ) || get_option( 'show_on_front' ) == 'page' ) ) { diff --git a/class.jetpack-options.php b/class.jetpack-options.php index cf0a44447b3fc..ba1aef63d0dde 100644 --- a/class.jetpack-options.php +++ b/class.jetpack-options.php @@ -533,6 +533,7 @@ static function get_all_wp_options() { 'jetpack_sso_require_two_step', 'jetpack_sso_remove_login_form', 'jetpack_last_connect_url_check', + 'jpo_site_type', ); }