Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Objects/Product/Variants/AttributesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,19 @@ private function getVariantsAttributesField(string $fieldId, string $code, strin
// Load Attribute
$attribute = Manager::getValueByCode($code, $name);
$attributeName = $attribute->name ?? "";
//====================================================================//
// Group found, value not resolved: fall back on the raw value.
//
// The variation carries a custom attribute (attribute_xxx) while a
// taxonomy of the same name (pa_xxx) exists. getValueByCode() looks the
// value up in the taxonomy, finds nothing, and the name comes back
// empty — so the variation is exported with no value at all, and
// targets that require one reject the whole product.
//
// The raw value the variation actually holds is the right answer here.
if (!$attribute) {
$attributeName = $name;
}

//====================================================================//
// Read Mono-lang Values
Expand Down