Okay
  Public Ticket #2997834
Match Wordpress User Roles with B2B king Roles
Closed

Comments

  • Antonis Kanaris started the conversation

    Good evening, 

    For many functional reasons I use ultimate member plugin with different registration forms B2B (Subscriber user role in Wordpress) and B2C (Customer user role in Wordpress). I have noticed that the B2Bking plugin has different meta fields for user roles and groups that i want to match with wordpress user roles. For example: A new wholesale user registers as subscriber user role, I want automatically added to B2B Registered users in B2Bking plugin in order to get dymamic rules. 

    If user role is subscriber, automatically add the user to B2B registered users and if the user role is Customer automatically add the user to B2C Registered users. 

    Could you please help me to implement this?


  •  2,619
    WebWizards replied

    Hi Antonis,

    Thank you for purchasing our plugin,


    If I understand correctly, you're currently using 2 different registration forms, created through the Ultimate Member plugin?


    All registered users are by default B2C in B2BKing, so all we would need to do in this case, is to connect your B2B registration form, so that it automatically adds users to the correct B2BKing B2B group.

    You need to configure the registration form, so that it sets 2 meta keys:

    • b2bking_b2buser  must have the value yes
    • b2bking_customergroup must have the value of the B2B group ID (e.g. 1234 )

    To get a B2B group ID, go to B2BKing -> Groups -> Business and click on the group. The number in the URL is the ID (e.g. if the URL says ?post=123, then the ID is 123. You will set the b2bking_customergroup meta key to the value 123).


    I believe Ultimate Member has a way to configure this through the registration form.

    When I look here at this docs: https://docs.ultimatemember.com/article/188-adding-fields-to-a-form

    2954309062.png

    I see you can add meta keys and values to ultimate member fields. Perhaps you can create a hidden input field with the correct meta key and value.


    Kind regards,

    Stefan