Skip to content

Commit

Permalink
Merge branch 'release/4.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Oct 26, 2022
2 parents b30b617 + 8e30a27 commit 0b21f3b
Show file tree
Hide file tree
Showing 157 changed files with 3,350 additions and 614 deletions.
36 changes: 9 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,23 @@ on:
push:
branches:
- develop
- v3
- '4.2'
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
ecs:
name: ECS
uses: craftcms/.github/.github/workflows/ecs.yml@v2
ci:
name: ci
uses: craftcms/.github/.github/workflows/ci.yml@v3
with:
php_version: '8.0'
phpstan:
name: PHPStan
uses: craftcms/.github/.github/workflows/phpstan.yml@v2
with:
php_version: '8.0'
prettier:
name: Prettier
uses: craftcms/.github/.github/workflows/prettier.yml@v2
codecept:
name: Codeception
needs: [ecs, phpstan, prettier]
uses: craftcms/.github/.github/workflows/codecept.yml@v2
with:
php_versions: '["8.0", "8.1"]'
notify-slack:
name: Notify Slack
needs: [ecs, phpstan, prettier, codecept]
if: ${{ always() }}
uses: craftcms/.github/.github/workflows/notify-slack.yml@v2
with:
success: ${{ needs.ecs.result == 'success' && needs.phpstan.result == 'success' && needs.prettier.result == 'success' && needs.codecept.result == 'success' }}
failure: ${{ needs.ecs.result == 'failure' || needs.phpstan.result == 'failure' || needs.prettier.result == 'failure' || needs.codecept.result == 'failure' }}
failure_text_prefix: <!subteam^S01CWPYH9D5>
craft_version: '4'
jobs: '["ecs", "phpstan", "prettier", "tests"]'
notify_slack: true
slack_subteam: <!subteam^S01CWPYH9D5>
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_COMMERCE_WEBHOOK_URL }}
95 changes: 95 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,100 @@
# Release Notes for Craft Commerce

## 4.2.0 - 2022-10-26

### Store Management
- Discounts’ “Match Customer” conditions can now have a “Has Orders” rule.
- Order conditions can now have a “Completed” rule.
- Order conditions can now have a “Customer” rule.
- Order conditions can now have a “Date Ordered” rule.
- Order conditions can now have a “Has Purchasable” rule.
- Order conditions can now have a “Item Subtotal” rule.
- Order conditions can now have a “Order Status” rule.
- Order conditions can now have a “Paid” rule.
- Order conditions can now have a “Reference” rule.
- Order conditions can now have a “Shipping Method” rule.
- Order conditions can now have a “Total” rule.
- Order conditions can now have a “Total Discount” rule.
- Order conditions can now have a “Total Price” rule.
- Order conditions can now have a “Total Qty” rule.
- Order conditions can now have a “Total Tax” rule.
- It’s now possible to assign primary payment sources on customers.
- It’s now possible to set the quantity when adding a line item on the Edit Order page. ([#2993](https://github.com/craftcms/commerce/discussions/2993))
- The “Update Order Status…” bulk order action now returns a more helpful response message.

### Administration
- Added the `autoSetPaymentSource` config setting, which can be enabled to automatically set a customers’ primary payment sources on new carts.
- Shipping and tax categories are now archived instead of deleted.

### Development
- Order queries now have `itemTotal`, `itemSubtotal`, `shippingMethodHandle`, `totalDiscount`, `total`, `totalPaid`, `totalPrice`, `totalQty`, and `totalTax` params.
- Order queries’ `reference` params now accept a wider range of values.
- `commerce/cart/*` actions now return `shippingAddress` and `billingAddress` values in JSON responses. ([#2921](https://github.com/craftcms/commerce/issues/2921))

### Extensibility
- Added `craft\commerce\base\Stat::getOrderStatuses()`.
- Added `craft\commerce\base\Stat::setOrderStatuses()`.
- Added `craft\commerce\base\StatInterface::getOrderStatuses()`.
- Added `craft\commerce\base\StatInterface::setOrderStatuses()`.
- Added `craft\commerce\base\StatWidgetTrait`.
- Added `craft\commerce\behaviors\CustomerBehavoir::getPrimaryPaymentSource()`.
- Added `craft\commerce\behaviors\CustomerBehavoir::getPrimaryPaymentSourceId()`.
- Added `craft\commerce\behaviors\CustomerBehavoir::setPrimaryPaymentSourceId()`.
- Added `craft\commerce\controllers\PaymentSourcesController::actionSetPrimaryPaymentSource()`.
- Added `craft\commerce\elements\Order::$storedTotalQty`.
- Added `craft\commerce\elements\Order::autoSetPaymentSource()`.
- Added `craft\commerce\elements\conditions\customers\HasOrdersConditionRule`.
- Added `craft\commerce\elements\conditions\orders\CompletedConditionRule`.
- Added `craft\commerce\elements\conditions\orders\CustomerConditionRule`.
- Added `craft\commerce\elements\conditions\orders\DateOrderedConditionRule`.
- Added `craft\commerce\elements\conditions\orders\HasPurchasableConditionRule`.
- Added `craft\commerce\elements\conditions\orders\ItemSubtotalConditionRule`.
- Added `craft\commerce\elements\conditions\orders\ItemTotalConditionRule`.
- Added `craft\commerce\elements\conditions\orders\OrderCurrencyValuesAttributeConditionRule`.
- Added `craft\commerce\elements\conditions\orders\OrderStatusConditionRule`.
- Added `craft\commerce\elements\conditions\orders\OrderTextValuesAttributeConditionRule`.
- Added `craft\commerce\elements\conditions\orders\PaidConditionRule`.
- Added `craft\commerce\elements\conditions\orders\ReferenceConditionRule`.
- Added `craft\commerce\elements\conditions\orders\ShippingMethodConditionRule`.
- Added `craft\commerce\elements\conditions\orders\TotalConditionRule`.
- Added `craft\commerce\elements\conditions\orders\TotalDiscountConditionRule`.
- Added `craft\commerce\elements\conditions\orders\TotalPriceConditionRule`.
- Added `craft\commerce\elements\conditions\orders\TotalQtyConditionRule`.
- Added `craft\commerce\elements\conditions\orders\TotalTaxConditionRule`.
- Added `craft\commerce\elements\db\OrderQuery::$itemSubtotal`.
- Added `craft\commerce\elements\db\OrderQuery::$itemTotal`.
- Added `craft\commerce\elements\db\OrderQuery::$shippingMethodHandle`.
- Added `craft\commerce\elements\db\OrderQuery::$totalDiscount`.
- Added `craft\commerce\elements\db\OrderQuery::$totalPaid`.
- Added `craft\commerce\elements\db\OrderQuery::$totalPrice`.
- Added `craft\commerce\elements\db\OrderQuery::$totalQty`.
- Added `craft\commerce\elements\db\OrderQuery::$totalTax`.
- Added `craft\commerce\elements\db\OrderQuery::$total`.
- Added `craft\commerce\elements\db\OrderQuery::itemSubtotal()`.
- Added `craft\commerce\elements\db\OrderQuery::itemTotal()`.
- Added `craft\commerce\elements\db\OrderQuery::shippingMethodHandle()`.
- Added `craft\commerce\elements\db\OrderQuery::total()`.
- Added `craft\commerce\elements\db\OrderQuery::totalDiscount()`.
- Added `craft\commerce\elements\db\OrderQuery::totalPaid()`.
- Added `craft\commerce\elements\db\OrderQuery::totalPrice()`.
- Added `craft\commerce\elements\db\OrderQuery::totalQty()`.
- Added `craft\commerce\elements\db\OrderQuery::totalTax()`.
- Added `craft\commerce\models\PaymentSource::getIsPrimary()`.
- Added `craft\commerce\models\Settings::$autoSetPaymentSource`.
- Added `craft\commerce\records\Customer::$primaryPaymentSourceId`.
- Added `craft\commerce\services\savePrimaryPaymentSourceId()`.
- `craft\commerce\elements\Order::hasMatchingAddresses()` now has an `$attributes` argument, which can be used to customize which address attributes should be checked.
- Deprecated `craft\commerce\elements\Order::getShippingMethod()`. `$shippingMethodName` and `$shippingMethodHandle` should be used instead.

### System
- Craft Commerce now requires Craft CMS 4.3.0 or later.
- Fixed a bug where it wasn't possible to use a path value for the `loadCartRedirectUrl` setting. ([#2992](https://github.com/craftcms/commerce/pull/2992))
- Fixed a bug where custom shipping methods weren’t applying to orders properly. ([#2986](https://github.com/craftcms/commerce/issues/2986))
- Fixed a bug where passing an invalid product type handle into product queries’ `type` params wouldn’t have any effect. ([#2966](https://github.com/craftcms/commerce/issues/2966))
- Fixed a bug where payments made from Edit Order pages weren’t factoring in gateways’ `availableForUseWithOrder()` methods. ([#2988](https://github.com/craftcms/commerce/issues/2988))
- Fixed a bug where the Emails index page wasn’t showing emails’ template paths. ([#3000](https://github.com/craftcms/commerce/issues/3000))
- Fixed a bug where product slideout editors were showing additional status fields. ([#3010](https://github.com/craftcms/commerce/issues/3010))

## 4.1.3 - 2022-10-07

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can learn all about it at [craftcms.com/commerce](https://craftcms.com/comme

## Requirements

This plugin requires Craft CMS 4.1 or later.
This plugin requires Craft CMS 4.3 or later.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"prefer-stable": true,
"require": {
"php": "^8.0.2",
"craftcms/cms": "^4.1.2",
"craftcms/cms": "^4.3.0",
"dompdf/dompdf": "^2.0.0",
"ibericode/vat": "^1.1.2",
"iio/libmergepdf": "^4.0"
Expand Down
Loading

0 comments on commit 0b21f3b

Please sign in to comment.