Commerce 1.2.6

Today we're releasing the first Commerce update of the year. Normally we try to release small iterative patch releases, but with the push to release MODX 3.0 and other projects, this one has grown quite big!

Among many fixes, this release is required for the new ItemOptions module we're also releasing today.

Below you'll find the full list of changes in this release. Some highlights are in bold.

  • [core] Fix a bunch of MODX 3 incompatibilities, type checks, etc
  • [core] Display file and line number accurately when using adapter's log() function
  • [core] Add max length validators to description fields on forms [#940]
  • [checkout] Fix item adjustments not being copied from a session order to a persisted one when checking out
  • [dashboard] Render order item adjustments on detail page directly, without having to expand calculations
  • [dashboard] Fix missing slash being displayed in configuration admin template check [#925]
  • [dashboard] Fix wrong lexicon used for deleting tax groups
  • [dashboard] Fix inputClass not working on select and multiple select field types
  • [dashboard] Make sure dashboard and discounts tab don't display if missing related permissions [#928]
  • [dashboard] Fix incorrect container height in MODX3 [#955]
  • [discounts] Fix free products not respecting min/max quantity discount conditions [#952]
  • [emails] Fix order item adjustments missing from email messages; now available under items[n].adjustments per the cart and included in the default emails
  • [install] Fix installing default policies on MODX3
  • [gateways] Mollie: make sure the order summary uses multibyte functions when shortening product names, to avoid json encode issues
  • [gateways] Stripe: handle Customer ID changing by cancelling existing PaymentIntent, and creating a new one [#891]
  • [orders] Don't calculate tax totals if there are no items to calculate with, fixing "Encountered empty IN condition with key id" error [#898]
  • [orders] Use strict check when removing items from a session order
  • [orders] Avoid undefined array key warnings on PHP8 when a shipment has no tax rate assigned [#911]
  • [products] Allow product bundles to have infinite stock if all its products have infinite stock [#876]
  • [reports] Fix cancelled orders being included when calculating total tax [#888]
  • [reports] Fix cancelled orders being included in tax report calculations [#889]
  • [snippets] All snippet properties passed to commerce.get_product(s) are now passed through to templates with a "scriptProperties." prefix
  • [tvs] Prevent MySQL error when a product list TV has no value yet (on some environments)
  • [tvs] Prevent the product list TV modal from auto-closing when attempting to save, this is so user is aware if there was an error [#945]

Updated dependencies:

  • composer/ca-bundle (1.2.10 => 1.3.1)
  • guzzlehttp/promises (1.4.1 => 1.5.1)
  • guzzlehttp/psr7 (1.8.2 => 1.8.5)
  • mollie/mollie-api-php (v2.37.1 => v2.42.0)
  • stripe/stripe-php (v7.97.0 => v7.121.0)
  • symfony/polyfill-ctype (v1.23.0 => v1.25.0)
  • symfony/polyfill-intl-idn (v1.23.0 => v1.25.0)
  • symfony/polyfill-intl-normalizer (v1.23.0 => v1.25.0)
  • symfony/polyfill-mbstring (v1.23.1 => v1.25.0)
  • symfony/polyfill-php72 (v1.23.0 => v1.25.0)

At this point we're considering Commerce ready to use on MODX 3.0 as well. In our testing it has been behaving as it should, but let us know if you do encounter any problems.

There is one potential known issue in MODX 3.0: if run into a "Undefined function Util::chooseHandler()" error after upgrading, install the Guzzle7 package. This is due to a Guzzle conflict, which is now shipped with MODX as well. The Guzzle7 package helps avoid the conflict.

Note that in Commerce 1.3 we're increasing the minimum supported PHP version from 7.1 to 7.3 so we can remove the older Guzzle version from Commerce, and upgrade other dependencies.

We're expecting to release a first pre-release for Commerce 1.3 towards the end of the month, or early May. There are a lot of exciting features in 1.3 we can't way to share with you soon.