Deposit - How to remove Deposit's option from product edit page, when editing product as a Vendor
If you want remove Deposit's option from product edit page, when editing product as a Vendor try to add the following snippet of code ad the end of functions.php file of your theme or child:
add_action( 'init', 'yith_wcmc_remove_deposit_for_vendors', 20 );
function yith_wcmc_remove_deposit_for_vendors(){
if( function_exists( 'yith_get_vendor' ) && defined( 'YITH_WCDP' ) ){
$vendor = yith_get_vendor( 'current', 'user' );
if( $vendor->is_valid() && $vendor->has_limited_access() ){
remove_filter( 'woocommerce_product_data_tabs', array( YITH_WCDP_Admin_Premium(), 'register_product_tabs' ) );
remove_action( 'woocommerce_product_data_panels', array( YITH_WCDP_Admin_Premium(), 'print_product_deposit_tabs' ), 10 );
}
}
}