User roles get overwritten during registration

WCMp Core

User roles get overwritten during registration Open

Viewing 3 reply threads
  • Author
    Posts
    • #89643
      Kristen Womack
      Participant

      Hi,
      I am experiencing an issue where once a person registers their previous user role is overwritten to just ‘dc_pending_vendor’ and then on approval is just ‘vendor’. How can I fix this issue to make sure that the plugin is just adding the pending and approved vendor user roles vs removing their current roles.

    • #89712

      @Kristen Womack, thanks for getting in touch with us.

      As per the flow, the user can have only one role. Now, if the option Approve Vendors Manually option is disabled (see this screenshot – https://prnt.sc/r1l74k), then when the user registers as a vendor, they will be added as “Pending Vendor”.

      When admin will approve them, then their role will be a vendor (i.e. dc_vendor).

      Please note, as per default flow, a user can have only one role.

    • #89786
      Kristen Womack
      Participant

      @moumita what about sites that need users to keep additional roles? If somebody is a vendor and editor (or any other role), do you all have a filter or hook for this?

    • #89834

      @Kristen Womack, you can add an additional role using code or some plugin. If you want to add the additional roles, you need to use this

      $someone = new WP_User( $user_id ); $someone->add_role( 'role-1' ); $someone->add_role( 'role-2' );
      copy

      Please note, providing additional role might cause the issue with the vendor’s default capabilities.

Viewing 3 reply threads

Please LOGIN to reply to this topic

WCMp bundle is available at a slashed price

Grab It Now