Missing validate-required CSS class breaks Stripe payment method creation
-
Custom checkout fields of type
radio,select,multicheckbox,multiselectandfilerendered by this plugin are missing thevalidate-requiredCSS class on their wrapper element when marked as required, even though the field is correctly flaggedrequired => truein the PHP field definition.The cause is in
lib/view/frontend/class-fields-filter.php, methodcustom_field():if ( $args['required'] ) { // $args['class'][] = 'validate-required'; $required = ' <abbr class="required" title="' . esc_attr__( 'required', 'woocommerce-checkout-manager' ) . '">*</abbr>'; }The line that adds the
validate-requiredclass to$args['class']is commented out. As a result, the field visually shows a required asterisk, but the rendered<p class="form-row ...">wrapper never receivesvalidate-required.This class is the standard convention WooCommerce core (and other plugins) use client-side to detect empty required fields during checkout validation.
Impact:
This went unnoticed for a long time because it only affected the visual “empty required field” highlighting for these field types. However, WooCommerce Gateway Stripe 10.9.0 (released 2026-08-17) added stricter client-side validation of required billing fields before creating/confirming the Stripe payment intent (see their changelog: “Validate customer details against required billing fields from checkout before sending to Stripe”, “Prevent unnecessary Stripe payment method creation when shortcode checkout has empty required fields”).
Because of the missing
validate-requiredclass, this new Stripe logic gets confused for sites that have at least one requiredradio/select/multicheckbox/multiselect/filefield added via this plugin. The practical symptom: checkout fails on every single order paid by Stripe (card), with the WooCommerce Stripe log showing:The information for creating and confirming the intent is missing the following data: payment_method.i.e. the checkout form submits to the server, but the client-side Stripe payment method (
pm_xxx) was never attached before submission.Steps to reproduce:
- Add a required custom billing field of type “Multiple checkbox” (or radio/select/multiselect/file) via WooCommerce Checkout Manager.
- Enable WooCommerce Gateway Stripe 10.9.0+ with the credit card (UPE) payment method.
- Go through checkout and pay by card.
- Payment fails; WooCommerce > Status > Logs >
woocommerce-gateway-stripeshows the “missing payment_method” error above. - Disabling WooCommerce Checkout Manager, or removing the “required” flag from the affected field, makes checkout succeed again.
Suggested fix:
Uncomment the line in
class-fields-filter.php:if ( $args['required'] ) { $args['class'][] = 'validate-required'; $required = ' <abbr class="required" title="' . esc_attr__( 'required', 'woocommerce-checkout-manager' ) . '">*</abbr>'; }so the rendered markup matches what the field definition already declares.
You must be logged in to reply to this topic.