PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | app/Models/OrderItem.php +8 -11 1.5.1 → 1.6.5 View file →
@@ -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 }