Vendors Registration

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 6 reply threads
  • Author
    Posts
    • #27349
      Alice
      Guest

      Hey,

      When someone registers on my site to become a vendor, the first page it directs them to is WCMP which displays the wrong dashboard.

      For the time being, I’ve set up a redirect so if someone goes to the page /wcmp they get redirected to /wcfm which does the job, but I wanted to check if there was a better way I should be doing this?

      Thanks!

    • #27350
      Alice
      Guest
      This reply has been marked as private.
    • #27352
      WCFM Forum
      Member

      Hi,

      Are you using WC Marketplace default registration form for vendor registration?

      Actually, WCfM core already has this function to redirect vendors from WC Marketplace dashboard to WCfM Dashboard.
      I don’t think any additional code required for this.

      Between, any chance do you have used “wcfm_is_allow_multivendor_dashboard_redirect” filter anywhere in your custom codes?

      Thank You

    • #27354
      Alice
      Guest

      I’m not sure to be honest – I assume I’m using the default registration.

      I seem to have the following code in my snippets, I don’t remember adding it though haha – should I remove it?

      add_filter( ‘wcfm_is_allow_multivendor_dashboard_redirect’, ‘__return_false’ );

      function wcfm_dashbord_template_redirect() {
      global $WCFM;

      if( is_user_logged_in() && is_vendor_dashboard() ) {
      $user = wp_get_current_user();
      $allowed_roles = apply_filters( ‘wcfm_allwoed_user_rols’, array( ‘administrator’, ‘shop_manager’ ) );
      if ( array_intersect( $allowed_roles, (array) $user->roles ) ) {
      wp_safe_redirect( get_wcfm_url() );
      exit();
      }
      }
      }
      add_action( ‘template_redirect’, ‘wcfm_dashbord_template_redirect’, 600 );

    • #27384
      WCFM Forum
      Member

      Hi,

      Please disable all these codes and take a look.

      Problematic code – add_filter( ‘wcfm_is_allow_multivendor_dashboard_redirect’, ‘__return_false’ );

      And for this you have to add redirect rule again, but it’s already there in WCfM.

      Thank You

    • #27399
      Alice
      Guest

      perfect thank you!

    • #27400
      WCFM Forum
      Member

      You are welcome 🙂

Viewing 6 reply threads
  • The topic ‘Vendors Registration’ is closed to new replies.