diff --git a/packages/Webkul/Product/src/Listeners/ProductFlat.php b/packages/Webkul/Product/src/Listeners/ProductFlat.php index 5cbfc80a9..07008b11a 100644 --- a/packages/Webkul/Product/src/Listeners/ProductFlat.php +++ b/packages/Webkul/Product/src/Listeners/ProductFlat.php @@ -103,7 +103,11 @@ class ProductFlat */ public function afterAttributeCreatedUpdated($attribute) { - if (! $attribute->is_user_defined || ! $attribute->use_in_flat) { + if (! $attribute->is_user_defined) { + return false; + } + + if (! $attribute->use_in_flat) { $this->afterAttributeDeleted($attribute->id); return false; }