Skip to content
Merged

5.5 #4070

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
300 commits
Select commit Hold shift + click to select a range
2e8052c
WIP
lukeholder Oct 28, 2025
e12968c
translations
lukeholder Oct 28, 2025
c3a0dd9
Merge branch '5.x' into 5.5
nfourtythree Oct 28, 2025
ebd64e6
`dateFirstPaid` on Order element
nfourtythree Oct 28, 2025
4c2a266
Merge branch '4.x' into feature/4.x-pdf-improvements
lukeholder Oct 29, 2025
9eb6087
tidy
nfourtythree Oct 29, 2025
e037b71
Email challenge for expired pdf url
lukeholder Oct 29, 2025
808d305
Cleanup
lukeholder Oct 29, 2025
e040b6a
Fix type error
lukeholder Oct 29, 2025
d703176
Include the order in the message so it can be used
lukeholder Oct 29, 2025
30563c7
Cleanup
lukeholder Oct 29, 2025
74acf62
wording
lukeholder Oct 29, 2025
3133670
#4144 Ability to suppress emails when marking an order as complete in…
nfourtythree Oct 29, 2025
7c8ac80
Merge branch '5.5' into nathaniel/com-472-5x-get-parentancestor-produ…
nfourtythree Oct 30, 2025
f38ab6a
Add changelog WIP items
nfourtythree Oct 30, 2025
88e845c
fix cs
nfourtythree Oct 30, 2025
9b5747e
Merge branch '5.x' into 5.5
nfourtythree Oct 30, 2025
a2c50ea
Merge branch '5.5' into nathaniel/com-472-5x-get-parentancestor-produ…
nfourtythree Oct 30, 2025
33d9826
Merge branch '5.5' into bugfix/send-email-with-current-site-set-to-or…
nfourtythree Oct 30, 2025
a573faa
Tidy version numbers
nfourtythree Oct 30, 2025
5b0b46f
Release note
lukeholder Nov 3, 2025
8cf6539
Merge branch '5.5' into feature/reset-data-noninteractive
lukeholder Nov 3, 2025
3b03e83
Release note fix
lukeholder Nov 3, 2025
18c63fc
Merge branch 'feature/reset-data-noninteractive' of github.com:craftc…
lukeholder Nov 3, 2025
7991dc3
Merge pull request #4116 from craftcms/feature/reset-data-noninteractive
lukeholder Nov 3, 2025
f639669
Release note
lukeholder Nov 3, 2025
21aa6dc
Merge branch '5.5' into feature/preview-targets
lukeholder Nov 3, 2025
0880669
Fixed #4112
lukeholder Sep 1, 2025
098c85f
WIP
lukeholder Sep 22, 2025
357148d
Merge branch 'luke/com-466-5x-allow-multi-select-of-payment-gateways-…
lukeholder Nov 3, 2025
a066082
backward compatible
lukeholder Nov 3, 2025
6254430
Merge pull request #4113 from craftcms/luke/com-466-5x-allow-multi-se…
lukeholder Nov 3, 2025
9e2163f
Merge branch '5.5' into feature/product-slug-translations
lukeholder Nov 3, 2025
78b4dbd
Cleanup
lukeholder Nov 3, 2025
88b5b95
Release note
lukeholder Nov 3, 2025
72a3a07
Cleanup
lukeholder Nov 3, 2025
9594083
Fix version
lukeholder Nov 3, 2025
09e3c37
Merge pull request #4088 from craftcms/feature/product-slug-translations
lukeholder Nov 3, 2025
b82396b
Merge branch '5.5' into feature/5.5-add-coupon-to-discount-easier
lukeholder Nov 3, 2025
2191342
Merge pull request #4084 from craftcms/feature/5.5-add-coupon-to-disc…
lukeholder Nov 3, 2025
5650eb9
Merge branch '5.5' into feature/inventory-change-events
lukeholder Nov 3, 2025
29641f8
Merge pull request #4063 from craftcms/feature/inventory-change-events
lukeholder Nov 3, 2025
d5c7949
Merge branch '5.5' into feature/preview-targets
lukeholder Nov 3, 2025
fd50004
Cleanup
lukeholder Nov 3, 2025
ad4e49e
Merge pull request #4128 from craftcms/feature/preview-targets
lukeholder Nov 3, 2025
7cf0f11
Merge branch '5.5' into feature/5.5-gateway-address-conditions
lukeholder Nov 3, 2025
8d14bf1
Release notes
lukeholder Nov 3, 2025
8a4c2df
Merge pull request #4100 from craftcms/feature/5.5-gateway-address-co…
lukeholder Nov 3, 2025
95ebb3e
Merge branch '5.5' into luke/pt-2792-5x-update-a-purchasables-shippin…
lukeholder Nov 3, 2025
2443c55
Transations
lukeholder Nov 3, 2025
882084d
Release note
lukeholder Nov 3, 2025
e26fd4c
Merge branch '5.5' into luke/pt-2792-5x-update-a-purchasables-shippin…
lukeholder Nov 3, 2025
1358257
Merge branch '5.5' into nathaniel/com-472-5x-get-parentancestor-produ…
nfourtythree Nov 3, 2025
e72493c
tidy
nfourtythree Nov 3, 2025
8bdc14a
Add missing gateway install columns
nfourtythree Nov 3, 2025
adb00dc
Merge branch '5.5' into nathaniel/com-472-5x-get-parentancestor-produ…
nfourtythree Nov 3, 2025
e14acf2
Release notes
lukeholder Nov 3, 2025
a60fecb
Merge branch '5.5' into luke/pt-2792-5x-update-a-purchasables-shippin…
lukeholder Nov 3, 2025
3291e57
Merge branch 'luke/pt-2792-5x-update-a-purchasables-shippingcategoryi…
lukeholder Nov 3, 2025
e5c6318
Merge branch '5.5' into nathaniel/com-485-5x-suppress-email-for-order…
nfourtythree Nov 3, 2025
6a342a0
Merge branch '5.5' into nathaniel/com-485-5x-suppress-email-for-order…
lukeholder Nov 3, 2025
cdb99b2
tweak changelog
nfourtythree Nov 3, 2025
435dee2
Merge branch '5.5' into feature/5.5-date-first-paid
nfourtythree Nov 3, 2025
f4d7bd7
Tweak
nfourtythree Nov 3, 2025
4545df3
Fix apostrophe
lukeholder Nov 3, 2025
890ec9b
Merge branch 'nathaniel/com-485-5x-suppress-email-for-order-completio…
lukeholder Nov 3, 2025
c3e8170
Fix translation typo
nfourtythree Nov 3, 2025
9c2ec21
Merge branch '5.5' into feature/5.5-date-first-paid
nfourtythree Nov 3, 2025
765717e
Merge branch '5.5' into nathaniel/com-485-5x-suppress-email-for-order…
nfourtythree Nov 3, 2025
2c3bd17
Merge branch 'nathaniel/com-485-5x-suppress-email-for-order-completio…
nfourtythree Nov 3, 2025
0a4ffb2
Fix apostrophe
lukeholder Nov 3, 2025
9cb762f
Merge branch '5.5' of github.com:craftcms/commerce into 5.5
lukeholder Nov 3, 2025
58fd8c8
Merge branch '5.5' into nathaniel/com-288-5x-add-catalog-pricing-rule…
nfourtythree Nov 3, 2025
1f3b381
Update changelog WIP
nfourtythree Nov 3, 2025
0c86786
Merge pull request #4154 from craftcms/nathaniel/com-472-5x-get-paren…
nfourtythree Nov 3, 2025
0303794
Merge branch '5.5' into feature/5.5-date-first-paid
nfourtythree Nov 3, 2025
50c0b8a
Merge pull request #4152 from craftcms/feature/5.5-date-first-paid
nfourtythree Nov 3, 2025
f0d9e84
Merge branch '5.5' into nathaniel/com-485-5x-suppress-email-for-order…
nfourtythree Nov 3, 2025
5b8d9f2
Merge pull request #4153 from craftcms/nathaniel/com-485-5x-suppress-…
nfourtythree Nov 3, 2025
e8e51e2
Merge branch '5.5' into nathaniel/com-288-5x-add-catalog-pricing-rule…
nfourtythree Nov 3, 2025
19c9286
Merge pull request #4121 from craftcms/nathaniel/com-288-5x-add-catal…
nfourtythree Nov 3, 2025
8c2721d
Merge branch '5.5' into bugfix/send-email-with-current-site-set-to-or…
nfourtythree Nov 3, 2025
03e97e3
Merge pull request #4042 from craftcms/bugfix/send-email-with-current…
nfourtythree Nov 3, 2025
c2607e9
Fix missing columns in the install migration
lukeholder Nov 3, 2025
f44c981
Email PDF expiry
lukeholder Nov 4, 2025
6c2e5cb
Fix accessor
lukeholder Nov 4, 2025
dd65c77
Even if logged in, they should still see the expired page
lukeholder Nov 4, 2025
0a0c036
Merge branch '5.x' into feature/pt-2792-5x-update-a-purchasables-ship…
lukeholder Nov 4, 2025
27c77f9
All product types if this category is default
lukeholder Nov 4, 2025
d7d9b96
Merge branch '5.5' into feature/pt-2792-5x-update-a-purchasables-ship…
lukeholder Nov 4, 2025
3ab8945
Merge pull request #4022 from craftcms/feature/pt-2792-5x-update-a-pu…
lukeholder Nov 4, 2025
1597f1c
#4157 add “Product type settings” action menu item to product edit
nfourtythree Nov 4, 2025
36119f3
Ensure all settings edit pages are screens
lukeholder Nov 5, 2025
1d97e9c
Ensure all shpping and tax index pages are screens and chippable models
lukeholder Nov 5, 2025
ec1fe79
since tags
lukeholder Nov 5, 2025
ad96a6a
Fix
lukeholder Nov 5, 2025
09b1c50
Fix phpstan issues like we do entry types
lukeholder Nov 5, 2025
40b73b4
Merge pull request #4159 from craftcms/nathaniel/com-493-5x-product-t…
lukeholder Nov 5, 2025
0e0060a
Dont delete the default
lukeholder Nov 5, 2025
6403d84
Merge branch '5.5' into feature/as-screen
lukeholder Nov 5, 2025
37993d4
Fix test
lukeholder Nov 5, 2025
ce22e27
Cleanup
lukeholder Nov 5, 2025
eb96252
Merge branch '5.5' into feature/as-screen
lukeholder Nov 5, 2025
425f9e2
Release notes
lukeholder Nov 5, 2025
768654f
Fix crumbs
lukeholder Nov 5, 2025
83bc634
Cleanup
lukeholder Nov 5, 2025
25dc7ce
No icons for now
lukeholder Nov 5, 2025
8526a93
Add icon and color support to shipping/tax categories and methods
lukeholder Nov 5, 2025
904c1a9
Cleanup
lukeholder Nov 5, 2025
6880b0a
Merge branch 'feature/4.x-pdf-improvements' into 4.10
lukeholder Nov 5, 2025
611d23b
WIP changelog
lukeholder Nov 5, 2025
613be1f
Merge branch '4.10' into feature/pdf-updates
lukeholder Nov 5, 2025
d5ba07c
WIP changelog
lukeholder Nov 5, 2025
20b952a
update changelog
lukeholder Nov 5, 2025
f6f1858
Cleanup
lukeholder Nov 5, 2025
e26823e
Merge pull request #4165 from craftcms/feature/pdf-updates
lukeholder Nov 5, 2025
3815fca
Merge branch '5.5' into feature/as-screen
lukeholder Nov 5, 2025
cc0bd80
Move store management layout logic to controller
nfourtythree Nov 5, 2025
0cc451c
Payment currencies index and edit to use new screen method
nfourtythree Nov 5, 2025
64ea900
Merge branch 'feature/as-screen' of github.com:craftcms/commerce into…
nfourtythree Nov 5, 2025
e5a6f68
fix cs
nfourtythree Nov 5, 2025
a425b69
rector
nfourtythree Nov 5, 2025
f521f64
Fixed missing migration columns
nfourtythree Nov 5, 2025
caf5536
Move store management general settings to cp screens
nfourtythree Nov 6, 2025
f93ef01
Have the base method include the admin table asset for indexes by def…
nfourtythree Nov 6, 2025
304accd
Move tax rates index to cp screen
nfourtythree Nov 6, 2025
d3f47ea
Have tax rate edit use new screen method
nfourtythree Nov 6, 2025
39c3a9b
tidy rates edit template
nfourtythree Nov 6, 2025
2748138
Update tax zones to use cp screens
nfourtythree Nov 6, 2025
2ef0f3d
Update tax zones meta data output
nfourtythree Nov 7, 2025
f404fc8
Update tax categories to use cp screen
nfourtythree Nov 7, 2025
3178baf
Allow product condition rule to have multiple selections
nfourtythree Nov 7, 2025
0c9477b
New translations commerce.php (French)
shinybrad Nov 9, 2025
7df132d
New translations commerce.php (German)
shinybrad Nov 9, 2025
3316190
New translations commerce.php (Italian)
shinybrad Nov 9, 2025
b18d228
New translations commerce.php (Japanese)
shinybrad Nov 9, 2025
6ddada6
New translations commerce.php (Dutch)
shinybrad Nov 9, 2025
be75275
New translations commerce.php (Portuguese)
shinybrad Nov 9, 2025
c1cd67e
New translations commerce.php (Slovak)
shinybrad Nov 9, 2025
20289c6
New translations commerce.php (English, United Kingdom)
shinybrad Nov 9, 2025
dd6a189
New translations commerce.php (French, Canada)
shinybrad Nov 9, 2025
ef52f5c
New translations commerce.php (Norwegian Bokmal)
shinybrad Nov 9, 2025
b39ac2c
New translations commerce.php (French)
shinybrad Nov 9, 2025
81a48f9
New translations commerce.php (German)
shinybrad Nov 9, 2025
e0989fd
New translations commerce.php (Italian)
shinybrad Nov 9, 2025
5611076
New translations commerce.php (Japanese)
shinybrad Nov 9, 2025
a0a1101
New translations commerce.php (Dutch)
shinybrad Nov 9, 2025
fc2963a
New translations commerce.php (Portuguese)
shinybrad Nov 9, 2025
9739357
New translations commerce.php (Slovak)
shinybrad Nov 9, 2025
82f05fa
New translations commerce.php (English, United Kingdom)
shinybrad Nov 9, 2025
acf0daa
New translations commerce.php (French, Canada)
shinybrad Nov 9, 2025
b6cef6c
New translations commerce.php (Norwegian Bokmal)
shinybrad Nov 9, 2025
2c19443
Translation cleanup
brandonkelly Nov 9, 2025
02c8654
Expiry → Duration
brandonkelly Nov 9, 2025
e7472b5
New translations commerce.php (French)
shinybrad Nov 10, 2025
92080f7
New translations commerce.php (German)
shinybrad Nov 10, 2025
53db6f7
New translations commerce.php (Italian)
shinybrad Nov 10, 2025
c5c88a0
New translations commerce.php (Japanese)
shinybrad Nov 10, 2025
ad0fa78
New translations commerce.php (Dutch)
shinybrad Nov 10, 2025
313e8a1
New translations commerce.php (Portuguese)
shinybrad Nov 10, 2025
0d6ace9
New translations commerce.php (Slovak)
shinybrad Nov 10, 2025
9eb522f
New translations commerce.php (English, United Kingdom)
shinybrad Nov 10, 2025
5cb3fc3
New translations commerce.php (French, Canada)
shinybrad Nov 10, 2025
0d08272
New translations commerce.php (Norwegian Bokmal)
shinybrad Nov 10, 2025
156abba
Update source file commerce.php
shinybrad Nov 10, 2025
81d890a
Merge pull request #4166 from craftcms/feature/5.5-allow-multiple-pro…
lukeholder Nov 10, 2025
71b2990
fix JS pos
nfourtythree Nov 10, 2025
49448fe
shipping categories as screen
nfourtythree Nov 10, 2025
7efb506
Shipping zones as screen
nfourtythree Nov 10, 2025
cd2571b
fix cs
nfourtythree Nov 10, 2025
219a5c2
Shipping methods as screen
nfourtythree Nov 10, 2025
dd63574
Catalog pricing rules index as screen
nfourtythree Nov 10, 2025
5871def
fix cs
nfourtythree Nov 10, 2025
f226a6b
Fix message
brandonkelly Nov 10, 2025
52850f9
Merge branch '4.10' of https://github.com/craftcms/commerce into 5.5
brandonkelly Nov 10, 2025
aca99e3
Merge branch '4.10' of https://github.com/craftcms/commerce into 5.5
brandonkelly Nov 10, 2025
fd714c1
Sort lines
brandonkelly Nov 10, 2025
7c353ee
Message cleanup
brandonkelly Nov 10, 2025
a056c06
New translations commerce.php (French)
shinybrad Nov 10, 2025
67fcce6
New translations commerce.php (German)
shinybrad Nov 10, 2025
eff9523
New translations commerce.php (Italian)
shinybrad Nov 10, 2025
5b67e84
New translations commerce.php (Japanese)
shinybrad Nov 10, 2025
e811875
New translations commerce.php (Dutch)
shinybrad Nov 10, 2025
7ef241f
New translations commerce.php (Portuguese)
shinybrad Nov 10, 2025
676417f
New translations commerce.php (Slovak)
shinybrad Nov 10, 2025
573c0fd
New translations commerce.php (English, United Kingdom)
shinybrad Nov 10, 2025
f097881
New translations commerce.php (French, Canada)
shinybrad Nov 10, 2025
70a4472
New translations commerce.php (Norwegian Bokmal)
shinybrad Nov 10, 2025
deeee13
New translations commerce.php (French)
shinybrad Nov 10, 2025
ddc9c6c
New translations commerce.php (German)
shinybrad Nov 10, 2025
83465e9
New translations commerce.php (Italian)
shinybrad Nov 10, 2025
74a6b70
New translations commerce.php (Japanese)
shinybrad Nov 10, 2025
1058e95
New translations commerce.php (Dutch)
shinybrad Nov 10, 2025
bf18246
New translations commerce.php (Portuguese)
shinybrad Nov 10, 2025
929da90
New translations commerce.php (Slovak)
shinybrad Nov 10, 2025
ec0514d
New translations commerce.php (English, United Kingdom)
shinybrad Nov 10, 2025
b7089d3
New translations commerce.php (French, Canada)
shinybrad Nov 10, 2025
463752a
New translations commerce.php (Norwegian Bokmal)
shinybrad Nov 10, 2025
4373526
Update source file commerce.php
shinybrad Nov 10, 2025
33a371c
Update source file commerce.php
shinybrad Nov 10, 2025
3c0adc4
Move resave to job
lukeholder Nov 11, 2025
50e66eb
Merge branch '5.5' into feature/variant-title-format-regen-conditional
lukeholder Nov 11, 2025
ebafa0e
Release note
lukeholder Nov 11, 2025
c678e9d
Merge pull request #4173 from craftcms/feature/variant-title-format-r…
lukeholder Nov 11, 2025
ab9626e
Merge branch '5.5' into feature/as-screen
lukeholder Nov 11, 2025
fe39fd7
Release note fix
lukeholder Nov 11, 2025
6bba894
Merge branch '5.x' into 5.5
lukeholder Nov 11, 2025
6d799be
Merge branch '5.x' into 5.5
lukeholder Nov 11, 2025
d11abfb
Merge branch '5.5' of github.com:craftcms/commerce into 5.5
lukeholder Nov 11, 2025
69d20da
Cleanup release notes
lukeholder Nov 11, 2025
2a2dfe8
Merge branch '5.5' into feature/as-screen
lukeholder Nov 11, 2025
d36ae2b
Discounts index as screen
nfourtythree Nov 11, 2025
4d355b3
Tidy
nfourtythree Nov 11, 2025
ded2c08
Discounts edit as cp screen
nfourtythree Nov 11, 2025
91baa1f
Merge branch 'feature/as-screen' of github.com:craftcms/commerce into…
nfourtythree Nov 11, 2025
8d25691
Merge pull request #4161 from craftcms/feature/as-screen
lukeholder Nov 12, 2025
642260a
New translations commerce.php (Portuguese)
shinybrad Nov 12, 2025
2b81c53
New translations commerce.php (Portuguese)
shinybrad Nov 12, 2025
d5d9fda
#4167 Add variant and customer specific rules to catalog pricing rule…
nfourtythree Nov 12, 2025
2675304
New translations commerce.php (German)
shinybrad Nov 12, 2025
9781c0e
New translations commerce.php (German)
shinybrad Nov 12, 2025
4d82683
Fixes #4172
lukeholder Nov 12, 2025
0334e0c
Merge pull request #4176 from craftcms/nathaniel/com-496-5x-allow-the…
nfourtythree Nov 12, 2025
0cd5cf4
New translations commerce.php (Italian)
shinybrad Nov 12, 2025
acc4d8f
New translations commerce.php (Italian)
shinybrad Nov 12, 2025
2c5a98a
Merge branch '5.x' into 5.5
nfourtythree Nov 13, 2025
fd23841
New translations commerce.php (Norwegian Bokmal)
shinybrad Nov 13, 2025
15408a1
New translations commerce.php (Norwegian Bokmal)
shinybrad Nov 13, 2025
d8e3557
#4158 `productStatus` variant query param
nfourtythree Nov 13, 2025
126fad2
Tidy
nfourtythree Nov 13, 2025
ff34a0f
New translations commerce.php (Slovak)
shinybrad Nov 13, 2025
70fe1e9
New translations commerce.php (Slovak)
shinybrad Nov 13, 2025
2995f64
New translations commerce.php (French, Canada)
shinybrad Nov 13, 2025
4afc06c
New translations commerce.php (French, Canada)
shinybrad Nov 13, 2025
79139b8
New translations commerce.php (Dutch)
shinybrad Nov 14, 2025
eacac2d
New translations commerce.php (Dutch)
shinybrad Nov 14, 2025
bb6c9b7
New translations commerce.php (French)
shinybrad Nov 14, 2025
0b7f2b5
New translations commerce.php (Japanese)
shinybrad Nov 14, 2025
0cb21c5
New translations commerce.php (French)
shinybrad Nov 14, 2025
9e3c620
New translations commerce.php (Japanese)
shinybrad Nov 14, 2025
9474631
Merge pull request #4169 from craftcms/t9n/5.5
lukeholder Nov 18, 2025
fa872b7
Merge pull request #4168 from craftcms/t9n/4.10
lukeholder Nov 18, 2025
ce957ae
Merge pull request #4179 from craftcms/nathaniel/com-494-5x-graphql-s…
lukeholder Nov 18, 2025
d923af6
Tidy extra parts of product status querying
nfourtythree Nov 18, 2025
db8e346
PHPstan
nfourtythree Nov 18, 2025
fc9ca3b
Changelog tweaks
brandonkelly Nov 18, 2025
91fa8f4
Another tweak
brandonkelly Nov 18, 2025
6219908
Merge branch '4.10' of https://github.com/craftcms/commerce into 5.5
brandonkelly Nov 18, 2025
16a2415
Changelog tweaks
brandonkelly Nov 18, 2025
f26d8e1
Merge the changelogs
brandonkelly Nov 18, 2025
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
71 changes: 71 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,76 @@
# Release Notes for Craft Commerce

## Unreleased

### Store Management
- Added the ability to suppress order emails when marking an order as complete in the control panel. ([#4144](https://github.com/craftcms/commerce/issues/4144))
- PDF download URLs are now generated with time-limited security tokens.
- Anonymous users attempting to download a PDF with an expired or missing token are now shown an email verification form.
- Added a new system message for customizing PDF download emails.
- Added the ability to select multiple products in variant conditions. ([#4166](https://github.com/craftcms/commerce/pull/4166))
- Added the ability to select multiple variants in pricing rules’ “Match Variant” conditions. ([#4167](https://github.com/craftcms/commerce/issues/4167))
- Added the ability to select multiple users in pricing rules’ “Match Customer” conditions. ([#4167](https://github.com/craftcms/commerce/issues/4167))

### Administration
- Added billing and shipping address conditions to payment gateways. ([#4100](https://github.com/craftcms/commerce/pull/4100))
- Added preview targets for products. ([#4128](https://github.com/craftcms/commerce/pull/4128))
- Added slug translation options to product types. ([#4088](https://github.com/craftcms/commerce/pull/4088))
- Gateway condition rules now allow multiple gateways to be selected. ([#4112](https://github.com/craftcms/commerce/issues/4112))
- Product action menus now have a “Product type settings” action, for admin users on environments that allow admin changes. ([#4157](https://github.com/craftcms/commerce/issues/4157))
- Added the “Link Duration” setting to PDF settings.

### Development
- Orders now have a `dateFirstPaid` property that records the date and time when the order was first paid in full.
- Improved product and variant query performance.
- Improved the performance of retrieving a line item’s catalog pricing rule ID.
- Added the `children`, `parent`, `ancestors` and `descendants` fields to products’ GraphQL data. ([#4122](https://github.com/craftcms/commerce/issues/4122))
- Added the `productStatus` variant query param. ([#4158](https://github.com/craftcms/commerce/issues/4158))
- Added the `productStatus` GraphQL variant query argument. ([#4158](https://github.com/craftcms/commerce/issues/4158))
- Added the `--force` option to the `commerce/reset-data` command. ([#4115](https://github.com/craftcms/commerce/discussions/4115))

### Extensibility
- Added `craft\commerce\controllers\BaseStoreManagementController::asStoreManagementCpScreen()`.
- Added `craft\commerce\controllers\DownloadsController::actionEmailChallenge()`.
- Added `craft\commerce\controllers\DownloadsController::actionPdfChallenge()`.
- Added `craft\commerce\controllers\DownloadsController::actionPdfSent()`.
- Added `craft\commerce\elements\Order::$dateFirstPaid`.
- Added `craft\commerce\elements\Order::getMaskedEmail()`.
- Added `craft\commerce\elements\conditions\customers\CatalogPricingRuleCustomerConditionRule`.
- Added `craft\commerce\elements\conditions\variants\CatalogPricingRuleVariantConditionRule`.
- Added `craft\commerce\elements\conditions\variants\VariantConditionRule`.
- Added `craft\commerce\elements\db\OrderQuery::$dateFirstPaid`.
- Added `craft\commerce\elements\db\OrderQuery::dateFirstPaid()`.
- Added `craft\commerce\events\InventoryMovementEvent`. ([#4063](https://github.com/craftcms/commerce/pull/4063))
- Added `craft\commerce\events\UpdateInventoryLevelEvent`. ([#4063](https://github.com/craftcms/commerce/pull/4063))
- Added `craft\commerce\helpers\Cp::shippingCategoryFieldHtml()`.
- Added `craft\commerce\helpers\Cp::shippingMethodFieldHtml()`.
- Added `craft\commerce\helpers\Cp::shippingZoneFieldHtml()`.
- Added `craft\commerce\helpers\Cp::taxCategoryFieldHtml()`.
- Added `craft\commerce\helpers\Cp::taxZoneFieldHtml()`.
- Added `craft\commerce\helpers\Gql::getSchemaContainedProductTypes()`.
- Added `craft\commerce\helpers\ProductQuery`.
- Added `craft\commerce\models\Email::$renderSiteId`.
- Added `craft\commerce\models\Email::getRenderSite()`.
- Added `craft\commerce\models\Pdf::$linkExpiry`.
- Added `craft\commerce\queue\jobs\ResaveProductVariants`.
- Added `craft\commerce\records\Email::$renderSiteId`.
- Added `craft\commerce\records\Order::$dateFirstPaid`.
- Added `craft\commerce\services\CatalogPricingRules::hasCatalogPricingRules()`.
- Added `craft\commerce\services\Discounts::appendCouponCode()`. ([#4084](https://github.com/craftcms/commerce/pull/4084))
- Added `craft\commerce\services\Inventory::EVENT_AFTER_EXECUTE_INVENTORY_MOVEMENT`. ([#3835](https://github.com/craftcms/commerce/discussions/3835))
- Added `craft\commerce\services\Inventory::EVENT_AFTER_EXECUTE_UPDATE_INVENTORY_LEVEL`. ([#3835](https://github.com/craftcms/commerce/discussions/3835))
- Added `craft\commerce\services\Pdfs::getPdfUrl()` now generates secure tokenized URLs with expiry timestamps.

### System
- Fixed a bug where purchasables could have a shipping category that was no longer available to their product type. ([#4018](https://github.com/craftcms/commerce/issues/4018))
- Fixed a bug where order emails weren’t always getting rendered for the correct site.
- Fixed a bug where variant titles were being incorrectly generated for draft products. ([#4173](https://github.com/craftcms/commerce/pull/4173), [#4126](https://github.com/craftcms/commerce/issues/4126))
- Fixed a PHP error that occurred when retrieving an order that referenced an archived payment gateway. ([#4172](https://github.com/craftcms/commerce/issues/4172))
- Fixed a bug where variants with inactive products were being returned in GraphQL variant queries. ([#4158](https://github.com/craftcms/commerce/issues/4158))

## 5.4.10 - 2025-11-12

- Fixed a bug where variants were not getting the default shipping category set when the currently set category was no longer available. ([#4018](https://github.com/craftcms/commerce/issues/4018))
- Fixed a SQL error that could occur when viewing unfulfilled orders on PostgreSQL. ([#4171](https://github.com/craftcms/commerce/issues/4171))
- Fixed a bug where duplicate pricing catalog jobs could be queued. ([#4136](https://github.com/craftcms/commerce/issues/4136))
- Fixed a bug where the `commerce_catalogpricing` table could be missing indexes. ([#4160](https://github.com/craftcms/commerce/issues/4160))
Expand All @@ -28,6 +97,7 @@
- Fixed a bug where variants weren’t getting duplicated correctly. ([#4125](https://github.com/craftcms/commerce/issues/4125))
- Fixed a SQL error that could occur when deleting a shipping method.


## 5.4.6 - 2025-09-04

- Fixed a bug where the `commerce/cart/update-cart` action could return unnecessary validation errors. ([3873](https://github.com/craftcms/commerce/issues/3873))
Expand Down Expand Up @@ -121,6 +191,7 @@
- Improved store query performance. ([#4029](https://github.com/craftcms/commerce/issues/4029))
- Fixed a bug where the purchasable cache was not cleared when stock was updated.
- Fixed a PHP error that could occur when sending emails. ([#4017](https://github.com/craftcms/commerce/issues/4017))
- Fixed a bug where order emails weren’t always getting rendered for the correct site.
- Fixed a SQL error that could occur when upgrading to Commerce 5. ([#4044](https://github.com/craftcms/commerce/issues/4044))
- Fixed a bug where duplicate order references could be generated. ([#4050](https://github.com/craftcms/commerce/issues/4050))
- Fixed a bug where purchasables’ `shippingCategoryId` and `taxCategoryId` properties couldn’t be set via `setAttributes()`. ([#4046](https://github.com/craftcms/commerce/issues/4046))
Expand Down
34 changes: 33 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
use craft\events\RegisterCacheOptionsEvent;
use craft\events\RegisterComponentTypesEvent;
use craft\events\RegisterElementExportersEvent;
use craft\events\RegisterEmailMessagesEvent;
use craft\events\RegisterGqlEagerLoadableFields;
use craft\events\RegisterGqlQueriesEvent;
use craft\events\RegisterGqlSchemaComponentsEvent;
Expand All @@ -160,6 +161,7 @@
use craft\services\Gql;
use craft\services\ProjectConfig;
use craft\services\Sites;
use craft\services\SystemMessages;
use craft\services\UserPermissions;
use craft\services\Users;
use craft\utilities\ClearCaches;
Expand Down Expand Up @@ -257,7 +259,7 @@ public static function editions(): array
/**
* @inheritDoc
*/
public string $schemaVersion = '5.4.0.7';
public string $schemaVersion = '5.5.0.5';

/**
* @inheritdoc
Expand Down Expand Up @@ -848,6 +850,22 @@ function(DefineBehaviorsEvent $event) {

Event::on(Purchasable::class, Elements::EVENT_BEFORE_RESTORE_ELEMENT, [$this->getPurchasables(), 'beforeRestorePurchasableHandler']);

// Register system message for PDF download emails
Event::on(
SystemMessages::class,
SystemMessages::EVENT_REGISTER_MESSAGES,
function(RegisterEmailMessagesEvent $event) {
$event->messages = array_merge($event->messages, [
[
'key' => 'commerce_pdf_download',
'heading' => Craft::t('commerce', 'Order PDF Download Link'),
'subject' => Craft::t('commerce', 'Your Order PDF Download Link'),
'body' => $this->_getDefaultPdfDownloadMessage(),
],
]);
}
);

Event::on(Elements::class, Elements::EVENT_AUTHORIZE_VIEW, [$this->getStoreSettings(), 'authorizeStoreLocationView']);
Event::on(Elements::class, Elements::EVENT_AUTHORIZE_SAVE, [$this->getStoreSettings(), 'authorizeStoreLocationEdit']);
Event::on(Elements::class, Elements::EVENT_AUTHORIZE_CREATE_DRAFTS, [$this->getStoreSettings(), 'authorizeStoreLocationEdit']);
Expand Down Expand Up @@ -1276,4 +1294,18 @@ private function _defineResaveCommand(): void
];
});
}

/**
* Returns the default message body for the PDF download email.
*
* @return string
*/
private function _getDefaultPdfDownloadMessage(): string
{
return "Hello,\n\n" .
"You requested a PDF download for your order. Click the link below to download your PDF:\n\n" .
"[Download PDF]({{ link }})\n\n" .
"**Please note:** This link will expire for security purposes.\n\n" .
"Thank you!";
}
}
129 changes: 127 additions & 2 deletions src/base/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use Craft;
use craft\base\SavableComponent;
use craft\commerce\elements\conditions\addresses\GatewayAddressCondition;
use craft\commerce\elements\conditions\orders\DiscountOrderCondition;
use craft\commerce\elements\conditions\orders\GatewayOrderCondition;
use craft\commerce\elements\Order;
Expand Down Expand Up @@ -42,6 +43,18 @@ abstract class Gateway extends SavableComponent implements GatewayInterface
*/
private ?ElementConditionInterface $_orderCondition = null;

/**
* @var ElementConditionInterface|null
* @since 5.5
*/
private ?ElementConditionInterface $_billingAddressCondition = null;

/**
* @var ElementConditionInterface|null
* @since 5.5
*/
private ?ElementConditionInterface $_shippingAddressCondition = null;

/**
* Returns the name of this payment method.
*
Expand Down Expand Up @@ -113,7 +126,7 @@ public function defineRules(): array
$rules = parent::defineRules();
$rules[] = [['paymentType', 'handle'], 'required'];

$rules[] = [['name', 'handle', 'paymentType', 'isFrontendEnabled', 'orderCondition', 'sortOrder'], 'safe'];
$rules[] = [['name', 'handle', 'paymentType', 'isFrontendEnabled', 'orderCondition', 'billingAddressCondition', 'shippingAddressCondition', 'sortOrder'], 'safe'];

return $rules;
}
Expand All @@ -138,6 +151,14 @@ public function availableForUseWithOrder(Order $order): bool
return false;
}

if ($this->hasBillingAddressCondition() && $order->billingAddress && !$this->getBillingAddressCondition()->matchElement($order->billingAddress)) {
return false;
}

if ($this->hasShippingAddressCondition() && $order->shippingAddress && !$this->getShippingAddressCondition()->matchElement($order->shippingAddress)) {
return false;
}

return true;
}

Expand Down Expand Up @@ -203,7 +224,7 @@ public function getOrderCondition(): ElementConditionInterface
*
* @since 5.4.0
*/
public function setOrderCondition(ElementConditionInterface|string|array $condition): void
public function setOrderCondition(ElementConditionInterface|string|array|null $condition): void
{
if (empty($condition)) {
$this->_orderCondition = null;
Expand All @@ -224,6 +245,108 @@ public function setOrderCondition(ElementConditionInterface|string|array $condit
$this->_orderCondition = $condition;
}

/**
* Returns true if this gateway has a billing address condition
*
* @since 5.5
*/
public function hasBillingAddressCondition(): bool
{
return $this->getBillingAddressCondition()->getConditionRules() !== [];
}

/**
* Gets the billing address condition for this gateway
*
* @since 5.5
*/
public function getBillingAddressCondition(): ElementConditionInterface
{
/** @var GatewayAddressCondition $condition */
$condition = $this->_billingAddressCondition ?? new GatewayAddressCondition();
$condition->mainTag = 'div';
$condition->name = 'billingAddressCondition';

return $condition;
}

/**
* Sets the billing address condition for this gateway
*
* @since 5.5
*/
public function setBillingAddressCondition(ElementConditionInterface|string|array $condition): void
{
if (empty($condition)) {
$this->_billingAddressCondition = null;
return;
}

if (is_string($condition)) {
$condition = Json::decodeIfJson($condition);
}

if (!$condition instanceof GatewayAddressCondition) {
$condition['class'] = GatewayAddressCondition::class;
$condition = \Craft::$app->getConditions()->createCondition($condition);
/** @var GatewayAddressCondition $condition */
}
$condition->forProjectConfig = true;

$this->_billingAddressCondition = $condition;
}

/**
* Returns true if this gateway has a shipping address condition
*
* @since 5.5
*/
public function hasShippingAddressCondition(): bool
{
return $this->getShippingAddressCondition()->getConditionRules() !== [];
}

/**
* Gets the shipping address condition for this gateway
*
* @since 5.5
*/
public function getShippingAddressCondition(): ElementConditionInterface
{
/** @var GatewayAddressCondition $condition */
$condition = $this->_shippingAddressCondition ?? new GatewayAddressCondition();
$condition->mainTag = 'div';
$condition->name = 'shippingAddressCondition';

return $condition;
}

/**
* Sets the shipping address condition for this gateway
*
* @since 5.5
*/
public function setShippingAddressCondition(ElementConditionInterface|string|array $condition): void
{
if (empty($condition)) {
$this->_shippingAddressCondition = null;
return;
}

if (is_string($condition)) {
$condition = Json::decodeIfJson($condition);
}

if (!$condition instanceof GatewayAddressCondition) {
$condition['class'] = GatewayAddressCondition::class;
$condition = \Craft::$app->getConditions()->createCondition($condition);
/** @var GatewayAddressCondition $condition */
}
$condition->forProjectConfig = true;

$this->_shippingAddressCondition = $condition;
}

/**
* @return array
* @since 5.4.0
Expand All @@ -239,6 +362,8 @@ public function getConfig(): array
'paymentType' => $this->paymentType,
'isFrontendEnabled' => $this->getIsFrontendEnabled(false),
'orderCondition' => $this->getOrderCondition()->getConfig(),
'billingAddressCondition' => $this->getBillingAddressCondition()->getConfig(),
'shippingAddressCondition' => $this->getShippingAddressCondition()->getConfig(),
];

return $configData;
Expand Down
Loading
Loading