Fix the filter method in the commerce coupon redemption form template

Created on 28 May 2024, 6 months ago
Updated 12 August 2024, 3 months ago

Problem/Motivation

The file commerce-coupon-redemption-form.html.twig is not implementing the twig filter method correctly.

The filter arguments must be (coupon, key) in order to work correctly.

It is already done in Drupal Commerce.

Proposed resolution

Replace form.coupons|filter(key => key|first != '#' ) by form.coupons|filter((coupon, key) => key|first != '#' )

🐛 Bug report
Status

Fixed

Version

5.5

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024