• Is there a way to make roles autoassigned to people if they purchase a certain product through a woocommerce connection?

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    I think ‘Yes’.
    Look WooCommerce documentation or code for the suitable hook (action or filter) and use

    
    $current_user->add_role('role_id');
    

    there.

    An example how to replace a default ‘customer’ role for new registered by WooCommerce user to other one is available here.

Viewing 1 replies (of 1 total)

The topic ‘Role Management’ is closed to new replies.