Question

I am developing one website using woo commerce

Client want to enable and flat rate shipping for wholesaler account user and UPS for retailer user.

I do not have any idea about this.

I will be thankful if any body can provide some useful links or code snippet.

Was it helpful?

Solution 2

I got my problem solved using this filter

add_filter( 'woocommerce_available_shipping_methods', 'test_shipping_mehtod_filter' , 1 );
function test_shipping_mehtod_filter( $methods){
 unset($methods['free_shipping']);
 return $methods;
}

Now i just need to add if condition to check user role :)

OTHER TIPS

There is no great way to do this without hacking core Woocommerce, or that is my opinion. Why not supply wholesalers with a coupon code?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top