Showing prices without VAT based on roles
-
Hello,
On my e-shop i have two type of users: Private and Wholesaler
I managed to remove the vat on checkout for the Wholesaler category using this codefunction wc_diff_rate_for_user( $tax_class, $product ) {
if ( is_user_logged_in() && current_user_can( ‘wholesaler’ ) ) {
$tax_class = ‘Zero Rate’;
}
return $tax_class;
}
add_filter( ‘woocommerce_product_tax_class’, ‘wc_diff_rate_for_user’, 1, 2 );And this works correctly.
But on the product page the price is shown including the VAT even if the user is a wholesaler, and that’s bad.
How can I remove the VAT also in the product page ONLY for the Wholesaler role??
Thank you so much
- The topic ‘Showing prices without VAT based on roles’ is closed to new replies.