diff --git a/Setup/RatingSetup.php b/Setup/RatingSetup.php index 2d0007f..384cdb0 100644 --- a/Setup/RatingSetup.php +++ b/Setup/RatingSetup.php @@ -85,6 +85,8 @@ public function createRatingAttributes($eavSetup) public function renameRatingAttribute($eavSetup) { $entity = ProductAttributeInterface::ENTITY_TYPE_CODE; - $eavSetup->updateAttribute($entity, 'rating_summary', ['attribute_code' => 'ratings_summary']); + if ($eavSetup->getAttributeId($entity, 'rating_summary') !== false) { + $eavSetup->updateAttribute($entity, 'rating_summary', ['attribute_code' => 'ratings_summary']); + } } }