File tree 1 file changed +8
-6
lines changed
src/Model/Resolver/Products/DataPostProcessor
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -293,21 +293,23 @@ protected function isAttributeSkipped(
293
293
bool $ isCompare
294
294
): bool {
295
295
/**
296
+ * On PDP, If attribute is not visible on storefront
297
+ * or has no label then we should skip it.
298
+ *
296
299
* On PLP, KEEP attribute if it is used on PLP.
297
300
* This means if not visible on PLP we should SKIP it.
298
301
*
299
- * On PDP, If attribute has no label then it shouldn't be
300
- * visible.
301
- *
302
302
* Don't skip if attribute is for the compare page
303
303
*/
304
- $ result = !$ attribute ->getUsedInProductListing () || !$ attribute ->getStoreLabel ();
304
+ if ($ isSingleProduct ) {
305
+ return !$ attribute ->getIsVisibleOnFront () || !$ attribute ->getStoreLabel ();
306
+ }
305
307
306
308
if ($ isCompare ) {
307
- $ result = !$ attribute ->getIsComparable () || !$ attribute ->getIsVisible ();
309
+ return !$ attribute ->getIsComparable () || !$ attribute ->getIsVisible ();
308
310
}
309
311
310
- return $ result ;
312
+ return ! $ attribute -> getUsedInProductListing () ;
311
313
}
312
314
313
315
/**
You can’t perform that action at this time.
0 commit comments