Last active
February 28, 2018 15:59
-
-
Save ultimatemember/296161825d8127fa28fc to your computer and use it in GitHub Desktop.
Stop registration if customer_code field does not equal ABCDE
This file contains 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 ); | |
function check_customer_code( $args ){ | |
if ( isset( $args['customer_code'] ) && $args['customer_code'] != 'ABCDE' ) | |
exit( wp_redirect( add_query_arg('err', 'invalid_customer_code') ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment