Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- You need to hook into um_submit_form_errors_hook with a
- priority over 10.
- You can stop registration here if the customer_code field does not
- match the value you want "ALLOWED_VALUE" in this example
- */
- add_action('um_submit_form_errors_hook', 'check_customer_code', 100 );
- function check_customer_code( $args ){
- if ( $args['customer_code'] != 'ALLOWED_VALUE' ) {
- exit( wp_redirect( add_query_arg('err', 'invalid_customer_code') ) );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement