File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1212use Magento \Sales \Model \Order \Email \Sender \CreditmemoSender ;
1313use Magento \Catalog \Model \Product \Type \AbstractType ;
1414use Magento \Sales \Model \Order \Creditmemo \Item ;
15+ use Magento \Catalog \Model \Product \Type ;
1516
1617/**
1718 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -181,19 +182,19 @@ private function adjustCreditMemoItemQuantities(Creditmemo $creditMemo): void
181182 }
182183
183184 /**
184- * Check if quantity accumulation should be skipped for bundle products with fixed pricing
185+ * Check if the quantity adjustment should be skipped
185186 *
186187 * @param Item $item
187188 * @return bool
188189 */
189190 private function shouldSkipQuantityAccumulation (Item $ item ): bool
190191 {
191192 $ parentOrderItem = $ item ->getOrderItem ()->getParentItem ();
192- if (!$ parentOrderItem || $ parentOrderItem ->getProductType () !== ' bundle ' ) {
193+ if (!$ parentOrderItem || $ parentOrderItem ->getProductType () !== Type:: TYPE_BUNDLE ) {
193194 return false ;
194195 }
195196 $ parentOptions = $ parentOrderItem ->getProductOptions ();
196197 return isset ($ parentOptions ['product_calculations ' ]) &&
197- $ parentOptions ['product_calculations ' ] == AbstractType::CALCULATE_PARENT ;
198+ $ parentOptions ['product_calculations ' ] === AbstractType::CALCULATE_PARENT ;
198199 }
199200}
You can’t perform that action at this time.
0 commit comments