Vendor vs. Disabled Vendor vs. Expired-Membership Vendor

WooCommerce Multivendor Marketplace – Home Forums WCFM – Membership Vendor vs. Disabled Vendor vs. Expired-Membership Vendor

This topic contains 1 reply, has 2 voices, and was last updated by WCfM Forum WCfM Forum 1 month, 1 week ago.

  • Author
    Posts
  • #31223 Reply

    d-n-13
    Participant

    Hello good wcfm team,

    I am thinking how I can manage Vendors that I disabled because I don’t want them to renew again, while keeping the ability to re-sub for vendors who have their membership expired and their roles changed to “Disabled Vendors”

    I have my cancellation and expiration of memberships changes vendors to Disabled role, because I want their products to go Draft and I don’t want them to show up in stores list until they resup again to paid or free membership. (I like the system this way)

    But, there is no way to disable vendors and block them from re-subbing again.

    Any ideas ?

    Thank you.

  • #31313 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Kindly add this code for the purpose –

    add_filter( 'wcfm_allowed_membership_user_roles', function( $allowed_roles ) {
    	if (($key = array_search( 'disable_vendor', $allowed_roles ) ) !== false) {
        unset($allowed_roles[$key]);
      }
    	return $allowed_roles;
    }, 500 );

    Thank You

Reply To: Vendor vs. Disabled Vendor vs. Expired-Membership Vendor
Your information: