| @@ -257,17 +257,14 @@ | ||
| 257 | 257 | * @return string |
| 258 | 258 | */ |
| 259 | 259 | public function getVariationDisplayTitleAttribute() |
| 260 | 260 | { |
| 261 | - $itemAttributes = Arr::get($this->other_info, 'item_attributes', []); | |
| 262 | - $attributesTitle = \FluentCart\App\Helpers\AttributeHelper::getDisplayAttributesString($itemAttributes, $this, 'order_item'); | |
| 263 | - | |
| 264 | - if (!$attributesTitle) { | |
| 265 | - if ($this->post_title === $this->title) { | |
| 266 | - return ''; | |
| 267 | - } | |
| 268 | - return (string)$this->title; | |
| 269 | - } | |
| 270 | - | |
| 271 | - return $attributesTitle; | |
| 261 | + // Order items carry the item_attributes snapshot (written at order | |
| 262 | + // creation), so resolve directly — getDisplayAttributesString renders | |
| 263 | + // the labeled combination and falls back to the variation title. | |
| 264 | + return \FluentCart\App\Helpers\AttributeHelper::getDisplayAttributesString( | |
| 265 | + Arr::get($this->other_info, 'item_attributes', []), | |
| 266 | + $this, | |
| 267 | + 'order_item' | |
| 268 | + ); | |
| 272 | 269 | } |
| 273 | 270 | } |