Vendor Applicant can view/access dashboard

WCMp Advanced Frontend Manager

Resolved
Viewing 5 reply threads
  • Author
    Posts
    • #114614
      info75
      Participant

      Vendor applicant should not access/view dashboard, it was the old feature. Vendor stay in the vendor application page like before.

      Any solution?
      https://ibb.co/Ns9jhRZ

    • #114674
      WCMp Admin
      Keymaster

      Hi @info75,

      This was never a bug rather well published plugin feature.

      Now if you want to redirect your pending vendor to vendor registration page – this is more of a custom requirement, hence it has been forwarded to team for consideration, but yes that would take a considerable amount of time.

      So basically we will be simply redirecting vendor based on their role i.e if they are pending vendors, they will be always redirected to vendor registration page.

      Regards,

    • #114694
      WCMp Admin
      Keymaster

      Hi Again,

      Use this below code in your currently active theme functions.php file
      Expected flow ( video attached for proof )

      // Redirect to vendor registration page if vendor is pending
      add_filter(‘login_redirect’, function($redirect_to, $requested_redirect_to, $user){
      if ( isset($user->roles) && is_array($user->roles)) {
      if(in_array(‘dc_pending_vendor’, $user->roles)) {
      wp_logout();
      $redirect_to = get_page_link( wcmp_vendor_registration_page_id() );
      return $redirect_to;
      }
      }
      return $redirect_to;

      }, 9999, 3);

      add_filter( ‘woocommerce_login_redirect’, function($redirect, $user) {

      if(in_array(‘dc_pending_vendor’, $user->roles)) {
      wp_logout();
      $redirect = get_page_link( wcmp_vendor_registration_page_id());
      return $redirect;
      }
      return $redirect;
      }, 99, 2 );

    • #114695
      info75
      Participant

      Thanks. Please reupload the video. I think you forgot to attach .

    • #114696
      WCMp Admin
      Keymaster

      Hi again,

      Uploading failed because it exceeded size limit. Here’s the drive link, you can have a look- https://drive.google.com/file/d/1mmBF060M_JGS0UKes-NdTOAGHKvkZuIC/view?usp=sharing

      Regards,

    • #118641

      We have not received any update from you for a long. Hope this ticket is already been resolved.

      We are now closing this ticket. Kindly create a new one if you need any further help.

Viewing 5 reply threads

The topic ‘Vendor Applicant can view/access dashboard’ is closed to new replies.