Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wooc_validate_extra_register_fields( $username, $email, $validation_errors ) {
- if ( isset( $_POST[‘billing_phone’] ) && empty( $_POST[‘billing_phone’] ) ) {
- $validation_errors->add( ‘billing_phone_error’, __( ‘Error: Phone is required!.’, ‘woocommerce’ ) );
- }
- }
- add_action( ‘woocommerce_register_post’, ‘wooc_validate_extra_phone_field’, 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement