* Onboarding: Add another option to platforms.

* Add revenue question for other woo store.

* Add new option value to REST enum.
This commit is contained in:
Timmy Crawford 2019-12-27 08:30:59 -08:00 committed by GitHub
parent 2df87c674d
commit 44748bb16e
2 changed files with 9 additions and 2 deletions

View File

@ -124,7 +124,9 @@ class BusinessDetails extends Component {
} else if ( 'revenue' === name ) {
if (
! values.revenue.length &&
[ 'other', 'brick-mortar', 'brick-mortar-other' ].includes( values.selling_venues )
[ 'other', 'brick-mortar', 'brick-mortar-other', 'other-woocommerce' ].includes(
values.selling_venues
)
) {
errors.revenue = __( 'This field is required', 'woocommerce-admin' );
}
@ -369,6 +371,10 @@ class BusinessDetails extends Component {
key: 'other',
label: __( 'Yes, on another platform', 'woocommerce-admin' ),
},
{
key: 'other-woocommerce',
label: __( 'Yes, I own a different store powered by WooCommerce', 'woocommerce-admin' ),
},
{
key: 'brick-mortar',
label: __( 'Yes, in person at physical stores and/or events', 'woocommerce-admin' ),
@ -441,7 +447,7 @@ class BusinessDetails extends Component {
{ ...getInputProps( 'selling_venues' ) }
/>
{ [ 'other', 'brick-mortar', 'brick-mortar-other' ].includes(
{ [ 'other', 'brick-mortar', 'brick-mortar-other', 'other-woocommerce' ].includes(
values.selling_venues
) && (
<SelectControl

View File

@ -284,6 +284,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller {
'other',
'brick-mortar',
'brick-mortar-other',
'other-woocommerce',
),
),
'revenue' => array(