woocommerce_checkout_required_field_notice

woocommerce_checkout_required_field_notice

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.9.5

apply_filters('woocommerce_checkout_required_field_notice') is found 1 times:

  • /includes/class-wc-checkout.php line 931
    				}
    
    				if ( $validate_fieldset && $required && '' === $data[ $key ] ) {
    					/* translators: %s: field name */
    					$errors->add( $key . '_required', apply_filters( 'woocommerce_checkout_required_field_notice', sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . esc_html( $field_label ) . '</strong>' ), $field_label, $key ), array( 'id' => $key ) );
    				}
    			}
    		}
    	}
    
    	/**