Hide variation related notices when product type is not variable (#49400)

* Hide variation related notices when product type is not variable

* Revert "Hide variation related notices when product type is not variable"

This reverts commit 66a67b6ada.

* Hide variation related notices when product type is not variable
This commit is contained in:
Nathan Silveira 2024-07-15 16:38:14 -03:00 committed by GitHub
parent 67ecc95633
commit af571585b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Hide variation related notices when product type is not variable

View File

@ -35,8 +35,11 @@ export function Edit( {
'attributes' 'attributes'
); );
const [ productType ] = useEntityProp( 'postType', 'product', 'type' );
const isOptionsNoticeVisible = const isOptionsNoticeVisible =
hasAttributesUsedForVariations( productAttributes ); hasAttributesUsedForVariations( productAttributes ) &&
productType === 'variable';
return ( return (
<div { ...blockProps }> <div { ...blockProps }>