Last active
November 9, 2022 13:07
-
-
Save AngeliMae/da0be5c02367d9cc6a0d2bdc619c8639 to your computer and use it in GitHub Desktop.
Stop registration if customer_code field does not equal ABCDE
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( 'um_submit_form_errors_hook', 'check_customer_code', 100, 1 ); | |
| function check_customer_code( $args ){ | |
| if ( isset( $args['customer_code'] ) && $args['customer_code'] != 'ABCDE' ) { | |
| UM()->form()->add_error( 'customer_code', 'Please put in the correcct passcode' ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment