0

good day, my registration form has some custom fields, basically I want to approve the user if and only if some fields are filled with some specific values, if they're not, then these accounts must be manually approved

do you know some hook and code that I can use for this purpose?...thank you so much

1 Answer 1

1
 ## Try this if you are using Woocommerce   

    function ws_new_user_approve_registration_message(){
                $not_approved_message = '<p class="registration">Send in your registration application today!<br /> NOTE: Your account will be held for moderation and you will be unable to login until it is approved.</p>';

                if( isset($_REQUEST['approved']) ){
                        $approved = $_REQUEST['approved'];
                        if ($approved == 'false')  echo '<p class="registration successful">Registration successful! You will be notified upon approval of your account.</p>';
                        else echo $not_approved_message;
                }
                else echo $not_approved_message;
        }
        add_action('woocommerce_before_customer_login_form', 'ws_new_user_approve_registration_message', 2);
1
  • You're suggesting a woocommerce hook without knowing if the OP is using Woocommerce.
    – TomC
    Mar 13, 2020 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.