Не уверен, но попробуй добавить в functions.php своей темы:
function remove_vat_for_specific_role( $price, $product ) {
$target_role = 'custom_role';
$current_user = wp_get_current_user();
if ( in_array( $target_role, (array) $current_user->roles ) ) {
$price_excluding_tax = wc_get_price_excluding_tax( $product );
return wc_price( $price_excluding_tax );
}
return $price;
}
add_filter( 'woocommerce_get_price_html', 'remove_vat_for_specific_role', 10, 2 );
add_filter( 'woocommerce_cart_item_price', 'remove_vat_for_specific_role', 10, 2 );
add_filter( 'woocommerce_cart_item_subtotal', 'remove_vat_for_specific_role', 10, 2 );
add_filter( 'woocommerce_cart_subtotal', 'remove_vat_for_specific_role', 10, 2 );
add_filter( 'woocommerce_get_cart_total', 'remove_vat_for_specific_role', 10, 2 );
add_filter( 'woocommerce_cart_contents_total', 'remove_vat_for_specific_role', 10, 2 );