When a vendor is added in the site, we create their default shipping class, that is auto-assigned with their products. This code will stop creating this default shipping class :
/* Disable autocreate vendor shipping class */
add_filter('mvx_add_vendor_shipping_class', '__return_false');
Now use this code to let the vendor access all the shipping classes of the site :
"/* Allow vendors to view/choose admin created shipping classes */
add_filter('mvx_allowed_only_vendor_shipping_class', '__return_false');
add_action('init', 'init_mvx');
function init_mvx(){
global $mvx;
remove_filter('woocommerce_product_options_shipping', array($mvx->vendor_dashboard, 'mvx_product_options_shipping'), 5);
}"
Leave a Reply
You must be logged in to post a comment.