Make sure product count and revenue items are set in choose niche note (https://github.com/woocommerce/woocommerce-admin/pull/4764)
Co-authored-by: Rebecca Scott <me@becdetat.com>
This commit is contained in:
parent
a6a8b82280
commit
0faca8a0d7
|
@ -44,6 +44,16 @@ class WC_Admin_Notes_Choose_Niche {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure that the product count is set in the onboarding profile.
|
||||||
|
if ( ! isset( $onboarding_profile['product_count'] ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure that the revenue is set in the onboarding profile.
|
||||||
|
if ( ! isset( $onboarding_profile['revenue'] ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// We need to show the notification when product number is 0 or the revenue is 'none' or 'up to 2500'.
|
// We need to show the notification when product number is 0 or the revenue is 'none' or 'up to 2500'.
|
||||||
if (
|
if (
|
||||||
0 !== (int) $onboarding_profile['product_count'] &&
|
0 !== (int) $onboarding_profile['product_count'] &&
|
||||||
|
|
Loading…
Reference in New Issue