Skip to content

Cart shipping method not being changed when changing shipping address #140

@peteeveleigh

Description

@peteeveleigh

Describe the bug

A customer sets a shipping address, then proceeds to choose a shipping method. Both are set on the cart.
They then backtrack through the checkout and change their shipping address. The new address results in the original selected shipping method being invalid but it is not removed from the cart.

The standard Commerce behaviour would be to remove the selected invalid shipping method from the cart and instead apply the first valid one available for the new shipping address.

Steps to reproduce

  1. Set up shipping options specific to different regions; e.g. USA and Canada
  2. Checkout and set the shipping address to, say, USA
  3. Select the USA specific shipping method offered
  4. Go back and update the shipping address to a Canadian address
  5. Examine the shipping method on the cart, it will still be the USA specific method.

Craft CMS version

4.10.4

Plugin version

3.1.8

Multi-site?

No

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions