Skip to content

Commit

Permalink
Merge branch 'develop' into 5.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/ci.yml
  • Loading branch information
nfourtythree committed Oct 26, 2022
2 parents b311cea + eb5f65e commit 15c06ac
Show file tree
Hide file tree
Showing 11 changed files with 224 additions and 223 deletions.
68 changes: 0 additions & 68 deletions CHANGELOG-WIP.md

This file was deleted.

99 changes: 91 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,99 @@
# Release Notes for Craft Commerce

## Unreleased
## 4.2.0 - 2022-10-26

### Deprecated
- Deprecated `craft\commerce\elements\Order::getShippingMethod()`. Use `$shippingMethodName` and `$shippingMethodHandle` instead.
### 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.

### Fixed
### 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 that occurred when using a custom shipping method. ([#2986](https://github.com/craftcms/commerce/issues/2986))
- Fixed a bug that could occur when querying products by `type`. ([#2966](https://github.com/craftcms/commerce/issues/2966))
- Fixed a bug where `availableForUseWithOrder` on payment gateways not respecting on payment transaction modal. ([#2988](https://github.com/craftcms/commerce/issues/2988))
- Fixed a bug where the “Template Path” was blank on the Emails index page. ([#3000](https://github.com/craftcms/commerce/issues/3000))
- 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

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.3.x-dev as 4.3.0",
"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 15c06ac

Please sign in to comment.