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 =
|
||||
( window.wcAdminFeatures && ! window.wcAdminFeatures.subscriptions ) ||
|
||||
countryCode !== 'US' ||
|
||||
! profileItems.product_types.includes( 'subscriptions' ) ||
|
||||
! profileItems.product_types?.includes( 'subscriptions' ) ||
|
||||
! installedPlugins.includes( 'woocommerce-payments' );
|
||||
|
||||
const productTemplates = removeSubscriptions
|
||||
|
|
|
@ -123,7 +123,7 @@ const Products = () => {
|
|||
window.wcAdminFeatures &&
|
||||
window.wcAdminFeatures.subscriptions &&
|
||||
countryCode === 'US' &&
|
||||
profileItems.product_types.includes( 'subscriptions' ) &&
|
||||
profileItems.product_types?.includes( 'subscriptions' ) &&
|
||||
installedPlugins.includes( 'woocommerce-payments' )
|
||||
) {
|
||||
const task = subTasks.find(
|
||||
|
|
Loading…
Reference in New Issue