Skip to content

Commit

Permalink
Fixed #3676
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeholder committed Sep 16, 2024
1 parent db15284 commit ff3994c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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 shipping method names were invalid when they contained the same name in another store. ([#3676](https://github.com/craftcms/commerce/issues/3676))
- Fixed a bug where modified parameters in the `\craft\commerce\events\CreateSubscriptionEvent` were not being passed to the gateway.
- Fixed a bug where aggregate store stock levels weren’t being updated when inventory was updated. ([#3668](https://github.com/craftcms/commerce/issues/3668))
- The `commerce/reset-data` command now clears inventory transactions.
Expand Down
2 changes: 1 addition & 1 deletion src/models/ShippingMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected function defineRules(): array
{
$rules = parent::defineRules();
$rules[] = [['name', 'handle'], 'required'];
$rules[] = [['name'], UniqueValidator::class, 'targetClass' => ShippingMethodRecord::class];
$rules[] = [['name'], UniqueValidator::class, 'targetClass' => ShippingMethodRecord::class, 'targetAttribute' => ['name', 'storeId']];
$rules[] = [['handle'], UniqueValidator::class,
'targetClass' => ShippingMethodRecord::class,
'targetAttribute' => ['handle', 'storeId'],
Expand Down

0 comments on commit ff3994c

Please sign in to comment.