Merge pull request #10597 from vasikgreif/patch-2
Add filter for required fields error message
This commit is contained in:
commit
7a3d72d098
|
@ -457,7 +457,7 @@ class WC_Checkout {
|
|||
$field_label = $field['label'];
|
||||
break;
|
||||
}
|
||||
wc_add_notice( sprintf( _x( '%s is a required field.', 'FIELDNAME is a required field.', 'woocommerce' ), '<strong>' . $field_label . '</strong>' ), 'error' );
|
||||
wc_add_notice( apply_filters( 'woocommerce_required_checkout_fields_error', sprintf( _x( '%s is a required field.', 'FIELDNAME is a required field.', 'woocommerce' ), '<strong>' . $field_label . '</strong>' ), $field_label ), 'error' );
|
||||
}
|
||||
|
||||
if ( ! empty( $this->posted[ $key ] ) ) {
|
||||
|
|
Loading…
Reference in New Issue