Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Fixed a bug where all catalog pricing could be removed if a catalog pricing rule was deleted before its catalog pricing job ran. ([#4374](https://github.com/craftcms/commerce/issues/4374))
- Fixed a bug where non-admin users couldn’t create inventory locations. ([#4376](https://github.com/craftcms/commerce/issues/4376))
- Fixed a bug where completed orders couldn’t be saved if their VAT ID was no longer valid or couldn’t be validated. ([#4377](https://github.com/craftcms/commerce/pull/4377))
- Fixed [high-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) RCE vulnerabilities. (GHSA-2m9x-wwwf-f798, GHSA-4rf5-rp2q-cwvw)
- Fixed a [low-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) authorization bypass vulnerability. (GHSA-xh76-fg84-9j86)

Expand Down
4 changes: 2 additions & 2 deletions src/elements/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -1619,8 +1619,8 @@ protected function defineRules(): array
!$model->isCompleted,
],

[['shippingAddress'], 'validateOrganizationTaxIdAsVatId', 'when' => fn(Order $order) => $order->getStore()->getValidateOrganizationTaxIdAsVatId() && !$order->getStore()->getUseBillingAddressForTax()],
[['billingAddress'], 'validateOrganizationTaxIdAsVatId', 'when' => fn(Order $order) => $order->getStore()->getValidateOrganizationTaxIdAsVatId() && $order->getStore()->getUseBillingAddressForTax()],
[['shippingAddress'], 'validateOrganizationTaxIdAsVatId', 'when' => fn(Order $order) => !$order->isCompleted && $order->getStore()->getValidateOrganizationTaxIdAsVatId() && !$order->getStore()->getUseBillingAddressForTax()],
[['billingAddress'], 'validateOrganizationTaxIdAsVatId', 'when' => fn(Order $order) => !$order->isCompleted && $order->getStore()->getValidateOrganizationTaxIdAsVatId() && $order->getStore()->getUseBillingAddressForTax()],

// Line items are valid?
[['lineItems'], 'validateLineItems'],
Expand Down
Loading