Fixing references to null value throwing errors on products task (https://github.com/woocommerce/woocommerce-admin/pull/7934)
This commit is contained in:
parent
126707eeab
commit
1ccb1f6e1d
|
@ -124,7 +124,7 @@ export default function ProductTemplateModal( { onClose } ) {
|
||||||
const removeSubscriptions =
|
const removeSubscriptions =
|
||||||
( window.wcAdminFeatures && ! window.wcAdminFeatures.subscriptions ) ||
|
( window.wcAdminFeatures && ! window.wcAdminFeatures.subscriptions ) ||
|
||||||
countryCode !== 'US' ||
|
countryCode !== 'US' ||
|
||||||
! profileItems.product_types.includes( 'subscriptions' ) ||
|
! profileItems.product_types?.includes( 'subscriptions' ) ||
|
||||||
! installedPlugins.includes( 'woocommerce-payments' );
|
! installedPlugins.includes( 'woocommerce-payments' );
|
||||||
|
|
||||||
const productTemplates = removeSubscriptions
|
const productTemplates = removeSubscriptions
|
||||||
|
|
|
@ -123,7 +123,7 @@ const Products = () => {
|
||||||
window.wcAdminFeatures &&
|
window.wcAdminFeatures &&
|
||||||
window.wcAdminFeatures.subscriptions &&
|
window.wcAdminFeatures.subscriptions &&
|
||||||
countryCode === 'US' &&
|
countryCode === 'US' &&
|
||||||
profileItems.product_types.includes( 'subscriptions' ) &&
|
profileItems.product_types?.includes( 'subscriptions' ) &&
|
||||||
installedPlugins.includes( 'woocommerce-payments' )
|
installedPlugins.includes( 'woocommerce-payments' )
|
||||||
) {
|
) {
|
||||||
const task = subTasks.find(
|
const task = subTasks.find(
|
||||||
|
|
Loading…
Reference in New Issue