Skip to content

Commit 7bd9298

Browse files
Merge pull request #9 from joostm020/fix-skipped-product-attribute-used-in-product-listing
[FIX] Skipped product attribute 'Used in Product Listing'.
2 parents 0734794 + 88ca0e2 commit 7bd9298

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Model/Resolver/Products/DataPostProcessor/Attributes.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,11 @@ protected function isAttributeSkipped(
286286
Attribute $attribute,
287287
bool $isSingleProduct
288288
): bool {
289-
if ($isSingleProduct) {
290-
return !$attribute->getIsVisibleOnFront(); // skip attribute if is is not visible on FE
291-
}
292-
293289
/**
294-
* On PLP, KEEP attribute if it is used on PLP and is visible on FE.
295-
* This means if not visible on PLP or is not visible we should SKIP it.
290+
* On PLP, KEEP attribute if it is used on PLP.
291+
* This means if not visible on PLP we should SKIP it.
296292
*/
297-
return !$attribute->getUsedInProductListing() || !$attribute->getIsVisibleOnFront();
293+
return !$attribute->getUsedInProductListing();
298294
}
299295

300296
/**

0 commit comments

Comments
 (0)