Unable to save shipping method when a product has been deleted

Created on 3 March 2025, about 1 month ago

Problem/Motivation

We are unable to save a shipping method that contained a deleted Product as part of the shipping method's match criteria. Unchecking "Order Products" completely still prevents the form from being saved with an error: "Products field is required".

We did identify a workaround for this by resaving a valid product reference in the match criteria. After a successful save we were able to uncheck "Order Products" and save again.

Steps to reproduce

  • Create a shipping method that has a product restriction:
    • Check "Order products"
    • Select "Order contains none of the following products"
    • Add a single reference to a valid Product
    • Select any other valid criteria under the Product restriction such as "Order contains product types"
  • Save the Shipping Method
  • Delete the product that was referenced
  • Edit the shipping method that was previously created
  • See that there are no products referenced under "Order contains none of the following products"
  • Uncheck "Order Products"
  • Attempt to save the shipping method
  • An error will prevent form from saving: Products field is required

Proposed resolution

Fix the validation issue preventing the form from saving.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jordan.caldwell

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024