0
votes

Can anyone help guide me the process of creating two separate woocommerce registration form pages for two different user roles?

I have installed the woocommerce wholesale prices plugin to enable me to create wholesale listings in the store along with the wholesale user role

My client has now asked to create two separate pages with a registration form for retail customers and a registration page for wholesale customers.

Any help on this would be greatly appreciated .

1

1 Answers

0
votes

You can use register_form hook to do that

add_action('register_form','add_different_field');

function add_different_field(){
    if (isset($_GET['role'])){
        if($_GET['role'] == 'wholesaler'){
        echo '<input id="user_email" type="hidden" tabindex="20" size="25" value="'.$_GET['role'].'" name="role"/>';
 // or more fields
       }else{
         // Add other user fields
       }
    }
}