Skip to content

Commit ec1c858

Browse files
author
Roman Lytvynenko
committed
MC-21876: "Same as Billing Address" checkbox is checked automatically when re-ordering an order with different billing/shipping via Admin Panel.
1 parent 99f206f commit ec1c858

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Quote/Model/Quote/Address.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,11 @@ protected function _populateBeforeSaveData()
425425
*/
426426
protected function _isSameAsBilling()
427427
{
428+
$quoteSameAsBilling = $this->getQuote()->getShippingAddress()->getSameAsBilling();
429+
428430
return $this->getAddressType() == \Magento\Quote\Model\Quote\Address::TYPE_SHIPPING &&
429-
($this->_isNotRegisteredCustomer() ||
430-
$this->_isDefaultShippingNullOrSameAsBillingAddress());
431+
($this->_isNotRegisteredCustomer() || $this->_isDefaultShippingNullOrSameAsBillingAddress()) &&
432+
($quoteSameAsBilling || $quoteSameAsBilling === 0 || $quoteSameAsBilling === null);
431433
}
432434

433435
/**

0 commit comments

Comments
 (0)