Changeset 2537381
- Timestamp:
- 05/25/2021 06:59:13 PM (5 years ago)
- Location:
- oribi-analytics-for-woocommerce/trunk
- Files:
-
- 2 edited
-
oribi-analytics-ecommerce.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
oribi-analytics-for-woocommerce/trunk/oribi-analytics-ecommerce.php
r2501257 r2537381 6 6 * Author: Oribi 7 7 * Author URI: https://oribi.io 8 * Version: 1. 6.08 * Version: 1.7.0 9 9 * Text Domain: oribi 10 10 * WC requires at least: 2.2 11 * WC tested up to: 5. 1.011 * WC tested up to: 5.3.0 12 12 */ 13 13 … … 66 66 67 67 add_filter('woocommerce_payment_successful_result', array( self::class, 'oribi_track_woocommerce_purchase' ), 1, 2 ); 68 add_filter('woocommerce_payment_complete', array( self::class, 'oribi_track_woocommerce_payment_complete' ), 1, 2 ); 69 add_action('wp_footer', array( self::class, 'oribiDisplayVersionOfPlugin' )); // Add function for checking the version of plugin 68 70 add_action('wp_footer', array( self::class, 'trackIntegratePurchase' )); 69 71 … … 102 104 } 103 105 104 public static function oribi_track_woocommerce_purchase( $result, $order_id ) { 106 /** 107 * This static function is only for checking of plugin version. 108 * Displaying The Plugin Version on every page of Wordpress. 109 */ 110 public static function oribiDisplayVersionOfPlugin() { 111 try { 112 $data = get_file_data( __FILE__, ['ver'=>'Version'] ); 113 } catch (Exception $e) { 114 115 } 116 117 if(isset($data) && isset($data['ver'])) { 118 ?><script>console.debug('ORIBI Plugin Version: ' + '<?= $data['ver'] ?>');</script><?php 119 } 120 } 121 122 public static function oribi_track_woocommerce_payment_complete($order_id){ 123 Oribi_Event_Tracker::oribi_track_woocommerce_purchase('success', $order_id); 124 } 125 126 public static function oribi_track_woocommerce_purchase($result, $order_id) { 105 127 $order = wc_get_order( $order_id ); 106 128 … … 180 202 181 203 return $result; 182 183 204 } 184 205 -
oribi-analytics-for-woocommerce/trunk/readme.txt
r2501257 r2537381 4 4 Tags: analytics, ecommerce, insights, google-analytics, tracking 5 5 Requires at least: 5.0 6 Tested up to: 5.7 7 Stable tag: 1. 06 Tested up to: 5.7.2 7 Stable tag: 1.7.0 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 91 91 92 92 == Changelog == 93 = v1.7.0 = 94 Added Support for more WooCommerce purchase flows, in order to track revenue on multiple optional purchase flow at the shop. 93 95 = v1.6.0 = 94 96 Added Support for WordPress 5.7 and WooCommerce 5.1
Note: See TracChangeset
for help on using the changeset viewer.