Skip to content

Commit ffd9ac1

Browse files
authored
If attribute is not loaded, admit we use the default value "true"
1 parent 9b7e174 commit ffd9ac1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Observer/Product/IsSaleable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public function execute(Observer $observer): void
3030
$saleable->setData(
3131
'is_salable',
3232
$saleable->getData('is_salable') &&
33-
$product->getData('can_show_price') &&
34-
$product->getData('is_purchasable') &&
33+
($product->getData('can_show_price') ?? true) &&
34+
($product->getData('is_purchasable') ?? true) &&
3535
$this->isSaleable->isSaleable(
3636
$this->currentCustomerGroupId->get(),
3737
$product->getStore()->getWebsiteId()

0 commit comments

Comments
 (0)