Skip to content

Refunds, Cancellations & Renewals

Refunds, cancellations and WooCommerce Subscriptions renewals sent from the server.

Refunds, Cancellations & Renewals PRO

Section titled “Refunds, Cancellations & Renewals ”

Refunds are sent to Google Analytics 4 as refund events, so your GA4 revenue reflects money you kept. Meta, TikTok and Google Ads don’t accept refunds through Zaraz; adjust those in each ad platform if needed.


WP Zbridge connects directly to native WooCommerce order refund and cancellation hooks:

  • woocommerce_order_partially_refunded: Fires when part of an order is refunded.
  • woocommerce_order_status_refunded: Fires when an order is fully refunded.
  • woocommerce_order_status_cancelled: Fires when an order is voided or cancelled.

Because refunds occur in the WordPress admin dashboard (where the customer is not browsing), refund tracking must execute server-to-server.


When a refund is recorded:

  1. WP Zbridge extracts the refunded items, refund amount, and currency.
  2. Formats an Order Refunded e-commerce payload.
  3. Dispatches the payload directly to Cloudflare Zaraz edge.
  4. Subtracts the refund from the net revenue shown on the Dashboard.
// Payload structure dispatched to Zaraz
[
'__zarazTrack' => 'Order Refunded',
'__zarazEcommerce' => true,
'order_id' => (string) $orderId,
'total' => $refundAmount,
'currency' => $order->get_currency(),
'products' => $refundedLineItems,
]

With WooCommerce Subscriptions, renewal orders are charged without a visitor on the site, so no browser reports them. When a renewal order is paid, WP Zbridge sends it from the server straight away as an Order Completed purchase with order_type: "renewal", using the same payload and event ID rules as any other server-sent purchase.

  • Renewals are not counted as orders the browser missed on the Dashboard.
  • To keep renewals out of your analytics and ad platforms, untick Send subscription renewals under Event Tracking.