File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Form/Type/ChoiceMapper Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,14 @@ public function mapToChoices(ProductAttributeInterface $productAttribute): array
5858 $ attributeValues = $ this ->productAttributeValueRepository ->findBy (['attribute ' => $ productAttribute ]);
5959 $ choices = [];
6060 array_walk ($ attributeValues , function (ProductAttributeValueInterface $ productAttributeValue ) use (&$ choices ): void {
61+ $ product = $ productAttributeValue ->getProduct ();
62+
63+ if (!$ product ->isEnabled ()) {
64+ return ;
65+ }
66+
6167 $ value = $ productAttributeValue ->getValue ();
6268 $ configuration = $ productAttributeValue ->getAttribute ()->getConfiguration ();
63- $ product = $ productAttributeValue ->getProduct ();
6469
6570 if (is_array ($ value )
6671 && isset ($ configuration ['choices ' ])
You can’t perform that action at this time.
0 commit comments