Changeset 3032832
- Timestamp:
- 02/07/2024 05:22:46 PM (2 years ago)
- Location:
- activecampaign-for-woocommerce/trunk
- Files:
-
- 64 edited
-
README.txt (modified) (3 diffs)
-
ac_vendor/autoload.php (modified) (1 diff)
-
ac_vendor/composer/InstalledVersions.php (modified) (1 diff)
-
ac_vendor/composer/autoload_real.php (modified) (5 diffs)
-
ac_vendor/composer/autoload_static.php (modified) (2 diffs)
-
ac_vendor/composer/installed.json (modified) (13 diffs)
-
ac_vendor/composer/installed.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/guzzle/src/Client.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/guzzle/src/ClientInterface.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php (modified) (5 diffs)
-
ac_vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php (modified) (3 diffs)
-
ac_vendor/guzzlehttp/guzzle/src/HandlerStack.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/guzzle/src/MessageFormatter.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/guzzle/src/RequestOptions.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/guzzle/src/TransferStats.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/guzzle/src/Utils.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/promises/src/Each.php (modified) (3 diffs)
-
ac_vendor/guzzlehttp/promises/src/EachPromise.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/promises/src/RejectionException.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/psr7/src/AppendStream.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/psr7/src/BufferStream.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/psr7/src/FnStream.php (modified) (3 diffs)
-
ac_vendor/guzzlehttp/psr7/src/Header.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/psr7/src/InflateStream.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/psr7/src/Message.php (modified) (3 diffs)
-
ac_vendor/guzzlehttp/psr7/src/MessageTrait.php (modified) (5 diffs)
-
ac_vendor/guzzlehttp/psr7/src/MultipartStream.php (modified) (4 diffs)
-
ac_vendor/guzzlehttp/psr7/src/PumpStream.php (modified) (4 diffs)
-
ac_vendor/guzzlehttp/psr7/src/Request.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/psr7/src/Response.php (modified) (1 diff)
-
ac_vendor/guzzlehttp/psr7/src/ServerRequest.php (modified) (3 diffs)
-
ac_vendor/guzzlehttp/psr7/src/Stream.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/psr7/src/StreamWrapper.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/psr7/src/UploadedFile.php (modified) (2 diffs)
-
ac_vendor/guzzlehttp/psr7/src/Uri.php (modified) (12 diffs)
-
ac_vendor/guzzlehttp/psr7/src/UriNormalizer.php (modified) (5 diffs)
-
ac_vendor/guzzlehttp/psr7/src/UriResolver.php (modified) (3 diffs)
-
ac_vendor/guzzlehttp/psr7/src/Utils.php (modified) (3 diffs)
-
ac_vendor/laravel/serializable-closure/src/Support/ReflectionClosure.php (modified) (2 diffs)
-
activecampaign-for-woocommerce.php (modified) (1 diff)
-
admin/class-activecampaign-for-woocommerce-admin-historical-sync.php (modified) (3 diffs)
-
admin/class-activecampaign-for-woocommerce-admin-status.php (modified) (8 diffs)
-
admin/class-activecampaign-for-woocommerce-admin-wc-order-page.php (modified) (5 diffs)
-
admin/class-activecampaign-for-woocommerce-admin.php (modified) (4 diffs)
-
admin/partials/activecampaign-for-woocommerce-status-mapping.php (modified) (5 diffs)
-
admin/scripts/activecampaign-for-woocommerce-historical-sync.js (modified) (2 diffs)
-
admin/views/activecampaign-for-woocommerce-historical-sync.php (modified) (3 diffs)
-
admin/views/activecampaign-for-woocommerce-status-display.php (modified) (5 diffs)
-
includes/abandoned_carts/class-activecampaign-for-woocommerce-cart-events.php (modified) (4 diffs)
-
includes/abandoned_carts/class-activecampaign-for-woocommerce-run-abandonment-sync-command.php (modified) (1 diff)
-
includes/api-client/class-activecampaign-for-woocommerce-api-client.php (modified) (1 diff)
-
includes/class-activecampaign-for-woocommerce.php (modified) (10 diffs)
-
includes/config/activecampaign-for-woocommerce-global-constants.php (modified) (2 diffs)
-
includes/events/class-activecampaign-for-woocommerce-user-registered-event.php (modified) (2 diffs)
-
includes/orders/class-activecampaign-for-woocommerce-order-action-events.php (modified) (5 diffs)
-
includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-contacts.php (modified) (7 diffs)
-
includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-handler.php (modified) (1 diff)
-
includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-prep.php (modified) (2 diffs)
-
includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-runner-cofe.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
activecampaign-for-woocommerce/trunk/README.txt
r3017132 r3032832 3 3 Tags: marketing, ecommerce, woocommerce, email, activecampaign, abandoned cart 4 4 Requires at least: 6.0 5 Tested up to: 6.4. 16 Stable tag: 2.5. 55 Tested up to: 6.4.3 6 Stable tag: 2.5.6 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 48 48 49 49 = WooCommerce Compatibility = 50 * Tested up to version: 8. 3.051 * Minimal version requirement: 7. 0.050 * Tested up to version: 8.5.1 51 * Minimal version requirement: 7.4.0 52 52 * HPOS Compatible 53 53 … … 84 84 == Changelog == 85 85 86 == 2.5.6 2024-01-26 == 87 * Making support items more clear and adding hook checks 88 * Fix for GraphQL calls returning 400 errors due to POST-GET redirects 89 * Separating historical sync cron from new order cron 90 * Resolving some bugs with historical sync when contacts box is checked 91 86 92 == 2.5.5 2024-01-03 == 87 93 * Fixing missing files -
activecampaign-for-woocommerce/trunk/ac_vendor/autoload.php
r3017123 r3032832 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit db051d39acf323762cd4c9b440d99ff7::getLoader();7 return ComposerAutoloaderInit2e569f6b636f68ab6baea966bd12ceff::getLoader(); -
activecampaign-for-woocommerce/trunk/ac_vendor/composer/InstalledVersions.php
r2960798 r3032832 7 7 class InstalledVersions 8 8 { 9 private static $installed = array('root' => array('pretty_version' => '1.5.0', 'version' => '1.5.0.0', 'aliases' => array(), 'reference' => NULL, 'name' => 'activecampaign/activecampaign-for-woocommerce'), 'versions' => array('activecampaign/activecampaign-for-woocommerce' => array('pretty_version' => '1.5.0', 'version' => '1.5.0.0', 'aliases' => array(), 'reference' => NULL), 'brick/math' => array('pretty_version' => '0.10.2', 'version' => '0.10.2.0', 'aliases' => array(), 'reference' => '459f2781e1a08d52ee56b0b1444086e038561e3f'), 'brick/money' => array('pretty_version' => '0.6.0', 'version' => '0.6.0.0', 'aliases' => array(), 'reference' => '7074e1bd463f517fb78447dff63454f4b1523c1b'), 'guzzlehttp/guzzle' => array('pretty_version' => '7. 7.0', 'version' => '7.7.0.0', 'aliases' => array(), 'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5'), 'guzzlehttp/promises' => array('pretty_version' => '2.0.1', 'version' => '2.0.1.0', 'aliases' => array(), 'reference' => '111166291a0f8130081195ac4556a5587d7f1b5d'), 'guzzlehttp/psr7' => array('pretty_version' => '2.6.0', 'version' => '2.6.0.0', 'aliases' => array(), 'reference' => '8bd7c33a0734ae1c5d074360512beb716bef3f77'), 'laravel/serializable-closure' => array('pretty_version' => 'v1.3.1', 'version' => '1.3.1.0', 'aliases' => array(), 'reference' => 'e5a3057a5591e1cfe8183034b0203921abe2c902'), 'php-di/invoker' => array('pretty_version' => '2.3.3', 'version' => '2.3.3.0', 'aliases' => array(), 'reference' => 'cd6d9f267d1a3474bdddf1be1da079f01b942786'), 'php-di/php-di' => array('pretty_version' => '6.4.0', 'version' => '6.4.0.0', 'aliases' => array(), 'reference' => 'ae0f1b3b03d8b29dff81747063cbfd6276246cc4'), 'php-di/phpdoc-reader' => array('pretty_version' => '2.2.1', 'version' => '2.2.1.0', 'aliases' => array(), 'reference' => '66daff34cbd2627740ffec9469ffbac9f8c8185c'), 'psr/container' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'aliases' => array(), 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f'), 'psr/container-implementation' => array('provided' => array(0 => '^1.0')), 'psr/http-client' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'aliases' => array(), 'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31'), 'psr/http-client-implementation' => array('provided' => array(0 => '1.0')), 'psr/http-factory' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'aliases' => array(), 'reference' => 'e616d01114759c4c489f93b099585439f795fe35'), 'psr/http-factory-implementation' => array('provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '2.0', 'version' => '2.0.0.0', 'aliases' => array(), 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71'), 'psr/http-message-implementation' => array('provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'aliases' => array(), 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11'), 'ralouphie/getallheaders' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'aliases' => array(), 'reference' => '120b605dfeb996808c31b6477290a714d356e822'), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'aliases' => array(), 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66')));9 private static $installed = array('root' => array('pretty_version' => '1.5.0', 'version' => '1.5.0.0', 'aliases' => array(), 'reference' => NULL, 'name' => 'activecampaign/activecampaign-for-woocommerce'), 'versions' => array('activecampaign/activecampaign-for-woocommerce' => array('pretty_version' => '1.5.0', 'version' => '1.5.0.0', 'aliases' => array(), 'reference' => NULL), 'brick/math' => array('pretty_version' => '0.10.2', 'version' => '0.10.2.0', 'aliases' => array(), 'reference' => '459f2781e1a08d52ee56b0b1444086e038561e3f'), 'brick/money' => array('pretty_version' => '0.6.0', 'version' => '0.6.0.0', 'aliases' => array(), 'reference' => '7074e1bd463f517fb78447dff63454f4b1523c1b'), 'guzzlehttp/guzzle' => array('pretty_version' => '7.8.1', 'version' => '7.8.1.0', 'aliases' => array(), 'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104'), 'guzzlehttp/promises' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'aliases' => array(), 'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223'), 'guzzlehttp/psr7' => array('pretty_version' => '2.6.2', 'version' => '2.6.2.0', 'aliases' => array(), 'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221'), 'laravel/serializable-closure' => array('pretty_version' => 'v1.3.3', 'version' => '1.3.3.0', 'aliases' => array(), 'reference' => '3dbf8a8e914634c48d389c1234552666b3d43754'), 'php-di/invoker' => array('pretty_version' => '2.3.4', 'version' => '2.3.4.0', 'aliases' => array(), 'reference' => '33234b32dafa8eb69202f950a1fc92055ed76a86'), 'php-di/php-di' => array('pretty_version' => '6.4.0', 'version' => '6.4.0.0', 'aliases' => array(), 'reference' => 'ae0f1b3b03d8b29dff81747063cbfd6276246cc4'), 'php-di/phpdoc-reader' => array('pretty_version' => '2.2.1', 'version' => '2.2.1.0', 'aliases' => array(), 'reference' => '66daff34cbd2627740ffec9469ffbac9f8c8185c'), 'psr/container' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'aliases' => array(), 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f'), 'psr/container-implementation' => array('provided' => array(0 => '^1.0')), 'psr/http-client' => array('pretty_version' => '1.0.3', 'version' => '1.0.3.0', 'aliases' => array(), 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90'), 'psr/http-client-implementation' => array('provided' => array(0 => '1.0')), 'psr/http-factory' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'aliases' => array(), 'reference' => 'e616d01114759c4c489f93b099585439f795fe35'), 'psr/http-factory-implementation' => array('provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '2.0', 'version' => '2.0.0.0', 'aliases' => array(), 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71'), 'psr/http-message-implementation' => array('provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'aliases' => array(), 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11'), 'ralouphie/getallheaders' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'aliases' => array(), 'reference' => '120b605dfeb996808c31b6477290a714d356e822'), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'aliases' => array(), 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66'))); 10 10 private static $canGetVendors; 11 11 private static $installedByVendor = array(); -
activecampaign-for-woocommerce/trunk/ac_vendor/composer/autoload_real.php
r3017123 r3032832 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit db051d39acf323762cd4c9b440d99ff75 class ComposerAutoloaderInit2e569f6b636f68ab6baea966bd12ceff 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit db051d39acf323762cd4c9b440d99ff7', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit2e569f6b636f68ab6baea966bd12ceff', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit db051d39acf323762cd4c9b440d99ff7', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit2e569f6b636f68ab6baea966bd12ceff', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit db051d39acf323762cd4c9b440d99ff7::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; … … 54 54 55 55 if ($useStaticLoader) { 56 $includeFiles = Composer\Autoload\ComposerStaticInit db051d39acf323762cd4c9b440d99ff7::$files;56 $includeFiles = Composer\Autoload\ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::$files; 57 57 } else { 58 58 $includeFiles = require __DIR__ . '/autoload_files.php'; 59 59 } 60 60 foreach ($includeFiles as $fileIdentifier => $file) { 61 composerRequire db051d39acf323762cd4c9b440d99ff7($fileIdentifier, $file);61 composerRequire2e569f6b636f68ab6baea966bd12ceff($fileIdentifier, $file); 62 62 } 63 63 … … 66 66 } 67 67 68 function composerRequire db051d39acf323762cd4c9b440d99ff7($fileIdentifier, $file)68 function composerRequire2e569f6b636f68ab6baea966bd12ceff($fileIdentifier, $file) 69 69 { 70 70 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
activecampaign-for-woocommerce/trunk/ac_vendor/composer/autoload_static.php
r3017123 r3032832 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit db051d39acf323762cd4c9b440d99ff77 class ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff 8 8 { 9 9 public static $files = array ( … … 476 476 { 477 477 return \Closure::bind(function () use ($loader) { 478 $loader->prefixLengthsPsr4 = ComposerStaticInit db051d39acf323762cd4c9b440d99ff7::$prefixLengthsPsr4;479 $loader->prefixDirsPsr4 = ComposerStaticInit db051d39acf323762cd4c9b440d99ff7::$prefixDirsPsr4;480 $loader->classMap = ComposerStaticInit db051d39acf323762cd4c9b440d99ff7::$classMap;478 $loader->prefixLengthsPsr4 = ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::$prefixLengthsPsr4; 479 $loader->prefixDirsPsr4 = ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::$prefixDirsPsr4; 480 $loader->classMap = ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::$classMap; 481 481 482 482 }, null, ClassLoader::class); -
activecampaign-for-woocommerce/trunk/ac_vendor/composer/installed.json
r2960798 r3032832 114 114 { 115 115 "name": "guzzlehttp\/guzzle", 116 "version": "7. 7.0",117 "version_normalized": "7. 7.0.0",116 "version": "7.8.1", 117 "version_normalized": "7.8.1.0", 118 118 "source": { 119 119 "type": "git", 120 120 "url": "https:\/\/github.com\/guzzle\/guzzle.git", 121 "reference": " fb7566caccf22d74d1ab270de3551f72a58399f5"122 }, 123 "dist": { 124 "type": "zip", 125 "url": "https:\/\/api.github.com\/repos\/guzzle\/guzzle\/zipball\/ fb7566caccf22d74d1ab270de3551f72a58399f5",126 "reference": " fb7566caccf22d74d1ab270de3551f72a58399f5",121 "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" 122 }, 123 "dist": { 124 "type": "zip", 125 "url": "https:\/\/api.github.com\/repos\/guzzle\/guzzle\/zipball\/41042bc7ab002487b876a0683fc8dce04ddce104", 126 "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", 127 127 "shasum": "" 128 128 }, 129 129 "require": { 130 130 "ext-json": "*", 131 "guzzlehttp\/promises": "^1.5.3 || ^2.0 ",132 "guzzlehttp\/psr7": "^1.9.1 || ^2. 4.5",131 "guzzlehttp\/promises": "^1.5.3 || ^2.0.1", 132 "guzzlehttp\/psr7": "^1.9.1 || ^2.5.1", 133 133 "php": "^7.2.5 || ^8.0", 134 134 "psr\/http-client": "^1.0", … … 139 139 }, 140 140 "require-dev": { 141 "bamarni\/composer-bin-plugin": "^1.8. 1",141 "bamarni\/composer-bin-plugin": "^1.8.2", 142 142 "ext-curl": "*", 143 143 "php-http\/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", 144 144 "php-http\/message-factory": "^1.1", 145 "phpunit\/phpunit": "^8.5. 29 || ^9.5.23",145 "phpunit\/phpunit": "^8.5.36 || ^9.6.15", 146 146 "psr\/log": "^1.1 || ^2.0 || ^3.0" 147 147 }, … … 151 151 "psr\/log": "Required for using the Log middleware" 152 152 }, 153 "time": "2023- 05-21T14:04:53+00:00",153 "time": "2023-12-03T20:35:24+00:00", 154 154 "type": "library", 155 155 "extra": { … … 239 239 { 240 240 "name": "guzzlehttp\/promises", 241 "version": "2.0. 1",242 "version_normalized": "2.0. 1.0",241 "version": "2.0.2", 242 "version_normalized": "2.0.2.0", 243 243 "source": { 244 244 "type": "git", 245 245 "url": "https:\/\/github.com\/guzzle\/promises.git", 246 "reference": " 111166291a0f8130081195ac4556a5587d7f1b5d"247 }, 248 "dist": { 249 "type": "zip", 250 "url": "https:\/\/api.github.com\/repos\/guzzle\/promises\/zipball\/ 111166291a0f8130081195ac4556a5587d7f1b5d",251 "reference": " 111166291a0f8130081195ac4556a5587d7f1b5d",246 "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" 247 }, 248 "dist": { 249 "type": "zip", 250 "url": "https:\/\/api.github.com\/repos\/guzzle\/promises\/zipball\/bbff78d96034045e58e13dedd6ad91b5d1253223", 251 "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", 252 252 "shasum": "" 253 253 }, … … 256 256 }, 257 257 "require-dev": { 258 "bamarni\/composer-bin-plugin": "^1.8. 1",259 "phpunit\/phpunit": "^8.5. 29 || ^9.5.23"260 }, 261 "time": "2023- 08-03T15:11:55+00:00",258 "bamarni\/composer-bin-plugin": "^1.8.2", 259 "phpunit\/phpunit": "^8.5.36 || ^9.6.15" 260 }, 261 "time": "2023-12-03T20:19:20+00:00", 262 262 "type": "library", 263 263 "extra": { … … 321 321 { 322 322 "name": "guzzlehttp\/psr7", 323 "version": "2.6. 0",324 "version_normalized": "2.6. 0.0",323 "version": "2.6.2", 324 "version_normalized": "2.6.2.0", 325 325 "source": { 326 326 "type": "git", 327 327 "url": "https:\/\/github.com\/guzzle\/psr7.git", 328 "reference": " 8bd7c33a0734ae1c5d074360512beb716bef3f77"329 }, 330 "dist": { 331 "type": "zip", 332 "url": "https:\/\/api.github.com\/repos\/guzzle\/psr7\/zipball\/ 8bd7c33a0734ae1c5d074360512beb716bef3f77",333 "reference": " 8bd7c33a0734ae1c5d074360512beb716bef3f77",328 "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" 329 }, 330 "dist": { 331 "type": "zip", 332 "url": "https:\/\/api.github.com\/repos\/guzzle\/psr7\/zipball\/45b30f99ac27b5ca93cb4831afe16285f57b8221", 333 "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", 334 334 "shasum": "" 335 335 }, … … 345 345 }, 346 346 "require-dev": { 347 "bamarni\/composer-bin-plugin": "^1.8. 1",347 "bamarni\/composer-bin-plugin": "^1.8.2", 348 348 "http-interop\/http-factory-tests": "^0.9", 349 "phpunit\/phpunit": "^8.5. 29 || ^9.5.23"349 "phpunit\/phpunit": "^8.5.36 || ^9.6.15" 350 350 }, 351 351 "suggest": { 352 352 "laminas\/laminas-httphandlerrunner": "Emit PSR-7 responses" 353 353 }, 354 "time": "2023- 08-03T15:06:02+00:00",354 "time": "2023-12-03T20:05:35+00:00", 355 355 "type": "library", 356 356 "extra": { … … 436 436 { 437 437 "name": "laravel\/serializable-closure", 438 "version": "v1.3. 1",439 "version_normalized": "1.3. 1.0",438 "version": "v1.3.3", 439 "version_normalized": "1.3.3.0", 440 440 "source": { 441 441 "type": "git", 442 442 "url": "https:\/\/github.com\/laravel\/serializable-closure.git", 443 "reference": " e5a3057a5591e1cfe8183034b0203921abe2c902"444 }, 445 "dist": { 446 "type": "zip", 447 "url": "https:\/\/api.github.com\/repos\/laravel\/serializable-closure\/zipball\/ e5a3057a5591e1cfe8183034b0203921abe2c902",448 "reference": " e5a3057a5591e1cfe8183034b0203921abe2c902",443 "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" 444 }, 445 "dist": { 446 "type": "zip", 447 "url": "https:\/\/api.github.com\/repos\/laravel\/serializable-closure\/zipball\/3dbf8a8e914634c48d389c1234552666b3d43754", 448 "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", 449 449 "shasum": "" 450 450 }, … … 458 458 "symfony\/var-dumper": "^5.4.11" 459 459 }, 460 "time": "2023- 07-14T13:56:28+00:00",460 "time": "2023-11-08T14:08:06+00:00", 461 461 "type": "library", 462 462 "extra": { … … 495 495 { 496 496 "name": "php-di\/invoker", 497 "version": "2.3. 3",498 "version_normalized": "2.3. 3.0",497 "version": "2.3.4", 498 "version_normalized": "2.3.4.0", 499 499 "source": { 500 500 "type": "git", 501 501 "url": "https:\/\/github.com\/PHP-DI\/Invoker.git", 502 "reference": " cd6d9f267d1a3474bdddf1be1da079f01b942786"503 }, 504 "dist": { 505 "type": "zip", 506 "url": "https:\/\/api.github.com\/repos\/PHP-DI\/Invoker\/zipball\/ cd6d9f267d1a3474bdddf1be1da079f01b942786",507 "reference": " cd6d9f267d1a3474bdddf1be1da079f01b942786",502 "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86" 503 }, 504 "dist": { 505 "type": "zip", 506 "url": "https:\/\/api.github.com\/repos\/PHP-DI\/Invoker\/zipball\/33234b32dafa8eb69202f950a1fc92055ed76a86", 507 "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86", 508 508 "shasum": "" 509 509 }, … … 517 517 "phpunit\/phpunit": "^9.0" 518 518 }, 519 "time": "202 1-12-13T09:22:56+00:00",519 "time": "2023-09-08T09:24:21+00:00", 520 520 "type": "library", 521 521 "installation-source": "dist", … … 717 717 { 718 718 "name": "psr\/http-client", 719 "version": "1.0. 2",720 "version_normalized": "1.0. 2.0",719 "version": "1.0.3", 720 "version_normalized": "1.0.3.0", 721 721 "source": { 722 722 "type": "git", 723 723 "url": "https:\/\/github.com\/php-fig\/http-client.git", 724 "reference": " 0955afe48220520692d2d09f7ab7e0f93ffd6a31"725 }, 726 "dist": { 727 "type": "zip", 728 "url": "https:\/\/api.github.com\/repos\/php-fig\/http-client\/zipball\/ 0955afe48220520692d2d09f7ab7e0f93ffd6a31",729 "reference": " 0955afe48220520692d2d09f7ab7e0f93ffd6a31",724 "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" 725 }, 726 "dist": { 727 "type": "zip", 728 "url": "https:\/\/api.github.com\/repos\/php-fig\/http-client\/zipball\/bb5906edc1c324c9a05aa0873d40117941e5fa90", 729 "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", 730 730 "shasum": "" 731 731 }, … … 734 734 "psr\/http-message": "^1.0 || ^2.0" 735 735 }, 736 "time": "2023-0 4-10T20:12:12+00:00",736 "time": "2023-09-23T14:17:50+00:00", 737 737 "type": "library", 738 738 "extra": { -
activecampaign-for-woocommerce/trunk/ac_vendor/composer/installed.php
r2960798 r3032832 3 3 namespace AcVendor; 4 4 5 return array('root' => array('pretty_version' => '1.5.0', 'version' => '1.5.0.0', 'aliases' => array(), 'reference' => NULL, 'name' => 'activecampaign/activecampaign-for-woocommerce'), 'versions' => array('activecampaign/activecampaign-for-woocommerce' => array('pretty_version' => '1.5.0', 'version' => '1.5.0.0', 'aliases' => array(), 'reference' => NULL), 'brick/math' => array('pretty_version' => '0.10.2', 'version' => '0.10.2.0', 'aliases' => array(), 'reference' => '459f2781e1a08d52ee56b0b1444086e038561e3f'), 'brick/money' => array('pretty_version' => '0.6.0', 'version' => '0.6.0.0', 'aliases' => array(), 'reference' => '7074e1bd463f517fb78447dff63454f4b1523c1b'), 'guzzlehttp/guzzle' => array('pretty_version' => '7. 7.0', 'version' => '7.7.0.0', 'aliases' => array(), 'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5'), 'guzzlehttp/promises' => array('pretty_version' => '2.0.1', 'version' => '2.0.1.0', 'aliases' => array(), 'reference' => '111166291a0f8130081195ac4556a5587d7f1b5d'), 'guzzlehttp/psr7' => array('pretty_version' => '2.6.0', 'version' => '2.6.0.0', 'aliases' => array(), 'reference' => '8bd7c33a0734ae1c5d074360512beb716bef3f77'), 'laravel/serializable-closure' => array('pretty_version' => 'v1.3.1', 'version' => '1.3.1.0', 'aliases' => array(), 'reference' => 'e5a3057a5591e1cfe8183034b0203921abe2c902'), 'php-di/invoker' => array('pretty_version' => '2.3.3', 'version' => '2.3.3.0', 'aliases' => array(), 'reference' => 'cd6d9f267d1a3474bdddf1be1da079f01b942786'), 'php-di/php-di' => array('pretty_version' => '6.4.0', 'version' => '6.4.0.0', 'aliases' => array(), 'reference' => 'ae0f1b3b03d8b29dff81747063cbfd6276246cc4'), 'php-di/phpdoc-reader' => array('pretty_version' => '2.2.1', 'version' => '2.2.1.0', 'aliases' => array(), 'reference' => '66daff34cbd2627740ffec9469ffbac9f8c8185c'), 'psr/container' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'aliases' => array(), 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f'), 'psr/container-implementation' => array('provided' => array(0 => '^1.0')), 'psr/http-client' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'aliases' => array(), 'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31'), 'psr/http-client-implementation' => array('provided' => array(0 => '1.0')), 'psr/http-factory' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'aliases' => array(), 'reference' => 'e616d01114759c4c489f93b099585439f795fe35'), 'psr/http-factory-implementation' => array('provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '2.0', 'version' => '2.0.0.0', 'aliases' => array(), 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71'), 'psr/http-message-implementation' => array('provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'aliases' => array(), 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11'), 'ralouphie/getallheaders' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'aliases' => array(), 'reference' => '120b605dfeb996808c31b6477290a714d356e822'), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'aliases' => array(), 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66')));5 return array('root' => array('pretty_version' => '1.5.0', 'version' => '1.5.0.0', 'aliases' => array(), 'reference' => NULL, 'name' => 'activecampaign/activecampaign-for-woocommerce'), 'versions' => array('activecampaign/activecampaign-for-woocommerce' => array('pretty_version' => '1.5.0', 'version' => '1.5.0.0', 'aliases' => array(), 'reference' => NULL), 'brick/math' => array('pretty_version' => '0.10.2', 'version' => '0.10.2.0', 'aliases' => array(), 'reference' => '459f2781e1a08d52ee56b0b1444086e038561e3f'), 'brick/money' => array('pretty_version' => '0.6.0', 'version' => '0.6.0.0', 'aliases' => array(), 'reference' => '7074e1bd463f517fb78447dff63454f4b1523c1b'), 'guzzlehttp/guzzle' => array('pretty_version' => '7.8.1', 'version' => '7.8.1.0', 'aliases' => array(), 'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104'), 'guzzlehttp/promises' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'aliases' => array(), 'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223'), 'guzzlehttp/psr7' => array('pretty_version' => '2.6.2', 'version' => '2.6.2.0', 'aliases' => array(), 'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221'), 'laravel/serializable-closure' => array('pretty_version' => 'v1.3.3', 'version' => '1.3.3.0', 'aliases' => array(), 'reference' => '3dbf8a8e914634c48d389c1234552666b3d43754'), 'php-di/invoker' => array('pretty_version' => '2.3.4', 'version' => '2.3.4.0', 'aliases' => array(), 'reference' => '33234b32dafa8eb69202f950a1fc92055ed76a86'), 'php-di/php-di' => array('pretty_version' => '6.4.0', 'version' => '6.4.0.0', 'aliases' => array(), 'reference' => 'ae0f1b3b03d8b29dff81747063cbfd6276246cc4'), 'php-di/phpdoc-reader' => array('pretty_version' => '2.2.1', 'version' => '2.2.1.0', 'aliases' => array(), 'reference' => '66daff34cbd2627740ffec9469ffbac9f8c8185c'), 'psr/container' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'aliases' => array(), 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f'), 'psr/container-implementation' => array('provided' => array(0 => '^1.0')), 'psr/http-client' => array('pretty_version' => '1.0.3', 'version' => '1.0.3.0', 'aliases' => array(), 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90'), 'psr/http-client-implementation' => array('provided' => array(0 => '1.0')), 'psr/http-factory' => array('pretty_version' => '1.0.2', 'version' => '1.0.2.0', 'aliases' => array(), 'reference' => 'e616d01114759c4c489f93b099585439f795fe35'), 'psr/http-factory-implementation' => array('provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '2.0', 'version' => '2.0.0.0', 'aliases' => array(), 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71'), 'psr/http-message-implementation' => array('provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'aliases' => array(), 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11'), 'ralouphie/getallheaders' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'aliases' => array(), 'reference' => '120b605dfeb996808c31b6477290a714d356e822'), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'aliases' => array(), 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66'))); -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Client.php
r2950993 r3032832 179 179 * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. 180 180 */ 181 public function getConfig( ?string $option = null)181 public function getConfig(string $option = null) 182 182 { 183 183 return $option === null ? $this->config : $this->config[$option] ?? null; -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/ClientInterface.php
r2950993 r3032832 75 75 * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. 76 76 */ 77 public function getConfig( ?string $option = null);77 public function getConfig(string $option = null); 78 78 } -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
r2950993 r3032832 81 81 return null; 82 82 } 83 /**84 * {@inheritDoc}85 */86 83 public function toArray() : array 87 84 { … … 90 87 }, $this->getIterator()->getArrayCopy()); 91 88 } 92 /** 93 * {@inheritDoc} 94 */ 95 public function clear(?string $domain = null, ?string $path = null, ?string $name = null) : void 89 public function clear(string $domain = null, string $path = null, string $name = null) : void 96 90 { 97 91 if (!$domain) { … … 112 106 } 113 107 } 114 /**115 * {@inheritDoc}116 */117 108 public function clearSessionCookies() : void 118 109 { … … 121 112 }); 122 113 } 123 /**124 * {@inheritDoc}125 */126 114 public function setCookie(SetCookie $cookie) : bool 127 115 { … … 205 193 * Computes cookie path following RFC 6265 section 5.1.4 206 194 * 207 * @see https:// tools.ietf.org/html/rfc6265#section-5.1.4195 * @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.4 208 196 */ 209 197 private function getCookiePathFromRequest(RequestInterface $request) : string -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
r2950993 r3032832 14 14 * 15 15 * @see https://docs.python.org/2/library/cookielib.html Inspiration 16 * 16 17 * @extends \IteratorAggregate<SetCookie> 17 18 */ … … 58 59 * @param string|null $name Clears cookies matching a domain, path, and name 59 60 */ 60 public function clear( ?string $domain = null, ?string $path = null, ?string $name = null) : void;61 public function clear(string $domain = null, string $path = null, string $name = null) : void; 61 62 /** 62 63 * Discard all sessions cookies. -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
r2950993 r3032832 355 355 } 356 356 // Remove the leading '.' as per spec in RFC 6265. 357 // https:// tools.ietf.org/html/rfc6265#section-5.2.3357 // https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.3 358 358 $cookieDomain = \ltrim(\strtolower($cookieDomain), '.'); 359 359 $domain = \strtolower($domain); … … 363 363 } 364 364 // Matching the subdomain according to RFC 6265. 365 // https:// tools.ietf.org/html/rfc6265#section-5.1.3365 // https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.3 366 366 if (\filter_var($domain, \FILTER_VALIDATE_IP)) { 367 367 return \false; -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
r2950993 r3032832 176 176 $method = $easy->request->getMethod(); 177 177 if ($method === 'PUT' || $method === 'POST') { 178 // See https:// tools.ietf.org/html/rfc7230#section-3.3.2178 // See https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2 179 179 if (!$easy->request->hasHeader('Content-Length')) { 180 180 $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; … … 487 487 }; 488 488 } 489 public function __destruct() 490 { 491 foreach ($this->handles as $id => $handle) { 492 \curl_close($handle); 493 unset($this->handles[$id]); 494 } 495 } 489 496 } -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
r2950993 r3032832 15 15 * **curl** key of the provided request options. 16 16 * 17 * @property resource|\CurlMultiHandle $_mh Internal use only. Lazy loaded multi-handle.18 *19 17 * @final 20 18 */ 21 #[\AllowDynamicProperties]22 19 class CurlMultiHandler 23 20 { … … 50 47 */ 51 48 private $options = []; 49 /** @var resource|\CurlMultiHandle */ 50 private $_mh; 52 51 /** 53 52 * This handler accepts the following options: … … 71 70 } 72 71 $this->options = $options['options'] ?? []; 72 // unsetting the property forces the first access to go through 73 // __get(). 74 unset($this->_mh); 73 75 } 74 76 /** -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/HandlerStack.php
r2950993 r3032832 41 41 * system will be utilized. 42 42 */ 43 public static function create( ?callable $handler = null) : self43 public static function create(callable $handler = null) : self 44 44 { 45 45 $stack = new self($handler ?: Utils::chooseHandler()); … … 116 116 * @param string $name Name to register for this middleware. 117 117 */ 118 public function unshift(callable $middleware, ?string $name = null) : void118 public function unshift(callable $middleware, string $name = null) : void 119 119 { 120 120 \array_unshift($this->stack, [$middleware, $name]); -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/MessageFormatter.php
r2950993 r3032832 65 65 * @param \Throwable|null $error Exception that was received 66 66 */ 67 public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null) : string67 public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null) : string 68 68 { 69 69 $cache = []; -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php
r2950993 r3032832 14 14 * @param \Throwable|null $error Exception that was received 15 15 */ 16 public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null) : string;16 public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null) : string; 17 17 } -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/RequestOptions.php
r2950993 r3032832 6 6 * This class contains a list of built-in Guzzle request options. 7 7 * 8 * More documentation for each option can be found at http://guzzlephp.org/. 9 * 10 * @see http://docs.guzzlephp.org/en/v6/request-options.html 8 * @see https://docs.guzzlephp.org/en/latest/request-options.html 11 9 */ 12 10 final class RequestOptions -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/TransferStats.php
r2950993 r3032832 39 39 * @param array $handlerStats Handler specific stats. 40 40 */ 41 public function __construct(RequestInterface $request, ?ResponseInterface $response = null, ?float $transferTime = null, $handlerErrorData = null, array $handlerStats = [])41 public function __construct(RequestInterface $request, ResponseInterface $response = null, float $transferTime = null, $handlerErrorData = null, array $handlerStats = []) 42 42 { 43 43 $this->request = $request; -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Utils.php
r2950993 r3032832 156 156 CA bundle by default. In order to verify peer certificates, you will need to 157 157 supply the path on disk to a certificate bundle to the 'verify' request 158 option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not 159 need a specific certificate bundle, then Mozilla provides a commonly used CA 160 bundle which can be downloaded here (provided by the maintainer of cURL): 161 https://curl.haxx.se/ca/cacert.pem. Once 162 you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP 163 ini setting to point to the path to the file, allowing you to omit the 'verify' 164 request option. See https://curl.haxx.se/docs/sslcerts.html for more 165 information. 158 option: https://docs.guzzlephp.org/en/latest/request-options.html#verify. If 159 you do not need a specific certificate bundle, then Mozilla provides a commonly 160 used CA bundle which can be downloaded here (provided by the maintainer of 161 cURL): https://curl.haxx.se/ca/cacert.pem. Once you have a CA bundle available 162 on disk, you can set the 'openssl.cafile' PHP ini setting to point to the path 163 to the file, allowing you to omit the 'verify' request option. See 164 https://curl.haxx.se/docs/sslcerts.html for more information. 166 165 EOT 167 166 ); -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/Each.php
r2950993 r3032832 19 19 * side effects and choose to resolve or reject the aggregate if needed. 20 20 * 21 * @param mixed $iterable Iterator or array to iterate over. 22 * @param callable $onFulfilled 23 * @param callable $onRejected 21 * @param mixed $iterable Iterator or array to iterate over. 24 22 */ 25 23 public static function of($iterable, callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface … … 37 35 * @param mixed $iterable 38 36 * @param int|callable $concurrency 39 * @param callable $onFulfilled40 * @param callable $onRejected41 37 */ 42 38 public static function ofLimit($iterable, $concurrency, callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface … … 51 47 * @param mixed $iterable 52 48 * @param int|callable $concurrency 53 * @param callable $onFulfilled54 49 */ 55 50 public static function ofLimitAll($iterable, $concurrency, callable $onFulfilled = null) : PromiseInterface -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/EachPromise.php
r2950993 r3032832 114 114 } 115 115 // Add only up to N pending promises. 116 $concurrency = \is_callable($this->concurrency) ? \call_user_func($this->concurrency,\count($this->pending)) : $this->concurrency;116 $concurrency = \is_callable($this->concurrency) ? ($this->concurrency)(\count($this->pending)) : $this->concurrency; 117 117 $concurrency = \max($concurrency - \count($this->pending), 0); 118 118 // Concurrency may be set to 0 to disallow new promises. … … 141 141 $this->pending[$idx] = $promise->then(function ($value) use($idx, $key) : void { 142 142 if ($this->onFulfilled) { 143 \call_user_func($this->onFulfilled,$value, $key, $this->aggregate);143 ($this->onFulfilled)($value, $key, $this->aggregate); 144 144 } 145 145 $this->step($idx); 146 146 }, function ($reason) use($idx, $key) : void { 147 147 if ($this->onRejected) { 148 \call_user_func($this->onRejected,$reason, $key, $this->aggregate);148 ($this->onRejected)($reason, $key, $this->aggregate); 149 149 } 150 150 $this->step($idx); -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/RejectionException.php
r2950993 r3032832 17 17 * @param string|null $description Optional description. 18 18 */ 19 public function __construct($reason, ?string $description = null)19 public function __construct($reason, string $description = null) 20 20 { 21 21 $this->reason = $reason; -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/AppendStream.php
r2950993 r3032832 195 195 } 196 196 /** 197 * {@inheritdoc}198 *199 197 * @return mixed 200 198 */ -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/BufferStream.php
r2950993 r3032832 110 110 } 111 111 /** 112 * {@inheritdoc}113 *114 112 * @return mixed 115 113 */ -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/FnStream.php
r2950993 r3032832 43 43 { 44 44 if (isset($this->_fn_close)) { 45 \call_user_func($this->_fn_close);45 ($this->_fn_close)(); 46 46 } 47 47 } … … 78 78 { 79 79 try { 80 return \call_user_func($this->_fn___toString); 80 /** @var string */ 81 return ($this->_fn___toString)(); 81 82 } catch (\Throwable $e) { 82 83 if (\PHP_VERSION_ID >= 70400) { … … 89 90 public function close() : void 90 91 { 91 \call_user_func($this->_fn_close);92 ($this->_fn_close)(); 92 93 } 93 94 public function detach() 94 95 { 95 return \call_user_func($this->_fn_detach);96 return ($this->_fn_detach)(); 96 97 } 97 98 public function getSize() : ?int 98 99 { 99 return \call_user_func($this->_fn_getSize);100 return ($this->_fn_getSize)(); 100 101 } 101 102 public function tell() : int 102 103 { 103 return \call_user_func($this->_fn_tell);104 return ($this->_fn_tell)(); 104 105 } 105 106 public function eof() : bool 106 107 { 107 return \call_user_func($this->_fn_eof);108 return ($this->_fn_eof)(); 108 109 } 109 110 public function isSeekable() : bool 110 111 { 111 return \call_user_func($this->_fn_isSeekable);112 return ($this->_fn_isSeekable)(); 112 113 } 113 114 public function rewind() : void 114 115 { 115 \call_user_func($this->_fn_rewind);116 ($this->_fn_rewind)(); 116 117 } 117 118 public function seek($offset, $whence = \SEEK_SET) : void 118 119 { 119 \call_user_func($this->_fn_seek,$offset, $whence);120 ($this->_fn_seek)($offset, $whence); 120 121 } 121 122 public function isWritable() : bool 122 123 { 123 return \call_user_func($this->_fn_isWritable);124 return ($this->_fn_isWritable)(); 124 125 } 125 126 public function write($string) : int 126 127 { 127 return \call_user_func($this->_fn_write,$string);128 return ($this->_fn_write)($string); 128 129 } 129 130 public function isReadable() : bool 130 131 { 131 return \call_user_func($this->_fn_isReadable);132 return ($this->_fn_isReadable)(); 132 133 } 133 134 public function read($length) : string 134 135 { 135 return \call_user_func($this->_fn_read,$length);136 return ($this->_fn_read)($length); 136 137 } 137 138 public function getContents() : string 138 139 { 139 return \call_user_func($this->_fn_getContents);140 return ($this->_fn_getContents)(); 140 141 } 141 142 /** 142 * {@inheritdoc}143 *144 143 * @return mixed 145 144 */ 146 145 public function getMetadata($key = null) 147 146 { 148 return \call_user_func($this->_fn_getMetadata,$key);147 return ($this->_fn_getMetadata)($key); 149 148 } 150 149 } -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Header.php
r2950993 r3032832 21 21 foreach (self::splitList($value) as $val) { 22 22 $part = []; 23 foreach (\preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {23 foreach (\preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) ?: [] as $kvp) { 24 24 if (\preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { 25 25 $m = $matches[0]; -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/InflateStream.php
r2950993 r3032832 12 12 * to a Guzzle stream resource to be used as a Guzzle stream. 13 13 * 14 * @see http ://tools.ietf.org/html/rfc195015 * @see http ://tools.ietf.org/html/rfc195216 * @see http ://php.net/manual/en/filters.compression.php14 * @see https://datatracker.ietf.org/doc/html/rfc1950 15 * @see https://datatracker.ietf.org/doc/html/rfc1952 16 * @see https://www.php.net/manual/en/filters.compression.php 17 17 */ 18 18 final class InflateStream implements StreamInterface … … 25 25 $resource = StreamWrapper::getResource($stream); 26 26 // Specify window=15+32, so zlib will use header detection to both gzip (with header) and zlib data 27 // See http ://www.zlib.net/manual.html#Advanced definition of inflateInit227 // See https://www.zlib.net/manual.html#Advanced definition of inflateInit2 28 28 // "Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection" 29 29 // Default window size is 15. -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Message.php
r2950993 r3032832 27 27 } 28 28 foreach ($message->getHeaders() as $name => $values) { 29 if (\ strtolower($name) === 'set-cookie') {29 if (\is_string($name) && \strtolower($name) === 'set-cookie') { 30 30 foreach ($values as $value) { 31 31 $msg .= "\r\n{$name}: " . $value; … … 120 120 // If these aren't the same, then one line didn't match and there's an invalid header. 121 121 if ($count !== \substr_count($rawHeaders, "\n")) { 122 // Folding is deprecated, see https:// tools.ietf.org/html/rfc7230#section-3.2.4122 // Folding is deprecated, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 123 123 if (\preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { 124 124 throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); … … 178 178 { 179 179 $data = self::parseMessage($message); 180 // According to https:// tools.ietf.org/html/rfc7230#section-3.1.2 the space181 // between status-code and reason-phrase is required. But browsers accept182 // responses without space and reason as well.180 // According to https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2 181 // the space between status-code and reason-phrase is required. But 182 // browsers accept responses without space and reason as well. 183 183 if (!\preg_match('/^HTTP\\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { 184 184 throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/MessageTrait.php
r2950993 r3032832 11 11 trait MessageTrait 12 12 { 13 /** @var array<string, string[]>Map of all registered headers, as original name => array of values */13 /** @var string[][] Map of all registered headers, as original name => array of values */ 14 14 private $headers = []; 15 /** @var array<string, string>Map of lowercase header name => original name at registration */15 /** @var string[] Map of lowercase header name => original name at registration */ 16 16 private $headerNames = []; 17 17 /** @var string */ … … 109 109 } 110 110 /** 111 * @param array<string|int, string|string[]>$headers111 * @param (string|string[])[] $headers 112 112 */ 113 113 private function setHeaders(array $headers) : void … … 156 156 * @return string[] Trimmed header values 157 157 * 158 * @see https:// tools.ietf.org/html/rfc7230#section-3.2.4158 * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 159 159 */ 160 160 private function trimAndValidateHeaderValues(array $values) : array … … 170 170 } 171 171 /** 172 * @see https:// tools.ietf.org/html/rfc7230#section-3.2172 * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 173 173 * 174 174 * @param mixed $header … … 184 184 } 185 185 /** 186 * @see https:// tools.ietf.org/html/rfc7230#section-3.2186 * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 187 187 * 188 188 * field-value = *( field-content / obs-fold ) -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/MultipartStream.php
r2950993 r3032832 44 44 * Get the headers needed before transferring the content of a POST file 45 45 * 46 * @param array<string, string>$headers46 * @param string[] $headers 47 47 */ 48 48 private function getHeaders(array $headers) : string … … 89 89 $stream->addStream(Utils::streamFor("\r\n")); 90 90 } 91 /** 92 * @param string[] $headers 93 * 94 * @return array{0: StreamInterface, 1: string[]} 95 */ 91 96 private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers) : array 92 97 { 93 98 // Set a default content-disposition header if one was no provided 94 $disposition = $this->getHeader($headers, 'content-disposition');99 $disposition = self::getHeader($headers, 'content-disposition'); 95 100 if (!$disposition) { 96 101 $headers['Content-Disposition'] = $filename === '0' || $filename ? \sprintf('form-data; name="%s"; filename="%s"', $name, \basename($filename)) : "form-data; name=\"{$name}\""; 97 102 } 98 103 // Set a default content-length header if one was no provided 99 $length = $this->getHeader($headers, 'content-length');104 $length = self::getHeader($headers, 'content-length'); 100 105 if (!$length) { 101 106 if ($length = $stream->getSize()) { … … 104 109 } 105 110 // Set a default Content-Type if one was not supplied 106 $type = $this->getHeader($headers, 'content-type');111 $type = self::getHeader($headers, 'content-type'); 107 112 if (!$type && ($filename === '0' || $filename)) { 108 113 $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream'; … … 110 115 return [$stream, $headers]; 111 116 } 112 private function getHeader(array $headers, string $key) 117 /** 118 * @param string[] $headers 119 */ 120 private static function getHeader(array $headers, string $key) : ?string 113 121 { 114 122 $lowercaseHeader = \strtolower($key); 115 123 foreach ($headers as $k => $v) { 116 if (\strtolower( $k) === $lowercaseHeader) {124 if (\strtolower((string) $k) === $lowercaseHeader) { 117 125 return $v; 118 126 } -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/PumpStream.php
r2950993 r3032832 17 17 final class PumpStream implements StreamInterface 18 18 { 19 /** @var callable |null */19 /** @var callable(int): (string|false|null)|null */ 20 20 private $source; 21 21 /** @var int|null */ … … 28 28 private $buffer; 29 29 /** 30 * @param callable(int): (string| null|false) $source Source of the stream data. The callable MAY30 * @param callable(int): (string|false|null) $source Source of the stream data. The callable MAY 31 31 * accept an integer argument used to control the 32 32 * amount of data to return. The callable MUST … … 124 124 } 125 125 /** 126 * {@inheritdoc}127 *128 126 * @return mixed 129 127 */ … … 137 135 private function pump(int $length) : void 138 136 { 139 if ($this->source ) {137 if ($this->source !== null) { 140 138 do { 141 $data = \call_user_func($this->source,$length);139 $data = ($this->source)($length); 142 140 if ($data === \false || $data === null) { 143 141 $this->source = null; -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Request.php
r2950993 r3032832 23 23 * @param string $method HTTP method 24 24 * @param string|UriInterface $uri URI 25 * @param array<string, string|string[]>$headers Request headers25 * @param (string|string[])[] $headers Request headers 26 26 * @param string|resource|StreamInterface|null $body Request body 27 27 * @param string $version Protocol version … … 110 110 } 111 111 // Ensure Host is the first header. 112 // See: http ://tools.ietf.org/html/rfc7230#section-5.4112 // See: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4 113 113 $this->headers = [$header => [$host]] + $this->headers; 114 114 } -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Response.php
r2950993 r3032832 20 20 /** 21 21 * @param int $status Status code 22 * @param array<string, string|string[]>$headers Response headers22 * @param (string|string[])[] $headers Response headers 23 23 * @param string|resource|StreamInterface|null $body Response body 24 24 * @param string $version Protocol version -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/ServerRequest.php
r2950993 r3032832 52 52 * @param string $method HTTP method 53 53 * @param string|UriInterface $uri URI 54 * @param array<string, string|string[]>$headers Request headers54 * @param (string|string[])[] $headers Request headers 55 55 * @param string|resource|StreamInterface|null $body Request body 56 56 * @param string $version Protocol version … … 223 223 } 224 224 /** 225 * {@inheritdoc}226 *227 225 * @return array|object|null 228 226 */ … … 242 240 } 243 241 /** 244 * {@inheritdoc}245 *246 242 * @return mixed 247 243 */ -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Stream.php
r2950993 r3032832 11 11 { 12 12 /** 13 * @see http ://php.net/manual/function.fopen.php14 * @see http ://php.net/manual/en/function.gzopen.php13 * @see https://www.php.net/manual/en/function.fopen.php 14 * @see https://www.php.net/manual/en/function.gzopen.php 15 15 */ 16 16 private const READABLE_MODES = '/r|a\\+|ab\\+|w\\+|wb\\+|x\\+|xb\\+|c\\+|cb\\+/'; … … 219 219 } 220 220 /** 221 * {@inheritdoc}222 *223 221 * @return mixed 224 222 */ -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
r2950993 r3032832 61 61 /** @var callable $callable */ 62 62 $callable = [$this->stream, $method]; 63 $result = \call_user_func_array($callable,$args);63 $result = $callable(...$args); 64 64 // Always return the wrapped object if the result is a return $this 65 65 return $result === $this->stream ? $this : $result; … … 70 70 } 71 71 /** 72 * {@inheritdoc}73 *74 72 * @return mixed 75 73 */ -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/StreamWrapper.php
r2950993 r3032832 98 98 } 99 99 /** 100 * @return array<int|string, int> 100 * @return array{ 101 * dev: int, 102 * ino: int, 103 * mode: int, 104 * nlink: int, 105 * uid: int, 106 * gid: int, 107 * rdev: int, 108 * size: int, 109 * atime: int, 110 * mtime: int, 111 * ctime: int, 112 * blksize: int, 113 * blocks: int 114 * } 101 115 */ 102 116 public function stream_stat() : array … … 106 120 } 107 121 /** 108 * @return array<int|string, int> 122 * @return array{ 123 * dev: int, 124 * ino: int, 125 * mode: int, 126 * nlink: int, 127 * uid: int, 128 * gid: int, 129 * rdev: int, 130 * size: int, 131 * atime: int, 132 * mtime: int, 133 * ctime: int, 134 * blksize: int, 135 * blocks: int 136 * } 109 137 */ 110 138 public function url_stat(string $path, int $flags) : array -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/UploadedFile.php
r2950993 r3032832 81 81 $this->error = $error; 82 82 } 83 private function isStringNotEmpty($param) : bool83 private static function isStringNotEmpty($param) : bool 84 84 { 85 85 return \is_string($param) && \false === empty($param); … … 121 121 { 122 122 $this->validateActive(); 123 if (\false === $this->isStringNotEmpty($targetPath)) {123 if (\false === self::isStringNotEmpty($targetPath)) { 124 124 throw new InvalidArgumentException('Invalid path provided for move operation; must be a non-empty string'); 125 125 } -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Uri.php
r2950993 r3032832 26 26 * Unreserved characters for use in a regex. 27 27 * 28 * @see https:// tools.ietf.org/html/rfc3986#section-2.328 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3 29 29 */ 30 30 private const CHAR_UNRESERVED = 'a-zA-Z0-9_\\-\\.~'; … … 32 32 * Sub-delims for use in a regex. 33 33 * 34 * @see https:// tools.ietf.org/html/rfc3986#section-2.234 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 35 35 */ 36 36 private const CHAR_SUB_DELIMS = '!\\$&\'\\(\\)\\*\\+,;='; … … 119 119 * that format). 120 120 * 121 * @see https:// tools.ietf.org/html/rfc3986#section-5.3121 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3 122 122 */ 123 123 public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment) : string … … 166 166 * @see Uri::isAbsolutePathReference 167 167 * @see Uri::isRelativePathReference 168 * @see https:// tools.ietf.org/html/rfc3986#section-4168 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4 169 169 */ 170 170 public static function isAbsolute(UriInterface $uri) : bool … … 177 177 * A relative reference that begins with two slash characters is termed an network-path reference. 178 178 * 179 * @see https:// tools.ietf.org/html/rfc3986#section-4.2179 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 180 180 */ 181 181 public static function isNetworkPathReference(UriInterface $uri) : bool … … 188 188 * A relative reference that begins with a single slash character is termed an absolute-path reference. 189 189 * 190 * @see https:// tools.ietf.org/html/rfc3986#section-4.2190 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 191 191 */ 192 192 public static function isAbsolutePathReference(UriInterface $uri) : bool … … 199 199 * A relative reference that does not begin with a slash character is termed a relative-path reference. 200 200 * 201 * @see https:// tools.ietf.org/html/rfc3986#section-4.2201 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 202 202 */ 203 203 public static function isRelativePathReference(UriInterface $uri) : bool … … 215 215 * @param UriInterface|null $base An optional base URI to compare against 216 216 * 217 * @see https:// tools.ietf.org/html/rfc3986#section-4.4217 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4 218 218 */ 219 219 public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) : bool … … 263 263 * It has the same behavior as withQueryValue() but for an associative array of key => value. 264 264 * 265 * @param UriInterface $uri URI to use as a base.266 * @param array<string, string|null>$keyValueArray Associative array of key and values265 * @param UriInterface $uri URI to use as a base. 266 * @param (string|null)[] $keyValueArray Associative array of key and values 267 267 */ 268 268 public static function withQueryValues(UriInterface $uri, array $keyValueArray) : UriInterface … … 277 277 * Creates a URI from a hash of `parse_url` components. 278 278 * 279 * @see http ://php.net/manual/en/function.parse-url.php279 * @see https://www.php.net/manual/en/function.parse-url.php 280 280 * 281 281 * @throws MalformedUriException If the components do not form a valid URI. … … 490 490 } 491 491 /** 492 * @param string[] $keys492 * @param (string|int)[] $keys 493 493 * 494 494 * @return string[] … … 500 500 return []; 501 501 } 502 $decodedKeys = \array_map('rawurldecode', $keys); 502 $decodedKeys = \array_map(function ($k) : string { 503 return \rawurldecode((string) $k); 504 }, $keys); 503 505 return \array_filter(\explode('&', $current), function ($part) use($decodedKeys) { 504 506 return !\in_array(\rawurldecode(\explode('=', $part)[0]), $decodedKeys, \true); -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/UriNormalizer.php
r2950993 r3032832 10 10 * @author Tobias Schultze 11 11 * 12 * @see https:// tools.ietf.org/html/rfc3986#section-612 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6 13 13 */ 14 14 final class UriNormalizer … … 103 103 * @param int $flags A bitmask of normalizations to apply, see constants 104 104 * 105 * @see https:// tools.ietf.org/html/rfc3986#section-6.2105 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.2 106 106 */ 107 107 public static function normalize(UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS) : UriInterface … … 147 147 * @param int $normalizations A bitmask of normalizations to apply, see constants 148 148 * 149 * @see https:// tools.ietf.org/html/rfc3986#section-6.1149 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1 150 150 */ 151 151 public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS) : bool … … 156 156 { 157 157 $regex = '/(?:%[A-Fa-f0-9]{2})++/'; 158 $callback = function (array $match) {158 $callback = function (array $match) : string { 159 159 return \strtoupper($match[0]); 160 160 }; … … 164 164 { 165 165 $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; 166 $callback = function (array $match) {166 $callback = function (array $match) : string { 167 167 return \rawurldecode($match[0]); 168 168 }; -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/UriResolver.php
r2950993 r3032832 10 10 * @author Tobias Schultze 11 11 * 12 * @see https:// tools.ietf.org/html/rfc3986#section-512 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5 13 13 */ 14 14 final class UriResolver … … 17 17 * Removes dot segments from a path and returns the new path. 18 18 * 19 * @see http ://tools.ietf.org/html/rfc3986#section-5.2.419 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4 20 20 */ 21 21 public static function removeDotSegments(string $path) : string … … 47 47 * Converts the relative URI into a new URI that is resolved against the base URI. 48 48 * 49 * @see http ://tools.ietf.org/html/rfc3986#section-5.249 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2 50 50 */ 51 51 public static function resolve(UriInterface $base, UriInterface $rel) : UriInterface -
activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Utils.php
r2950993 r3032832 13 13 * Remove the items given by the keys, case insensitively from the data. 14 14 * 15 * @param string[] $keys15 * @param (string|int)[] $keys 16 16 */ 17 17 public static function caselessRemove(array $keys, array $data) : array … … 19 19 $result = []; 20 20 foreach ($keys as &$key) { 21 $key = \strtolower( $key);21 $key = \strtolower((string) $key); 22 22 } 23 23 foreach ($data as $k => $v) { 24 if (!\i s_string($k) || !\in_array(\strtolower($k), $keys)) {24 if (!\in_array(\strtolower((string) $k), $keys)) { 25 25 $result[$k] = $v; 26 26 } … … 186 186 * @param int|null $maxLength Maximum buffer length 187 187 */ 188 public static function readLine(StreamInterface $stream, ?int $maxLength = null) : string188 public static function readLine(StreamInterface $stream, int $maxLength = null) : string 189 189 { 190 190 $buffer = ''; -
activecampaign-for-woocommerce/trunk/ac_vendor/laravel/serializable-closure/src/Support/ReflectionClosure.php
r2950993 r3032832 480 480 case 'id_name': 481 481 switch ($token[0]) { 482 // named arguments... 483 case ':': 482 case $token[0] === ':' && $context !== 'instanceof': 484 483 if ($lastState === 'closure' && $context === 'root') { 485 484 $state = 'closure'; … … 606 605 case 'anonymous': 607 606 switch ($token[0]) { 607 case \T_NAME_QUALIFIED: 608 [$id_start, $id_start_ci, $id_name] = $this->parseNameQualified($token[1]); 609 $state = 'id_name'; 610 $lastState = 'anonymous'; 611 break 2; 608 612 case \T_NS_SEPARATOR: 609 613 case \T_STRING: -
activecampaign-for-woocommerce/trunk/activecampaign-for-woocommerce.php
r3017132 r3032832 17 17 * Plugin URI: https://www.activecampaign.com/ 18 18 * Description: Add Abandoned Cart functionality to your WooCommerce store, synchronize order & customer information using ActiveCampaign. 19 * Version: 2.5. 520 * WC requires at least: 7.4 21 * WC tested up to: 8. 3.119 * Version: 2.5.6 20 * WC requires at least: 7.4.0 21 * WC tested up to: 8.5.1 22 22 * Requires at least: 6.0 23 23 * Requires PHP: 7.4 -
activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin-historical-sync.php
r2977226 r3032832 42 42 43 43 /** 44 * Schedules the bulk historical sync to run as a background job. 44 * Fetches the next historical sync cron time. 45 * 46 * @return array 47 */ 48 public function get_next_historical_sync() { 49 $logger = new Logger(); 50 $data = null; 51 52 try { 53 if ( function_exists( 'wp_get_scheduled_event' ) ) { 54 $historical_order_schedule = wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR ); 55 if ( $historical_order_schedule ) { 56 $data['historical_order_schedule']['error'] = false; 57 $data['historical_order_schedule']['timestamp'] = wp_date( DATE_ATOM, $historical_order_schedule->timestamp ); 58 $data['historical_order_schedule']['schedule'] = $historical_order_schedule->schedule; 59 if ( $historical_order_schedule->timestamp && $historical_order_schedule->interval ) { 60 $next = $historical_order_schedule->timestamp + $historical_order_schedule->interval - time(); 61 $data['historical_order_schedule']['next_scheduled'] = $next; 62 } 63 } else { 64 $data['historical_order_schedule']['error'] = true; 65 $logger->warning( 66 'Historical order sync is not scheduled.', 67 [ 68 'historical_order_schedule' => $historical_order_schedule, 69 ] 70 ); 71 } 72 } elseif ( function_exists( 'wp_next_scheduled' ) ) { 73 $logger->warning( 'The wp_get_scheduled_event function may not exist. Performing wp_next_scheduled instead.' ); 74 $historical_order_schedule = wp_next_scheduled( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR ); 75 $data['historical_order_schedule']['timestamp'] = wp_date( DATE_ATOM, $historical_order_schedule ); 76 } 77 } catch ( Throwable $t ) { 78 $logger->warning( 79 'There was an issue getting the historical sync cron information.', 80 [ 81 'message' => $t->getMessage(), 82 'trace' => $t->getTrace(), 83 'ac_code' => 'AHS_80', 84 ] 85 ); 86 } 87 88 return $data; 89 } 90 91 /** 92 * Schedules the bulk historical sync to run as a background job. Called via ajax from historical sync page. 45 93 * 46 94 * @since 1.6.0 … … 48 96 public function schedule_bulk_historical_sync() { 49 97 $logger = new Logger(); 98 $this->schedule_cron_syncs(); 99 50 100 try { 51 101 delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_RUNNING_STATUS_NAME ); 102 delete_transient( 'activecampaign_for_woocommerce_hs_contacts' ); 52 103 $sync_contacts = self::get_request_data( 'syncContacts' ); 53 104 … … 300 351 delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_SCHEDULED_STATUS_NAME ); 301 352 delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_LAST_STATUS_NAME ); 353 delete_transient( 'activecampaign_for_woocommerce_hs_contacts' ); 302 354 $this->clean_bad_data_from_table(); 303 355 $this->clean_all_old_historical_syncs(); -
activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin-status.php
r2988259 r3032832 107 107 WC_Log_Handler_DB::delete_logs_before_timestamp( $date->format( 'U' ) ); 108 108 } catch ( Throwable $t ) { 109 $this->logger->warning( 109 $logger = new Logger(); 110 $logger->warning( 110 111 'There was an issue trying to remove old log records.', 111 112 [ … … 161 162 $data['wc_webhooks'] = $wpdb->get_results( 'SELECT name, status FROM ' . $wpdb->prefix . 'wc_webhooks;' ); 162 163 $data['wc_rest_keys'] = $wpdb->get_results( 'SELECT description, last_access, permissions FROM ' . $wpdb->prefix . 'woocommerce_api_keys;' ); 163 $data['synced_results'] = $wpdb->get_results( 'SELECT count(*) as count, synced_to_ac FROM `' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '` WHERE order_date IS NOT NULL ANDwc_order_id is not null GROUP BY synced_to_ac' );164 $data['synced_results'] = $wpdb->get_results( 'SELECT count(*) as count, synced_to_ac FROM `' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '` WHERE wc_order_id is not null GROUP BY synced_to_ac' ); 164 165 $data['abandoned_results'] = $wpdb->get_results( 'SELECT count(*) as count, synced_to_ac FROM `' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '` WHERE order_date IS NULL AND wc_order_id is null GROUP BY synced_to_ac' ); 165 166 $data['permalink_structure'] = get_option( 'permalink_structure' ); … … 204 205 } 205 206 } catch ( Throwable $t ) { 206 $this->logger->warning( 207 $logger = new Logger(); 208 $logger->warning( 207 209 'ActiveCampaign status page threw an error', 208 210 [ … … 240 242 */ 241 243 private function get_woocommerce_data( $data ) { 242 243 try { 244 $wc_report = wc()->api->get_endpoint_data( '/wc/v3/system_status' ); 245 $data['wc_environment'] = $wc_report['environment']; 246 $data['wc_database'] = $wc_report['database']; 247 $data['wc_post_type_counts'] = isset( $wc_report['post_type_counts'] ) ? $wc_report['post_type_counts'] : array(); 248 $data['wc_settings'] = $wc_report['settings']; 249 $data['wc_theme'] = $wc_report['theme']; 250 $data['legacy_api'] = get_option( 'woocommerce_api_enabled' ); 251 $data['woocommerce_version'] = wc()->api->get_rest_api_package_version(); 244 $logger = new Logger(); 245 246 $data['legacy_api'] = null; 247 $data['woocommerce_version'] = null; 248 $data['woocommerce_latest_version'] = null; 249 250 try { 251 $wc_report = wc()->api->get_endpoint_data( '/wc/v3/system_status' ); 252 } catch ( Throwable $t ) { 253 $logger->warning( 254 'ActiveCampaign status page could not retrieve WooCommerce data. WooCommerce setup may not be complete or may have an error. If there is an issue with WooCommerce then ActiveCampaign may not run as expected.', 255 [ 256 'message' => $t->getMessage(), 257 'trace' => $logger->clean_trace( $t->getTrace() ), 258 ] 259 ); 260 } 261 262 if ( isset( $wc_report ) ) { 263 $data['wc_environment'] = $this->get_wc_data_chunk( $wc_report, 'environment' ); 264 $data['wc_database'] = $this->get_wc_data_chunk( $wc_report, 'database' ); 265 $data['wc_post_type_counts'] = isset( $wc_report['post_type_counts'] ) ? $wc_report['post_type_counts'] : array(); 266 $data['wc_settings'] = $this->get_wc_data_chunk( $wc_report, 'settings' ); 267 $data['wc_theme'] = $this->get_wc_data_chunk( $wc_report, 'theme' ); 268 } else { 269 $data['wc_environment'] = null; 270 $data['wc_database'] = null; 271 $data['wc_post_type_counts'] = array(); 272 $data['wc_settings'] = null; 273 $data['wc_theme'] = null; 274 } 275 276 try { 277 $data['legacy_api'] = get_option( 'woocommerce_api_enabled' ); 278 } catch ( Throwable $t ) { 279 $logger->warning( 280 'ActiveCampaign status page could not retrieve WooCommerce legacy API.', 281 [ 282 'message' => $t->getMessage(), 283 'trace' => $logger->clean_trace( $t->getTrace() ), 284 ] 285 ); 286 } 287 288 try { 289 $data['woocommerce_version'] = wc()->api->get_rest_api_package_version(); 290 } catch ( Throwable $t ) { 291 $logger->warning( 292 'ActiveCampaign status page could not retrieve WooCommerce version. WooCommerce setup may not be complete or may have an error.', 293 [ 294 'message' => $t->getMessage(), 295 'trace' => $logger->clean_trace( $t->getTrace() ), 296 ] 297 ); 298 } 299 300 try { 252 301 $data['woocommerce_latest_version'] = get_transient( 'woocommerce_system_status_wp_version_check' ); 253 302 } catch ( Throwable $t ) { 254 $this->logger->warning( 255 'ActiveCampaign status page threw an error', 256 [ 257 'message' => $t->getMessage(), 258 ] 259 ); 260 } 303 $logger->warning( 304 'ActiveCampaign status page could not retrieve WooCommerce latest version. WooCommerce setup may not be complete or may have an error.', 305 [ 306 'message' => $t->getMessage(), 307 'trace' => $logger->clean_trace( $t->getTrace() ), 308 ] 309 ); 310 } 311 261 312 return $data; 313 } 314 315 private function get_wc_data_chunk( $data, $child ) { 316 try { 317 if ( isset( $data[ $child ] ) ) { 318 return $data[ $child ]; 319 } else { 320 return null; 321 } 322 } catch ( Throwable $t ) { 323 $logger = new Logger(); 324 $logger->warning( 325 'ActiveCampaign status page could not retrieve WooCommerce data. See the data chunk throwing the issue and the message below. WooCommerce setup may not be complete or may have an error. If there is an issue with WooCommerce then ActiveCampaign may not run as expected.', 326 [ 327 'message' => $t->getMessage(), 328 'chunk' => $child, 329 'trace' => $logger->clean_trace( $t->getTrace() ), 330 ] 331 ); 332 } 262 333 } 263 334 … … 283 354 } 284 355 } catch ( Throwable $t ) { 285 $this->logger->warning( 356 $logger = new Logger(); 357 $logger->warning( 286 358 'ActiveCampaign status page threw an error', 287 359 [ … … 309 381 try { 310 382 if ( function_exists( 'wp_get_scheduled_event' ) ) { 311 $abandoned_schedule = wp_get_scheduled_event( 'activecampaign_for_woocommerce_cart_updated_recurring_event' ); 312 $new_order_schedule = wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME ); 383 $abandoned_schedule = wp_get_scheduled_event( 'activecampaign_for_woocommerce_cart_updated_recurring_event' ); 384 $new_order_schedule = wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME ); 385 $historical_order_schedule = wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR ); 313 386 314 387 if ( $abandoned_schedule ) { 315 $data['abandoned_schedule']['timestamp'] = gmdate( DATE_ATOM, $abandoned_schedule->timestamp );388 $data['abandoned_schedule']['timestamp'] = wp_date( DATE_ATOM, $abandoned_schedule->timestamp ); 316 389 317 390 if ( $abandoned_schedule->timestamp && $abandoned_schedule->interval ) { … … 334 407 if ( $new_order_schedule ) { 335 408 $data['new_order_schedule']['error'] = false; 336 $data['new_order_schedule']['timestamp'] = gmdate( DATE_ATOM, $new_order_schedule->timestamp );409 $data['new_order_schedule']['timestamp'] = wp_date( DATE_ATOM, $new_order_schedule->timestamp ); 337 410 $data['new_order_schedule']['schedule'] = $new_order_schedule->schedule; 338 411 if ( $new_order_schedule->timestamp && $new_order_schedule->interval ) { … … 349 422 ); 350 423 } 424 425 if ( $historical_order_schedule ) { 426 $data['historical_order_schedule']['error'] = false; 427 $data['historical_order_schedule']['timestamp'] = wp_date( DATE_ATOM, $historical_order_schedule->timestamp ); 428 $data['historical_order_schedule']['schedule'] = $historical_order_schedule->schedule; 429 if ( $historical_order_schedule->timestamp && $historical_order_schedule->interval ) { 430 $next = $historical_order_schedule->timestamp + $historical_order_schedule->interval - time(); 431 $data['historical_order_schedule']['next_scheduled'] = $next; 432 } 433 } else { 434 $data['historical_order_schedule']['error'] = true; 435 $logger->warning( 436 'Historical order sync is not scheduled.', 437 [ 438 'historical_order_schedule' => $historical_order_schedule, 439 ] 440 ); 441 } 351 442 } elseif ( function_exists( 'wp_next_scheduled' ) ) { 352 443 $logger->warning( 'The wp_get_scheduled_event function may not exist. Performing wp_next_scheduled instead.' ); 353 $abandoned_schedule = wp_next_scheduled( 'activecampaign_for_woocommerce_cart_updated_recurring_event' ); 354 $new_order_schedule = wp_next_scheduled( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME ); 355 $data['abandoned_schedule']['timestamp'] = gmdate( DATE_ATOM, $abandoned_schedule ); 356 $data['new_order_schedule']['timestamp'] = gmdate( DATE_ATOM, $new_order_schedule ); 357 $data['new_order_schedule']['error'] = false; 444 $abandoned_schedule = wp_next_scheduled( 'activecampaign_for_woocommerce_cart_updated_recurring_event' ); 445 $new_order_schedule = wp_next_scheduled( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME ); 446 $historical_order_schedule = wp_next_scheduled( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR ); 447 $data['abandoned_schedule']['timestamp'] = wp_date( DATE_ATOM, $abandoned_schedule ); 448 $data['new_order_schedule']['timestamp'] = wp_date( DATE_ATOM, $new_order_schedule ); 449 $data['historical_order_schedule']['timestamp'] = wp_date( DATE_ATOM, $historical_order_schedule ); 450 $data['new_order_schedule']['error'] = false; 358 451 if ( ! $new_order_schedule || ! $abandoned_schedule ) { 359 452 $logger->warning( 360 453 'An order sync is not scheduled.', 361 454 [ 362 'new_order_schedule' => $new_order_schedule, 363 'abandoned_cart_schedule' => $abandoned_schedule, 455 'new_order_schedule' => $new_order_schedule, 456 'historical_order_schedule' => $historical_order_schedule, 457 'abandoned_cart_schedule' => $abandoned_schedule, 364 458 ] 365 459 ); -
activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin-wc-order-page.php
r2966088 r3032832 17 17 class Activecampaign_For_Woocommerce_Admin_WC_Order_Page implements Synced_Status { 18 18 use Activecampaign_For_Woocommerce_Synced_Status_Handler, 19 Activecampaign_For_Woocommerce_Order_Data_Gathering, 19 20 Activecampaign_For_Woocommerce_Admin_Utilities; 20 21 … … 94 95 95 96 if ( ! isset( $table_data, $table_data->id ) ) { 96 self::save_table_data( $order, null ); 97 $order_ac = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->check_for_synced_order( $wc_order_id ); 98 $order_ac_id = $order_ac->get_id(); 99 } 100 101 if ( 102 ! isset( $order_ac ) && 103 isset( $table_data->synced_to_ac ) && 104 in_array( $table_data->synced_to_ac, [ 0, '0' ] ) 105 ) { 106 $order_ac = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->check_for_synced_order( $wc_order_id ); 107 $order_ac_id = $order_ac->get_id(); 108 } 109 110 if ( ! isset( $table_data, $table_data->id ) ) { 111 if ( isset( $order_ac_id ) && ! empty( $order_ac_id ) ) { 112 self::save_table_data( $order, null, 1 ); 113 } 97 114 98 115 $table_data = self::get_table_data( $wc_order_id ); … … 112 129 } 113 130 131 if ( 132 isset( $order_ac_id ) && 133 ! empty( $order_ac_id ) && 134 isset( $table_data->synced_to_ac ) && 135 in_array( $table_data->synced_to_ac, [ 0, '0' ] ) 136 ) { 137 $table_data->synced_to_ac = 1; 138 self::save_table_data( $order, $table_data ); 139 } 140 114 141 $activecampaign_for_woocommerce_data = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->get_order_page_data( $table_data, $ac_contact ); 115 142 116 143 require_once plugin_dir_path( __FILE__ ) . 'partials/activecampaign-for-woocommerce-order-meta.php'; 117 144 } 145 } 146 147 public function check_for_synced_order( $wc_order_id ) { 148 $settings = get_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_DB_SETTINGS_NAME ); 149 150 $api_uri = isset( $settings['api_url'] ) ? $settings['api_url'] : null; 151 $api_key = isset( $settings['api_key'] ) ? $settings['api_key'] : null; 152 $logger = new Logger(); 153 $order_repository = new Activecampaign_For_Woocommerce_Ecom_Order_Repository( new Api_Client( $api_uri, $api_key, $logger ) ); 154 155 $order_ac = $order_repository->find_by_externalid( $wc_order_id ); 156 return $order_ac; 118 157 } 119 158 … … 211 250 } 212 251 213 private static function save_table_data( $wc_order, $table_data = false ) {252 private static function save_table_data( $wc_order, $table_data = false, $status_override = null ) { 214 253 $logger = new Logger(); 215 254 … … 264 303 } 265 304 305 if ( isset( $status_override ) && ! empty( $status_override ) ) { 306 $store_data['synced_to_ac'] = $status_override; 307 } 308 266 309 global $wpdb; 267 310 if ( isset( $table_data->id ) && ! empty( $table_data->id ) ) { -
activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin.php
r3017123 r3032832 1109 1109 public function schedule_cron_syncs() { 1110 1110 wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME ); 1111 wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR ); 1111 1112 wp_clear_scheduled_hook( 'activecampaign_for_woocommerce_cart_updated_recurring_event' ); 1112 1113 … … 1119 1120 wp_schedule_event( time() + 10, 'hourly', 'activecampaign_for_woocommerce_cart_updated_recurring_event' ); 1120 1121 wp_schedule_event( time() + 10, 'every_minute', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME ); 1122 wp_schedule_event( time() + 15, 'every_minute', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR ); 1121 1123 } 1122 1124 } catch ( Throwable $t ) { … … 1137 1139 wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME ); 1138 1140 wp_clear_scheduled_hook( 'activecampaign_for_woocommerce_cart_updated_recurring_event' ); 1141 wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR ); 1139 1142 } 1140 1143 … … 1182 1185 wp_clear_scheduled_hook( 'activecampaign_for_woocommerce_cart_updated_recurring_event' ); 1183 1186 wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME ); 1184 1187 wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_PRODUCT_SYNC_NAME ); 1188 wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR ); 1189 wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_SYNC_NAME ); 1190 wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_SCHEDULED_STATUS_NAME ); 1191 wp_clear_scheduled_hook( 'activecampaign_for_woocommerce_prep_historical_data' ); 1192 delete_transient( 'activecampaign_for_woocommerce_all_connections' ); 1193 delete_transient( 'activecampaign_for_woocommerce_connection' ); 1194 delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_RUNNING_STATUS_NAME ); 1195 delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_SCHEDULED_STATUS_NAME ); 1196 delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_LAST_STATUS_NAME ); 1197 delete_option( 'activecampaign_for_woocommerce_connection_health_check_last_run' ); 1198 delete_option( 'activecampaign_for_woocommerce_last_order_sync' ); 1199 delete_option( 'activecampaign_for_woocommerce_abandoned_cart_last_run' ); 1200 delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_SCHEDULED_STATUS_NAME ); 1201 delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_PRODUCT_SYNC_RUNNING_STATUS_NAME ); 1202 delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_PRODUCT_SYNC_LAST_STATUS_NAME ); 1185 1203 return true; 1186 1204 } else { -
activecampaign-for-woocommerce/trunk/admin/partials/activecampaign-for-woocommerce-status-mapping.php
r3017132 r3032832 9 9 * @subpackage Activecampaign_For_Woocommerce/admin/partials 10 10 */ 11 use Activecampaign_For_Woocommerce_Cofe_Ecom_Order_Status as Ecom_Order_Status; 11 12 12 $activecampaign_for_woocommerce_options = $this->get_ac_settings(); 13 $activecampaign_for_woocommerce_settings = $this->get_local_settings(); 14 $activecampaign_for_woocommerce_saved_mappings = null; 13 try { 14 $activecampaign_for_woocommerce_options = $this->get_ac_settings(); 15 $activecampaign_for_woocommerce_settings = $this->get_local_settings(); 16 $activecampaign_for_woocommerce_saved_mappings = null; 15 17 16 if ( isset( $activecampaign_for_woocommerce_settings['status_mapping'] ) ) { 17 $activecampaign_for_woocommerce_saved_mappings = $activecampaign_for_woocommerce_settings['status_mapping']; 18 if ( isset( $activecampaign_for_woocommerce_settings['status_mapping'] ) ) { 19 $activecampaign_for_woocommerce_saved_mappings = $activecampaign_for_woocommerce_settings['status_mapping']; 20 } 21 22 $activecampaign_for_woocommerce_all_connections = $this->get_all_connections(); 23 $activecampaign_for_woocommerce_connection_id = 'UNKNOWN'; 24 $activecampaign_for_woocommerce_ecom_order_status = new Ecom_Order_Status(); 25 $activecampaign_for_woocommerce_wc_status_list = wc_get_order_statuses(); 26 27 // We automatically map all of these 28 $activecampaign_for_woocommerce_default_wc = [ 29 'pending', 30 'on-hold', 31 'processing', 32 'completed', 33 'failed', 34 'refunded', 35 'cancelled', 36 'wc-pending', 37 'wc-on-hold', 38 'wc-processing', 39 'wc-completed', 40 'wc-failed', 41 'wc-refunded', 42 'wc-cancelled', 43 ]; 44 45 $activecampaign_for_woocommerce_ac_status_list = $activecampaign_for_woocommerce_ecom_order_status->get_all_ac_statuses(); 46 47 foreach ( $activecampaign_for_woocommerce_wc_status_list as $activecampaign_for_woocommerce_wc_status_key => $activecampaign_for_woocommerce_wc_status ) { 48 if ( in_array( $activecampaign_for_woocommerce_wc_status_key, $activecampaign_for_woocommerce_default_wc ) ) { 49 unset( $activecampaign_for_woocommerce_wc_status_list[ $activecampaign_for_woocommerce_wc_status_key ] ); 50 } 51 } 52 } catch ( Throwable $t ) { 53 $activecampaign_for_woocommerce_logger = new Activecampaign_For_Woocommerce_Logger(); 54 $activecampaign_for_woocommerce_logger->warning( 55 'AC Admin could not render status mapping. There may be an issue with order status mapping.', 56 [ 57 'message' => $t->getMessage(), 58 'trace' => $t->getTrace(), 59 ] 60 ); 18 61 } 19 $activecampaign_for_woocommerce_all_connections = $this->get_all_connections();20 $activecampaign_for_woocommerce_connection_id = 'UNKNOWN';21 22 use Activecampaign_For_Woocommerce_Cofe_Ecom_Order_Status as Ecom_Order_Status;23 $activecampaign_for_woocommerce_ecom_order_status = new Ecom_Order_Status();24 25 26 $activecampaign_for_woocommerce_wc_status_list = wc_get_order_statuses();27 28 // We automatically map all of these29 $activecampaign_for_woocommerce_default_wc = [30 'pending',31 'on-hold',32 'processing',33 'completed',34 'failed',35 'refunded',36 'cancelled',37 'wc-pending',38 'wc-on-hold',39 'wc-processing',40 'wc-completed',41 'wc-failed',42 'wc-refunded',43 'wc-cancelled',44 ];45 46 $activecampaign_for_woocommerce_ac_status_list = $activecampaign_for_woocommerce_ecom_order_status->get_all_ac_statuses();47 48 foreach ( $activecampaign_for_woocommerce_wc_status_list as $activecampaign_for_woocommerce_wc_status_key => $activecampaign_for_woocommerce_wc_status ) {49 if ( in_array( $activecampaign_for_woocommerce_wc_status_key, $activecampaign_for_woocommerce_default_wc ) ) {50 unset( $activecampaign_for_woocommerce_wc_status_list[ $activecampaign_for_woocommerce_wc_status_key ] );51 }52 }53 54 62 ?> 55 63 <section> … … 60 68 <thead> 61 69 <tr> 62 <th>WooCommerce </th>63 <th>ActiveCampaign </th>70 <th>WooCommerce order status will map to ></th> 71 <th>ActiveCampaign status</th> 64 72 <th>Actions</th> 65 73 </tr> … … 67 75 <tr> 68 76 <td> 77 <?php if ( isset( $activecampaign_for_woocommerce_wc_status_list ) && is_array( $activecampaign_for_woocommerce_wc_status_list ) ) : ?> 69 78 <select id="wc_status_key"> 70 79 <?php foreach ( $activecampaign_for_woocommerce_wc_status_list as $activecampaign_for_woocommerce_status_key => $activecampaign_for_woocommerce_status_name ) : ?> 71 <?php echo '<option value="' . esc_html( $activecampaign_for_woocommerce_status_key ) . '">' . esc_html( $activecampaign_for_woocommerce_status_name ) . ' </option>'; ?>80 <?php echo '<option value="' . esc_html( $activecampaign_for_woocommerce_status_key ) . '">' . esc_html( $activecampaign_for_woocommerce_status_name ) . ' (' . esc_html( $activecampaign_for_woocommerce_status_key ) . ')</option>'; ?> 72 81 <?php endforeach; ?> 73 82 </select> 83 <?php else : ?> 84 Unable to retrieve status list from WooCommerce. 85 <?php endif; ?> 74 86 </td> 75 87 <td> 88 <?php if ( isset( $activecampaign_for_woocommerce_ac_status_list ) && is_array( $activecampaign_for_woocommerce_ac_status_list ) ) : ?> 76 89 <select id="ac_status_key" class="activecampaign-for-woocommerce"> 77 90 <?php foreach ( array_unique( $activecampaign_for_woocommerce_ac_status_list ) as $activecampaign_for_woocommerce_ac_status_key => $activecampaign_for_woocommerce_ac_status_match ) : ?> … … 79 92 <?php endforeach; ?> 80 93 </select> 94 <?php else : ?> 95 Unable to retrieve stored AC status list from settings. 96 <?php endif; ?> 81 97 </td> 82 98 <td> … … 93 109 <?php endforeach; ?> 94 110 <?php else : ?> 95 <tr><td>No mappings set</td></tr> 111 <tr> 112 <td> 113 No mappings set 114 </td> 115 </tr> 96 116 <?php endif; ?> 97 117 </table> -
activecampaign-for-woocommerce/trunk/admin/scripts/activecampaign-for-woocommerce-historical-sync.js
r2874469 r3032832 64 64 var run_status = false; 65 65 66 console.log(response);67 66 if(response.data.status !== false) { 68 67 $('#activecampaign-sync-run-section').show(); … … 80 79 $('#activecampaign-historical-sync-contact-status span').html(run_status.run_sync.contacts); 81 80 $('#activecampaign-historical-sync-contacts-count').html(run_status.contact_total); 81 $('#activecampaign-historical-sync-contacts-queue').html(run_status.contact_queue + ' (apx.)'); 82 82 $('#activecampaign-run-historical-sync-contact-record-num').html(run_status.contact_count); 83 83 $('#activecampaign-run-historical-sync-contact-failed-num').html(run_status.contact_failed_count); -
activecampaign-for-woocommerce/trunk/admin/views/activecampaign-for-woocommerce-historical-sync.php
r3002947 r3032832 10 10 */ 11 11 12 $activecampaign_for_woocommerce_options = $this->get_options();13 $activecampaign_for_woocommerce_page_url = esc_url( admin_url( 'admin.php?page=' . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_PLUGIN_NAME_SNAKE . '_historical_sync&activesync=1' ) );14 12 $activecampaign_for_woocommerce_options = $this->get_options(); 13 $activecampaign_for_woocommerce_page_url = esc_url( admin_url( 'admin.php?page=' . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_PLUGIN_NAME_SNAKE . '_historical_sync&activesync=1' ) ); 14 $activecampaign_for_woocommerce_status_data = $this->get_next_historical_sync(); 15 15 ?> 16 16 <style> … … 220 220 <td><span id="activecampaign-historical-sync-contacts-count"></span></td> 221 221 <td>N/A</td> 222 <td> N/A</td>222 <td><span id="activecampaign-historical-sync-contacts-queue">-</span></td> 223 223 <td><span id="activecampaign-run-historical-sync-contact-record-num"></span></td> 224 224 <td>N/A</td> … … 236 236 </table> 237 237 <br/> 238 <td><?php esc_html_e( 'Next scheduled historical sync cron', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?></td> 239 <td> 240 <?php if ( ! $activecampaign_for_woocommerce_status_data['historical_order_schedule']['error'] ) : ?> 241 <?php echo esc_html( $activecampaign_for_woocommerce_status_data['historical_order_schedule']['timestamp'] ); ?> 242 <?php else : ?> 243 <mark class="error"><?php esc_html_e( 'Warning! Historical sync cron may not be scheduled.', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?></mark> 244 <?php endif; ?> 245 </td> 238 246 <?php if ( $activecampaign_for_woocommerce_options['ac_debug'] ) : ?> 239 247 <hr/> -
activecampaign-for-woocommerce/trunk/admin/views/activecampaign-for-woocommerce-status-display.php
r2994180 r3032832 6 6 * @package Activecampaign_For_Woocommerce 7 7 */ 8 9 use Automattic\WooCommerce\Blocks\Package as Block_Package;10 use Activecampaign_For_Woocommerce_Logger as Logger;11 8 12 9 global $wpdb; … … 293 290 </tr> 294 291 <tr> 292 <td><?php esc_html_e( 'Historical sync Cron scheduled', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?></td> 293 <td> 294 <?php if ( ! $activecampaign_for_woocommerce_status_data['historical_order_schedule']['error'] ) : ?> 295 <?php $this->output_yes_mark( 'Next scheduled: ' . esc_html( $activecampaign_for_woocommerce_status_data['historical_order_schedule']['timestamp'] ) ); ?> 296 <?php else : ?> 297 <mark class="error"><?php esc_html_e( 'Warning! Historical sync cron may not be scheduled.', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?></mark> 298 <?php endif; ?> 299 </td> 300 </tr> 301 <tr> 295 302 <td>AC Database Verison</td> 296 303 <td> … … 313 320 <?php $this->output_yes_mark( 'No issues found' ); ?> 314 321 <?php endif; ?> 322 </td> 323 </tr> 324 </tbody> 325 </table> 326 <table class="wc_status_table widefat status_activecampaign" cellspacing="0"> 327 <thead> 328 <tr> 329 <th colspan="3" data-export-label="Theme"> 330 <h2><?php esc_html_e( 'Advanced Status', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?></h2> 331 </th> 332 </tr> 333 </thead> 334 <tbody> 335 <tr> 336 <td style="min-width:150px;"> 337 System Post Types: 338 </td> 339 <td> 340 <?php echo esc_html( implode( ', ', get_post_types() ) ); ?> 341 </td> 342 </tr> 343 <tr> 344 <td> 345 Hook Checks<br/> 346 <i>(Last known run time in past 7 days)</i> 347 </td> 348 <td> 349 Cart updated: <?php echo esc_html( get_transient( 'acforwc_cart_updated_hook' ) ); ?><br/> 350 Cart to Order transition: <?php echo esc_html( get_transient( 'acforwc_cart_to_order_transition_hook' ) ); ?><br/> 351 Order created: <?php echo esc_html( get_transient( 'acforwc_order_created_hook' ) ); ?><br/> 352 Order updated: <?php echo esc_html( get_transient( 'acforwc_order_updated_hook' ) ); ?><br/> 353 Order deleted: <?php echo esc_html( get_transient( 'acforwc_order_deleted_hook' ) ); ?><br/> 354 Abandoned cart task: <?php echo esc_html( get_transient( 'acforwc_abandoned_task_hook' ) ); ?><br/> 315 355 </td> 316 356 </tr> … … 340 380 <mark class="error">Could not confirm the last order sync</mark> 341 381 <?php endif; ?> 382 </td> 383 </tr> 384 <tr> 385 <td> 386 <?php esc_html_e( 'Last abandoned sync attempt:', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?> 387 </td> 388 <td> 342 389 <?php if ( isset( $activecampaign_for_woocommerce_status_data['abandoned_interval_minutes'] ) && $activecampaign_for_woocommerce_status_data['abandoned_interval_minutes'] >= 0 ) : ?> 343 <?php e sc_html_e( 'Last abandoned cart synced to AC:', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?> <?php echo esc_html( $activecampaign_for_woocommerce_status_data['abandoned_interval_minutes'] ); ?> <?php esc_html_e( 'minutes ago', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?>390 <?php echo esc_html( $activecampaign_for_woocommerce_status_data['abandoned_interval_minutes'] ); ?> <?php esc_html_e( 'minutes ago', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?> 344 391 <br/> 345 392 <?php endif; ?> … … 360 407 echo 'Recently Synced Orders: '; 361 408 break; 409 case 2: 410 echo 'Orders On Hold: '; 411 break; 362 412 case 3: 363 echo ' Waiting for Historical Sync: ';413 echo 'Pending for Historical Sync: '; 364 414 break; 365 415 case 4: 366 echo ' Preparedfor Historical Sync: ';416 echo 'Ready for Historical Sync: '; 367 417 break; 368 418 case 5: -
activecampaign-for-woocommerce/trunk/includes/abandoned_carts/class-activecampaign-for-woocommerce-cart-events.php
r2968938 r3032832 36 36 37 37 try { 38 set_transient( 'acforwc_cart_updated_hook', wp_date( DATE_ATOM ), 604800 ); 39 38 40 if ( 39 41 ( ! self::validate_object( $wc_customer, 'get_billing_email' ) || empty( $wc_customer->get_billing_email() ) ) && … … 99 101 * @var WC_Order $order 100 102 */ 101 try { 103 $logger = new Logger(); 104 105 try { 106 set_transient( 'acforwc_cart_to_order_transition_hook', wp_date( DATE_ATOM ), 604800 ); 107 102 108 if ( isset( $args[0] ) ) { 103 109 $order = $args[0]; 104 110 105 if ( empty( $order->get_billing_email() ) ) { 111 if ( $order->get_billing_email() === null || empty( $order->get_billing_email() ) ) { 112 $logger->warning( 113 'Cart to order transition was not able to run due to a missing email.', 114 [ 115 'args' => $args, 116 'ac_code' => 'CE_118', 117 ] 118 ); 106 119 return $order; 107 120 } … … 173 186 174 187 return $order; 175 } 176 } catch ( Throwable $t ) { 177 $logger = new Logger(); 188 } else { 189 $logger->warning( 190 'Cart to order transition is missing order information and cannot transition the cart properly.', 191 [ 192 'args' => $args, 193 'ac_code' => 'CE_195', 194 ] 195 ); 196 } 197 } catch ( Throwable $t ) { 178 198 $logger->warning( 179 'There was an issue trying to add cart ID to order. ',199 'There was an issue trying to add cart ID to order. External checkout ID may be missing.', 180 200 [ 181 201 'class' => 'Activecampaign_For_Woocommerce_Add_Cart_Id_To_Order_Command', 182 202 'message' => $t->getMessage(), 183 'ac_code' => 'CE_ 180',203 'ac_code' => 'CE_202', 184 204 ] 185 205 ); … … 216 236 'class' => 'Activecampaign_For_Woocommerce_Create_And_Save_Cart_Id_Command', 217 237 'message' => $t->getMessage(), 238 'ac_code' => 'CE_238', 218 239 ] 219 240 ); -
activecampaign-for-woocommerce/trunk/includes/abandoned_carts/class-activecampaign-for-woocommerce-run-abandonment-sync-command.php
r2977226 r3032832 132 132 $this->logger = new Logger(); 133 133 } 134 135 set_transient( 'acforwc_abandoned_task_hook', wp_date( DATE_ATOM ), 604800 ); 134 136 135 137 $now = date_create( 'NOW' ); -
activecampaign-for-woocommerce/trunk/includes/api-client/class-activecampaign-for-woocommerce-api-client.php
r2988259 r3032832 220 220 // 'base_uri' => 'http://host.docker.internal:14001/graphql', 221 221 // REAL CODE: 222 'base_uri' => $this->get_api_uri_with_v3_path() . $extra_path, 223 'timeout' => 20, 224 'headers' => array( 222 'base_uri' => $this->get_api_uri_with_v3_path() . $extra_path, 223 'timeout' => 30, 224 'allow_redirects' => false, 225 'http_errors' => false, 226 'headers' => array( 225 227 'Api-Token' => $this->get_api_key(), 226 228 'X-Request-Id' => RequestIdService::get_request_id(), -
activecampaign-for-woocommerce/trunk/includes/class-activecampaign-for-woocommerce.php
r3017123 r3032832 426 426 $this->new_order_created_event, 427 427 'execute_with_order_id', 428 98428 28 429 429 ); 430 430 … … 433 433 $this->new_order_created_event, 434 434 'execute', 435 90435 20 436 436 ); 437 437 … … 440 440 $this->new_order_created_event, 441 441 'execute', 442 99442 29 443 443 ); 444 444 … … 447 447 $this->new_order_created_event, 448 448 'execute_with_order_obj', 449 96449 26 450 450 ); 451 451 // End order complete hooks … … 558 558 $this->order_events, 559 559 'execute_order_updated', 560 99,560 10, 561 561 1 562 562 ); … … 566 566 $this->order_events, 567 567 'execute_order_updated', 568 99568 10 569 569 ); 570 570 … … 574 574 $this->order_events, 575 575 'execute_order_updated', 576 99,576 10, 577 577 1 578 578 ); … … 663 663 664 664 $this->loader->add_action( 665 ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_ NEW_ORDER_SYNC_NAME,665 ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR, 666 666 $this->historical_sync, 667 667 'run_sync', … … 671 671 672 672 $this->loader->add_action( 673 ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_ NEW_ORDER_SYNC_NAME,673 ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR, 674 674 $this->historical_sync, 675 675 'run_historical_sync_contacts', … … 803 803 $this->admin, 804 804 'add_admin_page', 805 99805 10 806 806 ); 807 807 -
activecampaign-for-woocommerce/trunk/includes/config/activecampaign-for-woocommerce-global-constants.php
r3017132 r3032832 26 26 */ 27 27 if ( ! defined( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION' ) ) { 28 define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.5. 5' );28 define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.5.6' ); 29 29 } 30 30 … … 179 179 180 180 /** 181 * The run historical sync common name. 182 * 183 * @var string The run historical sync common name. 184 * @since 1.5.0 185 */ 186 if ( ! defined( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR' ) ) { 187 define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR', 'activecampaign_for_woocommerce_run_historical_sync_recurring_event' ); 188 } 189 190 191 /** 181 192 * The historical sync scheduled status common name. 182 193 * -
activecampaign-for-woocommerce/trunk/includes/events/class-activecampaign-for-woocommerce-user-registered-event.php
r2966088 r3032832 129 129 /** 130 130 * Sets up and sends the customer for AC 131 *132 * @throws GuzzleException Is not fatal.133 131 */ 134 132 private function setup_woocommerce_customer() { … … 158 156 try { 159 157 // Try to create the new customer in AC 160 $this->logger->debug( 'Registered event: Creating customer in ActiveCampaign. ', [ 'new_customer_data' => \GuzzleHttp\json_encode( $new_customer->serialize_to_array() ) ] );158 $this->logger->debug( 'Registered event: Creating customer in ActiveCampaign. ', [ 'new_customer_data' => wp_json_encode( $new_customer->serialize_to_array() ) ] ); 161 159 162 160 $this->customer_ac = $this->customer_repository->create( $new_customer ); -
activecampaign-for-woocommerce/trunk/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php
r3017123 r3032832 31 31 } 32 32 33 set_transient( 'acforwc_order_created_hook', wp_date( DATE_ATOM ), 604800 ); 34 33 35 $logger->debug( 34 36 'Order created triggered', … … 37 39 ] 38 40 ); 39 if ( isset( $args ) ) { 41 42 if ( isset( $args ) && null !== $args && ! empty( $args ) ) { 40 43 wp_schedule_single_event( 41 44 time() + 30, … … 56 59 ] 57 60 ); 61 58 62 $post_type = get_post_type( $order_id ); 59 63 … … 62 66 return; 63 67 } 68 69 set_transient( 'acforwc_order_updated_hook', wp_date( DATE_ATOM ), 604800 ); 64 70 65 71 $wc_order = $this->get_wc_order( $order_id ); … … 101 107 return; 102 108 } 109 110 set_transient( 'acforwc_order_deleted_hook', wp_date( DATE_ATOM ), 604800 ); 103 111 104 112 $logger->debug( -
activecampaign-for-woocommerce/trunk/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-contacts.php
r2977226 r3032832 62 62 63 63 $this->status['contact_total'] = $wpdb->get_var( 'SELECT count(email) FROM ' . $wpdb->prefix . 'wc_customer_lookup WHERE email != "";' ); 64 $this->status['contact_queue'] = $this->status['contact_total'] - $this->status['contact_count'] - $this->status['contact_failed_count']; 64 65 $this->update_sync_status(); 65 66 … … 72 73 $this->logger->debug( 'Contact historical sync started.', [ 'start transient' => $start ] ); 73 74 74 if ( ! empty( $start )) {75 if ( null !== $start && false !== $start ) { 75 76 $last_record = $start; 76 77 $synced_contacts = $this->status['contact_count']; … … 78 79 79 80 // phpcs:disable 80 wp_suspend_cache_addition(true); // Do not add to cache for session 81 81 82 while ( $wc_customers = $wpdb->get_results( 82 83 $wpdb->prepare( … … 122 123 } catch ( Throwable $t ) { 123 124 $this->logger->warning( 124 'A contact failed validation . This record will be skipped.',125 'A contact failed validation for historical sync contacts. This record will be skipped.', 125 126 [ 126 127 'message' => $t->getMessage(), 128 'ac_code' => 'hsc_127', 127 129 ] 128 130 ); … … 155 157 $this->status['contact_count'] = $synced_contacts; 156 158 $c += $limit; 159 $this->status['contact_queue'] = $this->status['contact_total'] - $this->status['contact_count'] - $this->status['contact_failed_count']; 157 160 $this->update_sync_status(); 158 161 … … 169 172 170 173 set_transient( 'activecampaign_for_woocommerce_hs_contacts', $last_record, 3600 ); 171 if ( $c > 2000 ) { 174 175 if ( $c >= 2000 ) { 172 176 break; 173 177 } … … 176 180 if ( 0 === $c ) { 177 181 delete_transient( 'activecampaign_for_woocommerce_hs_contacts' ); 178 } 179 180 wp_suspend_cache_addition( false );182 } elseif ( isset( $last_record ) && ! empty( $last_record ) ) { 183 return; 184 } 181 185 182 186 $this->logger->debug( -
activecampaign-for-woocommerce/trunk/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-handler.php
r2977226 r3032832 171 171 */ 172 172 public function run_historical_sync_contacts( ...$args ) { 173 if ( get_transient( 'activecampaign_for_woocommerce_hs_contacts' ) !== false) {173 if ( false !== get_transient( 'activecampaign_for_woocommerce_hs_contacts' ) && null !== get_transient( 'activecampaign_for_woocommerce_hs_contacts' ) ) { 174 174 $this->update_sync_running_status( 'contacts', 'syncing' ); 175 175 -
activecampaign-for-woocommerce/trunk/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-prep.php
r2966088 r3032832 50 50 $this->logger = new Logger(); 51 51 $this->logger->debug( 'Preparing historical sync records.' ); 52 $batch_limit = 100;52 $batch_limit = 30; 53 53 $this->clean_bad_data_from_table(); 54 54 … … 253 253 * @return stdClass|WC_Order[] 254 254 */ 255 private function get_order_ids_by_page( $offset, $batch_limit = 100, $exclude = null, $status = null, $get_pagination = false ) {255 private function get_order_ids_by_page( $offset, $batch_limit = 30, $exclude = null, $status = null, $get_pagination = false ) { 256 256 // limits and paged can be added 257 257 if ( ! isset( $status ) ) { -
activecampaign-for-woocommerce/trunk/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-runner-cofe.php
r3017123 r3032832 122 122 123 123 // NOTE: This is temporarily ignored until COFE looks stable 124 if ( isset( $stored_settings['sync_batch_limit'] ) ) { 124 $this->process_settings['batch_limit'] = 30; 125 126 if ( isset( $stored_settings['sync_batch_limit'] ) && $this->process_settings['batch_limit'] < 30 && $this->process_settings['batch_limit'] > 0 ) { 125 127 $this->process_settings['batch_limit'] = $stored_settings['sync_batch_limit']; 126 } else {127 $this->process_settings['batch_limit'] = 30;128 }129 130 if ( $this->process_settings['batch_limit'] > 50 ) {131 $this->process_settings['batch_limit'] = 50;132 128 } 133 129 … … 166 162 167 163 $this->update_sync_status(); 168 $this->logger->debug( 'Historical sync finished sync group.' ); 164 $this->logger->debug( 165 'Historical sync finished sync group.', 166 [ 167 'run_count' => $run_count, 168 'last_update' => $this->status['last_update'], 169 'batch_runs' => $this->process_settings['batch_runs'], 170 'batch_limit' => $this->process_settings['batch_limit'], 171 'start_time' => $this->status['start_time'], 172 ] 173 ); 169 174 } 170 175 … … 255 260 'message' => $t->getMessage(), 256 261 'trace' => $t->getTrace(), 262 'ac_code' => 'HSRC_262', 257 263 ] 258 264 ); … … 261 267 try { 262 268 // If bulk sync does not return a failure 263 if ( true === $sync_response && count( $sync_order_ids ) > 0 ) {269 if ( isset( $sync_response ) && true === $sync_response && count( $sync_order_ids ) > 0 ) { 264 270 self::wpdb_update_in( 265 271 ( $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME ), // table … … 276 282 'message' => $t->getMessage(), 277 283 'trace' => $t->getTrace(), 284 'ac_code' => 'HSRC_284', 278 285 ] 279 286 ); … … 299 306 'message' => $t->getMessage(), 300 307 'trace' => $t->getTrace(), 308 'ac_code' => 'HSRC_308', 301 309 ] 302 310 ); … … 314 322 [ 315 323 'message' => $t->getMessage(), 316 'ac_code' => 'HSRC_3 05',324 'ac_code' => 'HSRC_324', 317 325 'trace' => $t->getTrace(), 318 326 ] … … 344 352 [ 345 353 'order_id' => isset( $order_id ) ? $order_id : null, 346 'ac_code' => 'HSRC_3 31',354 'ac_code' => 'HSRC_354', 347 355 ] 348 356 ); … … 359 367 'order_id' => isset( $order_id ) ? $order_id : null, 360 368 'wc_order' => isset( $wc_order ) ? $wc_order : null, 361 'ac_code' => 'HSRC_3 09',369 'ac_code' => 'HSRC_369', 362 370 ] 363 371 ); … … 392 400 'message' => $t->getMessage(), 393 401 'order_id' => $order_id, 394 'ac_code' => 'HSRC_ 388',402 'ac_code' => 'HSRC_402', 395 403 'trace' => $t->getTrace(), 396 404 ] … … 440 448 [ 441 449 'suggested_action' => 'If this problem repeats please contact support.', 442 'ac_code' => 'HSRC_ 380',450 'ac_code' => 'HSRC_450', 443 451 'response' => $response, 444 452 ] … … 457 465 [ 458 466 'suggested_action' => 'Please check with your host for issues with your server sending data to ActiveCampaign.', 459 'ac_code' => 'HSRC_4 01',467 'ac_code' => 'HSRC_466', 460 468 'response' => $response, 461 469 ] … … 468 476 469 477 if ( is_null( $response ) ) { 470 // The call failed, mark the orders as failed 471 $this->status['failed_order_id_array'] = array_merge( $this->status['failed_order_id_array'], $order_ids ); 478 if ( isset( $this->status['failed_order_id_array'] ) ) { 479 // The call failed, mark the orders as failed 480 $this->status['failed_order_id_array'] = array_merge( $this->status['failed_order_id_array'], $order_ids ); 481 } else { 482 $this->status['failed_order_id_array'] = $order_ids; 483 } 484 472 485 $this->status['failed_order_id_array'] = array_unique( $this->status['failed_order_id_array'] ); 486 473 487 return false; 474 488 }
Note: See TracChangeset
for help on using the changeset viewer.