Home / Forums / WoodMart support forum / Tiered pricing – wrong
Home › Forums › WoodMart support forum › Tiered pricing – wrong
Tiered pricing – wrong
- This topic has 4 replies, 2 voices, and was last updated 3 hours, 37 minutes ago by
website-art.de.
-
AuthorPosts
-
July 19, 2026 at 2:21 pm #723991
website-art.deParticipantI have set up tiered pricing for three products. The price is calculated in either CHF or EUR using the FOX Currency Switcher plugin.
For CHF, the price is calculated correctly at checkout. For EUR, however, VAT is added on top. However, this applies only to orders of 2 or more units.Attachments:
You must be logged in to view attached files.July 20, 2026 at 9:51 am #724008Hello,
I see all the prices in CHF on your website and there is no currency switcher available. Could you please clarify how to switch to EUR and reproduce the problem?
Kind Regards
July 21, 2026 at 10:01 am #724060
website-art.deParticipantHello, thanks for your reply.
I installed the FOX plugin and received this response from support:What we suggest you do: ask WoodMart support where exactly the tiered price table is rendered and which filter or action hook is available for it. Once you know the hook name, replacing the printed values with the shortcode output is a small piece of code. If you send us that hook name, we can help you with the snippet.
Could you please answer that for me?
Kind Regards
July 21, 2026 at 2:22 pm #724089Hi,
Thanks for your patience, and thanks to the FOX team for the clear question.
The tiered pricing feature is our Dynamic Discounts module. There are two parts, and they’re worth separating:
1. The pricing table on the product page is rendered by
XTS\Modules\Dynamic_Discounts\Frontend::render_dynamic_discounts_table(), hooked towoocommerce_single_product_summary(priority 25). It loads the templatewoocommerce/single-product/price-table.php(overridable in a child theme). The prices there are produced with$product->get_price()andwc_price(), so FOX’s standardwoocommerce_product_get_priceandwc_pricefilters already apply to that table. For layout, there are also two action hooks around it:woodmart_before_dynamic_discounts_tableandwoodmart_after_dynamic_discounts_table.2. The actual price used at cart/checkout is where the currency issue comes from. Discounts are applied in
woocommerce_before_calculate_totals, and the base price we start from is read with$product->get_price('edit'). The ‘edit’ context intentionally returns the raw stored price without runningwoocommerce_product_get_pricewhich is the filter FOX uses to convert currency. So for the base currency (CHF) the result is correct, but for a converted currency (EUR) the tier is calculated on the unconverted base, which produces the wrong total.To integrate FOX cleanly, we expose two dedicated filters in that calculation:
–
woodmart_pricing_before_calculate_discounts( float $price, array $cart_item )runs before the tier discount is applied. Convert the base price to the active currency here.
–woodmart_pricing_after_calculate_discounts( float $price, array $cart_item )runs after the tier discount, if a final adjustment is needed.A minimal example for the FOX team:
add_filter( 'woodmart_pricing_before_calculate_discounts', function ( $price, $cart_item ) { // Convert WoodMart's base-currency price into the active FOX currency // using FOX's own conversion helper, then return it. return woocs_convert_to_active_currency( $price ); // pseudo — use FOX's real API }, 10, 2 );With the base price converted at
woodmart_pricing_before_calculate_discounts, the tier discount and WooCommerce tax will both be calculated on the correct EUR amount, which should resolve the “VAT added on top for 2+ units” behaviour.Let us know if the FOX team needs anything else on our side.
July 21, 2026 at 4:48 pm #724102
website-art.deParticipantHello, thank you very much for the detailed response. I have forwarded it to FOX. Thanks again!
-
AuthorPosts
- You must be logged in to create new topics. Login / Register