Вопрос

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.

Это было полезно?

Решение 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 :)

Другие советы

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?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top