MultiVendor - How to remove the Metaboxes Custom Fields in add / edit order / quote for vendors

If you want remove the Metaboxes Custom Fields in add / edit order / quote for vendors you can add this code in your functions.php:

 

if( function_exists( 'yith_get_vendor' ) && ! function_exists( 'yith_wcmv_remove_meta_boxes' ) ){
function yith_wcmv_remove_meta_boxes(){
global $post;
if( is_admin() && 'shop_order' == $post->post_type ){
$vendor = yith_get_vendor( 'current', 'user' );
if( $vendor->is_valid() && $vendor->has_limited_access() ){
remove_meta_box( 'postcustom', $post->post_type, 'normal' );
}
}
}
add_action( 'add_meta_boxes', 'yith_wcmv_remove_meta_boxes', 50 );
}
Was this article helpful?
0 out of 0 found this helpful

Back to Help Center

Powered by Zendesk