Changeset 2624990
- Timestamp:
- 11/05/2021 09:02:11 AM (4 years ago)
- Location:
- gtm-ecommerce-woo/trunk
- Files:
-
- 4 edited
-
gtm-ecommerce-woo.php (modified) (1 diff)
-
lib/Container.php (modified) (2 diffs)
-
lib/Service/MonitorService.php (modified) (6 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gtm-ecommerce-woo/trunk/gtm-ecommerce-woo.php
r2618200 r2624990 4 4 * Plugin URI: https://wordpress.org/plugins/gtm-ecommerce-woo 5 5 * Description: Push WooCommerce eCommerce (GA4 and UA compatible) information to GTM DataLayer. Use any GTM integration to measure your customers' activites. 6 * Version: 1.9. 26 * Version: 1.9.3 7 7 * Author: Handcraft Byte 8 8 * Author URI: https://handcraftbyte.com/ -
gtm-ecommerce-woo/trunk/lib/Container.php
r2615627 r2624990 29 29 ]; 30 30 $tagConciergeApiUrl = getenv('TAG_CONCIERGE_API_URL') ? getenv('TAG_CONCIERGE_API_URL') : 'https://api.tagconcierge.com'; 31 $tagConciergeEdgeUrl = getenv('TAG_CONCIERGE_EDGE_URL') ? getenv('TAG_CONCIERGE_EDGE_URL') : 'https://edge.tagconcierge.com'; 31 32 32 33 $wpSettingsUtil = new WpSettingsUtil($snakeCaseNamespace, $spineCaseNamespace); … … 47 48 $this->settingsService = new SettingsService($wpSettingsUtil, $events, $proEvents, $tagConciergeApiUrl, $pluginVersion); 48 49 $this->pluginService = new PluginService($spineCaseNamespace); 49 $this->monitorService = new MonitorService($snakeCaseNamespace, $spineCaseNamespace, $wcTransformerUtil, $wpSettingsUtil, $wcOutputUtil, $tagConciergeApiUrl );50 $this->monitorService = new MonitorService($snakeCaseNamespace, $spineCaseNamespace, $wcTransformerUtil, $wpSettingsUtil, $wcOutputUtil, $tagConciergeApiUrl, $tagConciergeEdgeUrl); 50 51 $this->themeValidatorService = new ThemeValidatorService($snakeCaseNamespace, $spineCaseNamespace, $wcTransformerUtil, $wpSettingsUtil, $wcOutputUtil, $events, $tagConciergeApiUrl); 51 52 $this->eventInspectorService = new EventInspectorService($wpSettingsUtil); -
gtm-ecommerce-woo/trunk/lib/Service/MonitorService.php
r2615627 r2624990 14 14 protected $wcTransformerUtil; 15 15 protected $tagConciergeApiUrl; 16 17 public function __construct( $snakeCaseNamespace, $spineCaseNamespace, $wcTransformerUtil, $wpSettingsUtil, $wcOutputUtil, $tagConciergeApiUrl) { 16 protected $tagConciergeEdgeUrl; 17 18 public function __construct( $snakeCaseNamespace, $spineCaseNamespace, $wcTransformerUtil, $wpSettingsUtil, $wcOutputUtil, $tagConciergeApiUrl, $tagConciergeEdgeUrl) { 18 19 $this->snakeCaseNamespace = $snakeCaseNamespace; 19 20 $this->spineCaseNamespace = $spineCaseNamespace; … … 22 23 $this->wcOutputUtil = $wcOutputUtil; 23 24 $this->tagConciergeApiUrl = $tagConciergeApiUrl; 25 $this->tagConciergeEdgeUrl = $tagConciergeEdgeUrl; 24 26 } 25 27 … … 66 68 echo "(function(dataLayer) {\n"; 67 69 echo "dataLayer.push({ uuid_hash: '" . $this->hash($uuid) . "' });"; 68 echo "dataLayer.push({ monitor_url: '" . $this->tagConcierge ApiUrl . "' });";70 echo "dataLayer.push({ monitor_url: '" . $this->tagConciergeEdgeUrl . "' });"; 69 71 echo '})(dataLayer);'; 70 72 echo "</script>\n"; … … 116 118 ]; 117 119 118 $response = wp_remote_post( $this->tagConciergeApiUrl . '/v2/monitor/transactions', $args ); 120 try { 121 $response = wp_remote_post( $this->tagConciergeEdgeUrl . '/v2/monitor/transactions', $args ); 122 } catch (Exception $err) { 123 error_log( 'Tag Concierge Monitor add_to_cart failed' ); 124 } 119 125 } 120 126 … … 144 150 145 151 try { 146 $response = wp_remote_post( $this->tagConcierge ApiUrl . '/v2/monitor/events', $args );152 $response = wp_remote_post( $this->tagConciergeEdgeUrl . '/v2/monitor/events', $args ); 147 153 } catch (Exception $err) { 148 154 error_log( 'Tag Concierge Monitor add_to_cart failed' ); … … 182 188 ]; 183 189 try { 184 $response = wp_remote_post( $this->tagConcierge ApiUrl . '/v2/monitor/events', $args );190 $response = wp_remote_post( $this->tagConciergeEdgeUrl . '/v2/monitor/events', $args ); 185 191 } catch (Exception $err) { 186 192 error_log( 'Tag Concierge Monitor purchase failed' ); -
gtm-ecommerce-woo/trunk/readme.txt
r2618200 r2624990 118 118 == Changelog == 119 119 120 = 1.9.3 = 121 122 * switch the monitoring API to edge endpoints for performance gains 123 120 124 = 1.9.2 = 121 125
Note: See TracChangeset
for help on using the changeset viewer.