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 3 months ago.

  • Author
    Posts
  • #31223

    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
    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

The topic ‘Vendor vs. Disabled Vendor vs. Expired-Membership Vendor’ is closed to new replies.