WPIntell

Source evidence

extra fee (cash on delivery) is not being taxed

Smart COD for WooCommerce · support · 2025-01-02T21:51:00+00:00

complaintsentiment
highseverity
0.98relevance
0replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 35 rows with source links

20.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
lagnes86 unresolved
Hi, 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]

Comments

0 shown

No comments were stored for this source.