I have to solve the following problem to which I didn’t find any solution by now.
I am working on a WordPress site, on which I implemented Woocommerce. Besides the possibility of buying products, I would like to let teh customers downloading a pdf catalogue. However the catalogue may be for customers or for resellers, according to the parameters they specify when the register their account (I already customized the account fields in the Woocommerce registration form).
I used the WP Download Manager plugin, which permits to donwload files according to the user role. Hence the idea is to create user roles according to the parameters specified in the registration form. Hence if a reseller checks the “reseller checkbox” a user role “reseller-customer” will be created; otherwise if the client is a private, the “reseller checkbox” won’t be checked and the user role thus created will be “private-customer”.
Is that possible? Thanks for help!
That definitely sounds possible, either through a plugin or through an filter hook on functions.php in your theme (child theme).
I’m using An ajax registration plugin that allows you to set the role by registration type. To make it as easy as possible, setup multiple registration pages and link to them on your menu or on a parent ‘page’ (not post).
There are several different ways to go about it.
For instance I would even recommend this plugin as well