Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. /**
  2.  
  3. You need to hook into um_submit_form_errors_hook with a
  4. priority over 10.
  5.  
  6. You can stop registration here if the customer_code field does not
  7. match the value you want "ALLOWED_VALUE" in this example
  8.  
  9. */
  10.  
  11. add_action('um_submit_form_errors_hook', 'check_customer_code', 100 );
  12. function check_customer_code( $args ){
  13.  
  14. if ( $args['customer_code'] != 'ALLOWED_VALUE' ) {
  15. exit( wp_redirect( add_query_arg('err', 'invalid_customer_code') ) );
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement