diff --git a/projects/plugins/jetpack/_inc/client/state/recommendations/reducer.js b/projects/plugins/jetpack/_inc/client/state/recommendations/reducer.js index 8428422874877..b6b4e22c3870c 100644 --- a/projects/plugins/jetpack/_inc/client/state/recommendations/reducer.js +++ b/projects/plugins/jetpack/_inc/client/state/recommendations/reducer.js @@ -296,7 +296,7 @@ export const getDataByKey = ( state, key ) => { const stepToNextStep = { 'setup-wizard-completed': 'summary', - 'banner-completed': 'woocommerce', + 'banner-completed': 'agency', 'not-started': 'site-type-question', 'site-type-question': 'agency', agency: 'woocommerce', diff --git a/projects/plugins/jetpack/_inc/jetpack-recommendations-banner.js b/projects/plugins/jetpack/_inc/jetpack-recommendations-banner.js index 142789f09a3bd..5ef6f32b83bb4 100644 --- a/projects/plugins/jetpack/_inc/jetpack-recommendations-banner.js +++ b/projects/plugins/jetpack/_inc/jetpack-recommendations-banner.js @@ -22,21 +22,19 @@ } ); recommendationsBannerContinue.on( 'click', function () { - var fieldNames = [ 'personal', 'business', 'store', 'other' ]; + var fieldNames = [ 'builder', 'store', 'personal' ]; var formData = {}; fieldNames.forEach( function ( name ) { formData[ name ] = $( "input[name='" + name + "']" ).prop( 'checked' ); } ); - $.post( jp_banner.ajax_url, { action: 'jetpack_recommendations_banner', nonce: jp_banner.nonce, personal: formData.personal, - business: formData.business, + builder: formData.builder, store: formData.store, - other: formData.other, }, function ( response ) { if ( true === response.success ) { diff --git a/projects/plugins/jetpack/changelog/update-site-type-question-on-wp-admin-home b/projects/plugins/jetpack/changelog/update-site-type-question-on-wp-admin-home new file mode 100644 index 0000000000000..1a7ce216052e4 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-site-type-question-on-wp-admin-home @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +Update site-type question on wp-admin banner diff --git a/projects/plugins/jetpack/class-jetpack-recommendations-banner.php b/projects/plugins/jetpack/class-jetpack-recommendations-banner.php index 0d0aa6d1e2e04..782e0efce4f9a 100644 --- a/projects/plugins/jetpack/class-jetpack-recommendations-banner.php +++ b/projects/plugins/jetpack/class-jetpack-recommendations-banner.php @@ -129,10 +129,10 @@ public static function ajax_callback() { $tracking_answers['personal'] = $value; } - if ( isset( $_REQUEST['agency'] ) && is_string( $_REQUEST['agency'] ) ) { - $value = 'true' === $_REQUEST['agency'] ? true : false; - $data['site-type-agency'] = $value; - $tracking_answers['agency'] = $value; + if ( isset( $_REQUEST['builder'] ) && is_string( $_REQUEST['builder'] ) ) { + $value = 'true' === $_REQUEST['builder'] ? true : false; + $data['site-type-agency'] = $value; + $tracking_answers['builder'] = $value; } if ( isset( $_REQUEST['store'] ) && is_string( $_REQUEST['store'] ) ) { @@ -208,19 +208,18 @@ public function render_banner() {