Changeset 2108754
- Timestamp:
- 06/19/2019 09:48:12 AM (7 years ago)
- Location:
- ghostmonitor
- Files:
-
- 79 added
- 7 edited
-
tags/1.12.9 (added)
-
tags/1.12.9/assets (added)
-
tags/1.12.9/assets/js (added)
-
tags/1.12.9/assets/js/ghostmonitor_messenger_widget.js (added)
-
tags/1.12.9/assets/js/ghostmonitor_push.js (added)
-
tags/1.12.9/config.json (added)
-
tags/1.12.9/includes (added)
-
tags/1.12.9/includes/class-wc-ghostmonitor-api.php (added)
-
tags/1.12.9/includes/class-wc-ghostmonitor.php (added)
-
tags/1.12.9/includes/ghostmonitor_api (added)
-
tags/1.12.9/includes/ghostmonitor_api/ghost-api.php (added)
-
tags/1.12.9/includes/ghostmonitor_api/src (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/controller (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/controller/class-base-controller.php (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/controller/class-stat-controller.php (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/model (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/model/class-order-model.php (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/utils (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/utils/request (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/utils/request/class-request-interface.php (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/utils/request/class-request.php (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/utils/response (added)
-
tags/1.12.9/includes/ghostmonitor_api/src/utils/response/class-response.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/autoload.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer/ClassLoader.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer/LICENSE (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer/autoload_classmap.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer/autoload_files.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer/autoload_namespaces.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer/autoload_psr4.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer/autoload_real.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer/autoload_static.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/composer/installed.json (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/.gitignore (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/.travis.yml (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/LICENSE (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/README.md (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/bin (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/bin/generate_method_docs.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/composer.json (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/lib (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/lib/Assert (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/lib/Assert/Assertion.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/lib/Assert/AssertionChain.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/lib/Assert/AssertionFailedException.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/lib/Assert/InvalidArgumentException.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/lib/Assert/LazyAssertion.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/lib/Assert/LazyAssertionException.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/lib/Assert/functions.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/phpunit.xml.dist (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/tests (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/tests/Assert (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/tests/Assert/Tests (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/tests/Assert/Tests/AssertTest.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/tests/Assert/Tests/AssertionChainTest.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/tests/Assert/Tests/LazyAssertionTest.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/assert/tests/bootstrap.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/helper (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/helper/.gitignore (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/helper/composer.json (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/helper/ghostmonitor (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/helper/ghostmonitor/Helper.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/helper/ghostmonitor/Logger.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/logentries (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/logentries/.gitignore (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/logentries/.travis.yml (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/logentries/LeLogger.php (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/logentries/README.md (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/logentries/composer.json (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/logentries/phpunit.xml (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/logentries/unit_tests (added)
-
tags/1.12.9/includes/ghostmonitor_helper/vendor/ghostmonitor/logentries/unit_tests/LeLoggerTests.php (added)
-
tags/1.12.9/readme.txt (added)
-
tags/1.12.9/woocommerce-ghostmonitor.php (added)
-
trunk/config.json (modified) (1 diff)
-
trunk/includes/class-wc-ghostmonitor.php (modified) (8 diffs)
-
trunk/includes/ghostmonitor_helper/vendor/autoload.php (modified) (1 diff)
-
trunk/includes/ghostmonitor_helper/vendor/composer/autoload_real.php (modified) (5 diffs)
-
trunk/includes/ghostmonitor_helper/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/woocommerce-ghostmonitor.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ghostmonitor/trunk/config.json
r2088420 r2108754 4 4 "settingsUrl": "https://api.recart.com/tracking/v2/settings/", 5 5 "cdnUrl": "https://cdn.ghostmonitor.com", 6 "version": "v1.12. 8",6 "version": "v1.12.9", 7 7 "logentriesToken": "d3695c56-67af-4c86-8c7d-26c6c252987b", 8 8 "env": "production" -
ghostmonitor/trunk/includes/class-wc-ghostmonitor.php
r2088420 r2108754 209 209 global $woocommerce; 210 210 211 if (!$woocommerce->cart) { 212 return false; 213 } 214 211 215 $woocommerce->cart->empty_cart(); 212 216 … … 257 261 return false; 258 262 } 259 $ghostmonitor_data = $this->collect_ghostmonitor_data_from_order($order_id, $gm_session_data['session_id']); 263 260 264 $this->gm_helper->logDebug(array( 261 265 'ACTION STARTED: woocommerce_order_status_processing', … … 263 267 $gm_session_data, 264 268 )); 265 $this->gm_helper->sendGhostData($ghostmonitor_data);266 269 $this->gm_helper->sendConversionData($gm_session_data); 270 271 $ghostmonitor_data = $this->collect_ghostmonitor_data_from_order($order_id, $gm_session_data['session_id']); 272 if ($ghostmonitor_data) { 273 $this->gm_helper->sendGhostData($ghostmonitor_data); 274 } else { 275 $this->gm_helper->log('Could not collect ghostmonitor_data in send_conversion()', 'warning'); 276 } 267 277 } 268 278 … … 303 313 global $wp_version; 304 314 305 $is_cart_empty = WC()->cart->cart_contents_count > 0 ? false : true; 315 if (WC()->cart && WC()->cart->cart_contents_count > 0) { 316 $is_cart_empty = false; 317 } else $is_cart_empty = true; 306 318 307 319 $debug_lines = ''; … … 331 343 $order = $order->get_order($order_id); 332 344 345 if (!$order) { 346 return false; 347 } 348 333 349 $order_items = $order->get_items(); 334 350 … … 338 354 $product = new WC_Product_Factory(); 339 355 $product = $product->get_product($i['variation_id'] == '0' ? $i['product_id'] : $i['variation_id']); 356 357 if (!$product) { 358 continue; 359 } 340 360 341 361 $thumb_id = get_post_thumbnail_id($product->get_id()); … … 402 422 if ($gm_session_id === false) { 403 423 $this->gm_helper->log('Could not find ghostmonitor_session_id cookie in send_cart_data()', 'warning'); 404 424 return false; 425 } 426 427 if (!WC()->cart) { 405 428 return false; 406 429 } 407 430 408 431 foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item_data) { 409 410 432 $gm_cart_item = array(); 411 433 … … 661 683 $discount_code = $url_subitems[1]; 662 684 663 if ( !WC()->cart->is_empty() && !WC()->cart->has_discount($discount_code)) {685 if ($WC()->cart && !WC()->cart->is_empty() && !WC()->cart->has_discount($discount_code)) { 664 686 WC()->cart->add_discount($discount_code); 665 687 } else { -
ghostmonitor/trunk/includes/ghostmonitor_helper/vendor/autoload.php
r2088420 r2108754 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit acc2a867c879dc2a47f6e13449410881::getLoader();7 return ComposerAutoloaderInitffea62b8c134ec6dbcc1aefd1954f7d9::getLoader(); -
ghostmonitor/trunk/includes/ghostmonitor_helper/vendor/composer/autoload_real.php
r2088420 r2108754 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit acc2a867c879dc2a47f6e134494108815 class ComposerAutoloaderInitffea62b8c134ec6dbcc1aefd1954f7d9 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit acc2a867c879dc2a47f6e13449410881', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInitffea62b8c134ec6dbcc1aefd1954f7d9', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit acc2a867c879dc2a47f6e13449410881', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInitffea62b8c134ec6dbcc1aefd1954f7d9', 'loadClassLoader')); 25 25 26 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 28 28 require_once __DIR__ . '/autoload_static.php'; 29 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit acc2a867c879dc2a47f6e13449410881::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInitffea62b8c134ec6dbcc1aefd1954f7d9::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; … … 49 49 50 50 if ($useStaticLoader) { 51 $includeFiles = Composer\Autoload\ComposerStaticInit acc2a867c879dc2a47f6e13449410881::$files;51 $includeFiles = Composer\Autoload\ComposerStaticInitffea62b8c134ec6dbcc1aefd1954f7d9::$files; 52 52 } else { 53 53 $includeFiles = require __DIR__ . '/autoload_files.php'; 54 54 } 55 55 foreach ($includeFiles as $fileIdentifier => $file) { 56 composerRequire acc2a867c879dc2a47f6e13449410881($fileIdentifier, $file);56 composerRequireffea62b8c134ec6dbcc1aefd1954f7d9($fileIdentifier, $file); 57 57 } 58 58 … … 61 61 } 62 62 63 function composerRequire acc2a867c879dc2a47f6e13449410881($fileIdentifier, $file)63 function composerRequireffea62b8c134ec6dbcc1aefd1954f7d9($fileIdentifier, $file) 64 64 { 65 65 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
ghostmonitor/trunk/includes/ghostmonitor_helper/vendor/composer/autoload_static.php
r2088420 r2108754 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit acc2a867c879dc2a47f6e134494108817 class ComposerStaticInitffea62b8c134ec6dbcc1aefd1954f7d9 8 8 { 9 9 public static $files = array ( … … 46 46 { 47 47 return \Closure::bind(function () use ($loader) { 48 $loader->prefixLengthsPsr4 = ComposerStaticInit acc2a867c879dc2a47f6e13449410881::$prefixLengthsPsr4;49 $loader->prefixDirsPsr4 = ComposerStaticInit acc2a867c879dc2a47f6e13449410881::$prefixDirsPsr4;50 $loader->prefixesPsr0 = ComposerStaticInit acc2a867c879dc2a47f6e13449410881::$prefixesPsr0;48 $loader->prefixLengthsPsr4 = ComposerStaticInitffea62b8c134ec6dbcc1aefd1954f7d9::$prefixLengthsPsr4; 49 $loader->prefixDirsPsr4 = ComposerStaticInitffea62b8c134ec6dbcc1aefd1954f7d9::$prefixDirsPsr4; 50 $loader->prefixesPsr0 = ComposerStaticInitffea62b8c134ec6dbcc1aefd1954f7d9::$prefixesPsr0; 51 51 52 52 }, null, ClassLoader::class); -
ghostmonitor/trunk/readme.txt
r2088420 r2108754 4 4 Requires at least: 3.9 5 5 Tested up to: 5.0.0 6 Stable tag: 1.12. 86 Stable tag: 1.12.9 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
ghostmonitor/trunk/woocommerce-ghostmonitor.php
r2088420 r2108754 6 6 * Author: Ghostmonitor INC 7 7 * Author URI: http://www.recart.com 8 * Version: v1.12. 88 * Version: v1.12.9 9 9 */ 10 10 … … 44 44 global $wp_version; 45 45 46 $version = 'v1.12. 8';46 $version = 'v1.12.9'; 47 47 48 48 $discount_enabled = get_option('woocommerce_enable_coupons') === 'yes' ? 'true' : 'false';
Note: See TracChangeset
for help on using the changeset viewer.