Skip to content

Commit

Permalink
Merge pull request #11430 from nanaya/store-description-own-parent
Browse files Browse the repository at this point in the history
Try showing variant product description
  • Loading branch information
peppy authored Aug 13, 2024
2 parents a66d151 + e8b4879 commit 3d75d97
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/Models/Store/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,7 @@ public function getHeaderDescriptionAttribute($value)

public function getDescriptionAttribute($value)
{
if ($this->masterProduct) {
return $this->masterProduct->description;
} else {
return $value;
}
return presence($value) ?? $this->masterProduct?->description;
}

public function isAvailable(): bool
Expand Down

0 comments on commit 3d75d97

Please sign in to comment.