a guest Oct 18th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Disable Registration based on Register Helper field value
- Add this code to your active theme's functions.php or
- a custom plugin.
- function my_pmpro_registration_checks($okay)
- //only check if things are okay so far
- // global $pmpro_level;
- if(isset($_REQUEST['not_permitted']) && $_REQUEST['not_permitted'] == 'yes')
- pmpro_setMessage("You are not permitted to register for this level", "pmpro_error");
- $okay = false;
- return $okay;
- add_action("pmpro_registration_checks", "my_pmpro_registration_checks");
RAW Paste Data