Restore support for sku from token

Created on 6 January 2025, about 2 months ago

Problem/Motivation

Earlier versions of this module allowed for a product variation to be identified as the order item based on a token from the form that provided an sku.

This feature was inadvertently lost in the introduction of support for commerce_purchasable_entity, resulting in a BC break.

This problem was identified in 💬 Unable to load the specified entity of type commerce_product_variation after upgrade Active , but the fix there only addressed it for stored skus, not ones from tokens.

Steps to reproduce

1. Configure a webform to get its product variation from a radios element that supplies an sku as value. This may require using hook_webform_options_TYPE_alter().
2. Try to submit the webform.

Proposed resolution

Ensure that we attempt to load a product variation by sku as well as uuid and variation_id.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom jonathanshaw Stroud, UK

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024