Merge pull request #10597 from vasikgreif/patch-2

Add filter for required fields error message
This commit is contained in:
Mike Jolley 2016-03-24 11:26:56 +00:00
commit 7a3d72d098
1 changed files with 1 additions and 1 deletions

View File

@ -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 ] ) ) {