WordPress Actions & Filters Reference
Complete reference of all extensible hooks provided by WP Zbridge.
Actions & Filters Reference
Section titled “Actions & Filters Reference”WP Zbridge is designed with a filter-first architecture. Every event payload, customer label and dispatch lock can be customized via standard WordPress hooks.
Available Filters
Section titled “Available Filters”| Filter Hook | Location | Description |
|---|
Available Actions
Section titled “Available Actions”| Action Hook | Location | Description |
|---|
Example Usage
Section titled “Example Usage”1. Attaching Custom Customer Cohorts & Loyalty Attributes
Section titled “1. Attaching Custom Customer Cohorts & Loyalty Attributes”add_filter('zbridge_order_user_data', function(array $userData, array $orderData): array { $orderId = $orderData['id'] ?? 0;
// Attach customer loyalty tier or VIP status $order = wc_get_order($orderId); $vipTier = $order ? $order->get_meta('_customer_vip_tier') : ''; if (!empty($vipTier)) { $userData['customer_tier'] = sanitize_text_field($vipTier); }
return $userData;}, 10, 2);2. Customizing Frontend Tracker Triggers
Section titled “2. Customizing Frontend Tracker Triggers”add_filter('zbridge_frontend_tracker_config', function(array $config): array { // Disable automatic tracking for administrative preview sessions if (current_user_can('manage_options')) { $config['ecommerce']['track_cart_removals'] = false; } return $config;});3. Pro Features on a Development Site
Section titled “3. Pro Features on a Development Site”Pro features need an active license, also on development and staging sites. Activate a license key there like on your live site; each activation uses one of the license’s site slots.