Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed deprecation warnings being logged for TaxRate::$isVat #3875

Merged
merged 2 commits into from
Feb 2, 2025
Merged
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 @@ -2,6 +2,7 @@

## Unreleased

- Fixed a bug where the deprecated `TaxRate::$isVat` property was still being set. ([#3874](https://github.com/craftcms/commerce/issues/3874))
- Fixed a PHP error that could occur when updating an order’s status on console requests. ([#3858](https://github.com/craftcms/commerce/issues/3858))

## 4.8.0 - 2025-01-30
Expand Down
4 changes: 2 additions & 2 deletions src/models/TaxRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ public function getIsEverywhere(): bool
*/
public function getIsVat(): bool
{
Craft::$app->getDeprecator()->log(__METHOD__, 'TaxRate::setIsVat() is deprecated.');

// Don't throw deprecation log as `isVat` is still set as an attribute so will be called when the model is serialized.
return $this->hasTaxIdValidators();
}

/**
* @param bool $isVat
* @throws DeprecationException
* @deprecated in 4.8.0.
*/
public function setIsVat(bool $isVat): void
Expand Down
1 change: 0 additions & 1 deletion src/services/TaxRates.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ private function _createTaxRatesQuery(): Query
'dateUpdated',
'id',
'include',
'isVat',
'name',
'rate',
'removeIncluded',
Expand Down
Loading