[WooCommerce] Replacement of Confession in the Box
Function ShowOneError( $fields, $errors)
If their is any validation errors
if( .empty( $errors->get_error_codes() )
Remove all of Error msg
Foreach( $errors->get_error_codes() as $code ) {
$errors->remove ( $code )
The
Our custom error msg
$errors->add('validation', 'Control the fullness of the fields');
The
The
add_action('woocommerce_after_checkout_validation','ShowOneError',999,2);
If their is any validation errors
if( .empty( $errors->get_error_codes() )
Remove all of Error msg
Foreach( $errors->get_error_codes() as $code ) {
$errors->remove ( $code )
The
Our custom error msg
$errors->add('validation', 'Control the fullness of the fields');
The
The
add_action('woocommerce_after_checkout_validation','ShowOneError',999,2);