[WooCommerce] Replacement of Confession in the Box

Web Programming
Job 18 of 53
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);
Details
  • Added:
161

Freelancer

  • Projects 148
  • Rating -
  • Rating 3 768
Register

If you have an account, log in

Indicators

  • Last visit: 5 months 27 days ago