MemberPress: Prevent Customers from Certain States in the US from Registering
function mepr_custom_limit_signups_by_state( $errors ) { $usr_country = sanitize_text_field( $_POST[‘mepr-address-country’] ); $usr_state = sanitize_text_field( $_POST[‘mepr-address-state’] ); $exclude_states = array(‘AK’); //Change this as needed or you can do a comma seperated list of state abbr. //If state in excluded list throw error…Continue reading