How to remove vendors the ability to create external products
If you want remove for vendors the ability to create external products you can add this code in functions.php of your theme:
if( function_exists( 'YITH_Vendors' ) ){
add_filter( 'product_type_selector', 'yith_wcmv_product_type_selector', 20 );
if( ! function_exists( 'yith_wcmv_product_type_selector' ) ){
function yith_wcmv_product_type_selector( $types ){
$vendor = yith_get_vendor( 'current', 'user' );
if( $vendor->is_valid() && $vendor->has_limited_access() ){
if( isset( $types['external'] ) ){
unset($types['external']);
}
}
return $types;
}
}
}