Created
August 29, 2019 00:33
-
-
Save andrii-kvlnko/25b5b40f47055b0964ff4b0bc12c3e6a to your computer and use it in GitHub Desktop.
Wordpress | Woocommerce | Custom validation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_after_checkout_validation', 'prefix_validate', 10, 2); | |
function prefix_validate( $fields, $errors ){ | |
if ( true ){ | |
$errors->add( 'validation', 'Validation Message' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment