Why payment gateway fees stop updating on Block Checkout
In Classic Checkout, selecting a payment radio button triggers jQuery’s update_checkout AJAX POST to wc-ajax=update_order_review, which populates WC()->session->get('chosen_payment_method') before running woocommerce_cart_calculate_fees.
In WooCommerce Block Checkout, that jQuery event does not exist. Switching payment methods updates the client-side payment Redux store without automatically notifying PHP of the active gateway—and many older fee plugins also bail out early whenever is_admin() or REST_REQUEST is evaluated inconsistently. The result: shoppers click Cash on Delivery or Stripe and see the wrong total until order submission.
Three concrete engineering fixes built into TradeBlock
- Serialized Store API
sync_paymentaction: When a buyer switches payment methods inside the Checkout block, TradeBlock dispatchesextensionCartUpdateunder thetradeblock-checkoutnamespace withpayment_method. WooCommerce recalculates fees and refreshes Order Summary totals in place—zero full-page reload and zero editor leakage (payment-sync code never runs in the Block Editor). - Single tax class isolation for European invoices: In mixed-VAT European carts (e.g., standard 23% goods + reduced 19% or 7% goods), ambiguous fee tax handling can split a single COD surcharge across two VAT lines on the invoice. TradeBlock applies each taxable fee with an explicit merchant-selected
tax_class, keeping invoice tax breakdowns clean and auditable. - Clean merchandise subtotal base: Percentage fees calculate from the pre-discount product subtotal (excluding shipping and fees, and excluding Pro order bump lines), following WooCommerce’s
wc_prices_include_tax()setting consistently.
Compliance reminder for payment surcharges
Card surcharge rules vary by jurisdiction (for example EU PSD2 restrictions on consumer debit/credit card surcharges vs. Cash on Delivery handling fees or B2B corporate cards). Always confirm your fee labels and rules comply with local law and your payment processor’s terms.
How TradeBlock compares with dedicated fee plugins (2026 pricing)
| Plugin | 2026 Published Pricing | Payment Gateway & Subtotal Fees | Included Extra Block Checkout Modules |
|---|---|---|---|
| Tyche Checkout Fees checkout-fees-for-woocommerce |
$49/yr (1) · $99/yr (5) · $149/yr (10) | Gateway surcharges & discounts (long-running plugin) | Fees only (no Billing-Only B2B fields, EU VIES, or Order Bumps) |
| Dotstore Extra Fees woo-conditional-product-fees-for-checkout |
$219/yr (1) · $699/yr (5) | Broad conditional product & checkout fee builder | Fees only (high per-site renewal if you also buy separate VAT/B2B tools) |
| TradeBlock Checkout Free Core + Pro Add-on |
Free Core $0 · Pro $79/yr (1) / $129/yr (3) / $249/yr (10) | Free Core: Gateway & subtotal fees (fixed/%, single tax class). Pro: AND/OR rules by role, country, category, weight, quantity, or subtotal tier | Billing-Only B2B fields, EU VIES reverse charge, inline Order Bumps, MOQ & Net-30 |
Test live COD fee recalculation right now
Switch between Stripe Card (€0.00), Cash on Delivery (+€4.50), and Net-30 Invoice inside our interactive Block Checkout sandbox to see real-time subtotal and VAT recalculation.
Gateway & subtotal fees are included in Free Core
Upgrade to Pro only when you need multi-condition AND/OR fee rules, wholesale discounts, EU VIES reverse charge, or multi-rule order bumps.