Conversation
supportHi, I have an issue regarding my client’s page. I set the price of the extra fee for cash on delivery payment method. I also had to set two different tax rates, one normal, one reduced. The extra fee should be taxed with the reduced rate. How do I set that? I have tried with this code (in the functions.php file): add_action(‘woocommerce_cart_calculate_fees’, ‘custom_cod_tax_rate’, 10, 1); function custom_cod_tax_rate($cart) { if (is_admin() && !defined(‘DOING_AJAX’)) { return; } foreach ($cart->get_fees() as $fee) { if ($fee->name === 'Utánvétes fizetés') { $fee->tax_class = 'Utánvét árak'; } } } (It is a Hungarian site, so the names are in Hungarian.) When using the code, it calculates no tax for the extra fee. Not using the above code, it calculates with the normal tax rate. Any idea? What am I missing or doing wrong? I would be really glad for any help! Thanks in advance! Agnes The page I need help with: [ log in to see the link]
No comments were stored for this source.