Changeset 3477915
- Timestamp:
- 03/09/2026 09:52:22 AM (3 days ago)
- Location:
- metrion
- Files:
-
- 63 added
- 3 edited
-
tags/1.6.9 (added)
-
tags/1.6.9/assets (added)
-
tags/1.6.9/assets/icon-128x128.png (added)
-
tags/1.6.9/assets/icon-256x256.png (added)
-
tags/1.6.9/css (added)
-
tags/1.6.9/css/settings.css (added)
-
tags/1.6.9/includes (added)
-
tags/1.6.9/includes/api_endpoints.php (added)
-
tags/1.6.9/includes/event_capture.php (added)
-
tags/1.6.9/includes/initial.php (added)
-
tags/1.6.9/includes/js_bundler.php (added)
-
tags/1.6.9/js (added)
-
tags/1.6.9/js/cmp (added)
-
tags/1.6.9/js/cmp/cmplz (added)
-
tags/1.6.9/js/cmp/cmplz/logic.js (added)
-
tags/1.6.9/js/cmp/cookiebot (added)
-
tags/1.6.9/js/cmp/cookiebot/logic.js (added)
-
tags/1.6.9/js/cmp/cookieconfirm (added)
-
tags/1.6.9/js/cmp/cookieconfirm/logic.js (added)
-
tags/1.6.9/js/cmp/cookiefirst (added)
-
tags/1.6.9/js/cmp/cookiefirst/logic.js (added)
-
tags/1.6.9/js/cmp/cookiepal (added)
-
tags/1.6.9/js/cmp/cookiepal/logic.js (added)
-
tags/1.6.9/js/cmp/cookieyes (added)
-
tags/1.6.9/js/cmp/cookieyes/logic.js (added)
-
tags/1.6.9/js/cmp/moove_gdpr (added)
-
tags/1.6.9/js/cmp/moove_gdpr/logic.js (added)
-
tags/1.6.9/js/cmp/no_cmp (added)
-
tags/1.6.9/js/cmp/no_cmp/logic.js (added)
-
tags/1.6.9/js/cmp/onetrust (added)
-
tags/1.6.9/js/cmp/onetrust/logic.js (added)
-
tags/1.6.9/js/core (added)
-
tags/1.6.9/js/core/destination_fallback.js (added)
-
tags/1.6.9/js/core/events.js (added)
-
tags/1.6.9/js/core/initialisation_sequence.js (added)
-
tags/1.6.9/js/detect (added)
-
tags/1.6.9/js/detect/detect.js (added)
-
tags/1.6.9/js/elementor (added)
-
tags/1.6.9/js/elementor/form_events.js (added)
-
tags/1.6.9/js/google_ads (added)
-
tags/1.6.9/js/google_ads/consent_mode.js (added)
-
tags/1.6.9/js/google_ads/events.js (added)
-
tags/1.6.9/js/google_analytics (added)
-
tags/1.6.9/js/google_analytics/events.js (added)
-
tags/1.6.9/js/meta (added)
-
tags/1.6.9/js/meta/events.js (added)
-
tags/1.6.9/js/microsoft_ads (added)
-
tags/1.6.9/js/microsoft_ads/consent_mode.js (added)
-
tags/1.6.9/js/microsoft_ads/events.js (added)
-
tags/1.6.9/js/myyounit (added)
-
tags/1.6.9/js/myyounit/integration.js (added)
-
tags/1.6.9/js/settings (added)
-
tags/1.6.9/js/settings/settings.js (added)
-
tags/1.6.9/js/tiktok (added)
-
tags/1.6.9/js/tiktok/events.js (added)
-
tags/1.6.9/js/woo (added)
-
tags/1.6.9/js/woo/other_events.js (added)
-
tags/1.6.9/js/woo/purchase_event.js (added)
-
tags/1.6.9/main.php (added)
-
tags/1.6.9/readme.txt (added)
-
tags/1.6.9/uninstall.php (added)
-
tags/1.6.9/views (added)
-
tags/1.6.9/views/settings.php (added)
-
trunk/includes/event_capture.php (modified) (4 diffs)
-
trunk/main.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
metrion/trunk/includes/event_capture.php
r3477912 r3477915 15 15 } 16 16 17 function metrion_order_cancelled_tracking($order_id, $source) { 18 metrion_woocommerce_webhook_purchase_cancelled($order_id, $source); 17 function metrion_order_cancelled_tracking($order_id, $source, $old_status = '', $new_status = '') { 18 if (get_post_meta($order_id, '_metrion_cancellation_tracking_sent', true)) { 19 return; 20 } 21 22 metrion_woocommerce_webhook_purchase_cancelled($order_id, $source, $old_status, $new_status); 23 24 update_post_meta($order_id, '_metrion_cancellation_tracking_sent', 'yes'); 19 25 } 20 26 … … 28 34 }, 10, 1); 29 35 30 add_action('woocommerce_cancelled_order', function($order_id) { 31 metrion_order_cancelled_tracking($order_id, 'woocommerce_cancelled_order'); 32 }, 10, 1); 36 // Fires on every order status transition — catches all paths to cancelled/failed 37 add_action('woocommerce_order_status_changed', function($order_id, $old_status, $new_status) { 38 if (in_array($new_status, ['cancelled', 'failed'], true)) { 39 metrion_order_cancelled_tracking($order_id, 'woocommerce_order_status_changed', $old_status, $new_status); 40 } 41 }, 10, 3); 33 42 34 43 function metrion_woocommerce_webhook_purchase($order_id, $triggered_by_hook = '') { … … 98 107 } 99 108 100 function metrion_woocommerce_webhook_purchase_cancelled($order_id, $triggered_by_hook = '' ) {101 $event_data = array(109 function metrion_woocommerce_webhook_purchase_cancelled($order_id, $triggered_by_hook = '', $old_status = '', $new_status = '') { 110 $event_data = array( 102 111 'metrion_event_id' => wp_generate_uuid4(), 103 112 'event_name' => 'purchase_cancelled', … … 110 119 'trigger' => $triggered_by_hook, 111 120 'trigger_type' => 'webhook', 112 'order_id' => $order_id 121 'order_id' => $order_id, 122 'old_status' => $old_status, 123 'new_status' => $new_status 113 124 ), 114 125 'metrion_config' => get_metrion_config() -
metrion/trunk/main.php
r3477912 r3477915 3 3 * Plugin Name: Metrion 4 4 * Description: Skip manual implementation, sync data directly tailored to destinations like Google Ads and Meta Ads. 5 * Version: 1.6. 85 * Version: 1.6.9 6 6 * Author: Metrion 7 7 * Author URI: https://getmetrion.com … … 12 12 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 13 13 14 define('GLOBAL_METRION_PLUGIN_VERSION', '1.6. 8');14 define('GLOBAL_METRION_PLUGIN_VERSION', '1.6.9'); 15 15 16 16 require_once plugin_dir_path(__FILE__) . 'includes/js_bundler.php'; -
metrion/trunk/readme.txt
r3477912 r3477915 4 4 Requires at least: 3.8 5 5 Tested up to: 6.8 6 Stable tag: 1.6. 86 Stable tag: 1.6.9 7 7 Requires PHP: 7.1 8 8 License: GPLv3 or later … … 93 93 == Changelog == 94 94 95 = 1.6.9 = 96 - Fixed a case where order cancellations were not going through 97 95 98 = 1.6.8 = 96 99 - Improved handling of default root cookie domain configuration in WP
Note: See TracChangeset
for help on using the changeset viewer.