Plugin Directory

Changeset 3032832


Ignore:
Timestamp:
02/07/2024 05:22:46 PM (2 years ago)
Author:
acteamintegrations
Message:

Version 2.5.6

Location:
activecampaign-for-woocommerce/trunk
Files:
64 edited

Legend:

Unmodified
Added
Removed
  • activecampaign-for-woocommerce/trunk/README.txt

    r3017132 r3032832  
    33Tags: marketing, ecommerce, woocommerce, email, activecampaign, abandoned cart
    44Requires at least: 6.0
    5 Tested up to: 6.4.1
    6 Stable tag: 2.5.5
     5Tested up to: 6.4.3
     6Stable tag: 2.5.6
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    4848
    4949= WooCommerce Compatibility =
    50 * Tested up to version: 8.3.0
    51 * Minimal version requirement: 7.0.0
     50* Tested up to version: 8.5.1
     51* Minimal version requirement: 7.4.0
    5252* HPOS Compatible
    5353
     
    8484== Changelog ==
    8585
     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
    8692== 2.5.5 2024-01-03 ==
    8793* Fixing missing files
  • activecampaign-for-woocommerce/trunk/ac_vendor/autoload.php

    r3017123 r3032832  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitdb051d39acf323762cd4c9b440d99ff7::getLoader();
     7return ComposerAutoloaderInit2e569f6b636f68ab6baea966bd12ceff::getLoader();
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/InstalledVersions.php

    r2960798 r3032832  
    77class InstalledVersions
    88{
    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')));
    1010    private static $canGetVendors;
    1111    private static $installedByVendor = array();
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/autoload_real.php

    r3017123 r3032832  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitdb051d39acf323762cd4c9b440d99ff7
     5class ComposerAutoloaderInit2e569f6b636f68ab6baea966bd12ceff
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitdb051d39acf323762cd4c9b440d99ff7', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit2e569f6b636f68ab6baea966bd12ceff', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitdb051d39acf323762cd4c9b440d99ff7', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit2e569f6b636f68ab6baea966bd12ceff', 'loadClassLoader'));
    3030
    3131        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3333            require __DIR__ . '/autoload_static.php';
    3434
    35             call_user_func(\Composer\Autoload\ComposerStaticInitdb051d39acf323762cd4c9b440d99ff7::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5454
    5555        if ($useStaticLoader) {
    56             $includeFiles = Composer\Autoload\ComposerStaticInitdb051d39acf323762cd4c9b440d99ff7::$files;
     56            $includeFiles = Composer\Autoload\ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::$files;
    5757        } else {
    5858            $includeFiles = require __DIR__ . '/autoload_files.php';
    5959        }
    6060        foreach ($includeFiles as $fileIdentifier => $file) {
    61             composerRequiredb051d39acf323762cd4c9b440d99ff7($fileIdentifier, $file);
     61            composerRequire2e569f6b636f68ab6baea966bd12ceff($fileIdentifier, $file);
    6262        }
    6363
     
    6666}
    6767
    68 function composerRequiredb051d39acf323762cd4c9b440d99ff7($fileIdentifier, $file)
     68function composerRequire2e569f6b636f68ab6baea966bd12ceff($fileIdentifier, $file)
    6969{
    7070    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/autoload_static.php

    r3017123 r3032832  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitdb051d39acf323762cd4c9b440d99ff7
     7class ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff
    88{
    99    public static $files = array (
     
    476476    {
    477477        return \Closure::bind(function () use ($loader) {
    478             $loader->prefixLengthsPsr4 = ComposerStaticInitdb051d39acf323762cd4c9b440d99ff7::$prefixLengthsPsr4;
    479             $loader->prefixDirsPsr4 = ComposerStaticInitdb051d39acf323762cd4c9b440d99ff7::$prefixDirsPsr4;
    480             $loader->classMap = ComposerStaticInitdb051d39acf323762cd4c9b440d99ff7::$classMap;
     478            $loader->prefixLengthsPsr4 = ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::$prefixLengthsPsr4;
     479            $loader->prefixDirsPsr4 = ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::$prefixDirsPsr4;
     480            $loader->classMap = ComposerStaticInit2e569f6b636f68ab6baea966bd12ceff::$classMap;
    481481
    482482        }, null, ClassLoader::class);
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/installed.json

    r2960798 r3032832  
    114114        {
    115115            "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",
    118118            "source": {
    119119                "type": "git",
    120120                "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",
    127127                "shasum": ""
    128128            },
    129129            "require": {
    130130                "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",
    133133                "php": "^7.2.5 || ^8.0",
    134134                "psr\/http-client": "^1.0",
     
    139139            },
    140140            "require-dev": {
    141                 "bamarni\/composer-bin-plugin": "^1.8.1",
     141                "bamarni\/composer-bin-plugin": "^1.8.2",
    142142                "ext-curl": "*",
    143143                "php-http\/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
    144144                "php-http\/message-factory": "^1.1",
    145                 "phpunit\/phpunit": "^8.5.29 || ^9.5.23",
     145                "phpunit\/phpunit": "^8.5.36 || ^9.6.15",
    146146                "psr\/log": "^1.1 || ^2.0 || ^3.0"
    147147            },
     
    151151                "psr\/log": "Required for using the Log middleware"
    152152            },
    153             "time": "2023-05-21T14:04:53+00:00",
     153            "time": "2023-12-03T20:35:24+00:00",
    154154            "type": "library",
    155155            "extra": {
     
    239239        {
    240240            "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",
    243243            "source": {
    244244                "type": "git",
    245245                "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",
    252252                "shasum": ""
    253253            },
     
    256256            },
    257257            "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",
    262262            "type": "library",
    263263            "extra": {
     
    321321        {
    322322            "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",
    325325            "source": {
    326326                "type": "git",
    327327                "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",
    334334                "shasum": ""
    335335            },
     
    345345            },
    346346            "require-dev": {
    347                 "bamarni\/composer-bin-plugin": "^1.8.1",
     347                "bamarni\/composer-bin-plugin": "^1.8.2",
    348348                "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"
    350350            },
    351351            "suggest": {
    352352                "laminas\/laminas-httphandlerrunner": "Emit PSR-7 responses"
    353353            },
    354             "time": "2023-08-03T15:06:02+00:00",
     354            "time": "2023-12-03T20:05:35+00:00",
    355355            "type": "library",
    356356            "extra": {
     
    436436        {
    437437            "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",
    440440            "source": {
    441441                "type": "git",
    442442                "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",
    449449                "shasum": ""
    450450            },
     
    458458                "symfony\/var-dumper": "^5.4.11"
    459459            },
    460             "time": "2023-07-14T13:56:28+00:00",
     460            "time": "2023-11-08T14:08:06+00:00",
    461461            "type": "library",
    462462            "extra": {
     
    495495        {
    496496            "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",
    499499            "source": {
    500500                "type": "git",
    501501                "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",
    508508                "shasum": ""
    509509            },
     
    517517                "phpunit\/phpunit": "^9.0"
    518518            },
    519             "time": "2021-12-13T09:22:56+00:00",
     519            "time": "2023-09-08T09:24:21+00:00",
    520520            "type": "library",
    521521            "installation-source": "dist",
     
    717717        {
    718718            "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",
    721721            "source": {
    722722                "type": "git",
    723723                "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",
    730730                "shasum": ""
    731731            },
     
    734734                "psr\/http-message": "^1.0 || ^2.0"
    735735            },
    736             "time": "2023-04-10T20:12:12+00:00",
     736            "time": "2023-09-23T14:17:50+00:00",
    737737            "type": "library",
    738738            "extra": {
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/installed.php

    r2960798 r3032832  
    33namespace AcVendor;
    44
    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')));
     5return 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  
    179179     * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0.
    180180     */
    181     public function getConfig(?string $option = null)
     181    public function getConfig(string $option = null)
    182182    {
    183183        return $option === null ? $this->config : $this->config[$option] ?? null;
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/ClientInterface.php

    r2950993 r3032832  
    7575     * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
    7676     */
    77     public function getConfig(?string $option = null);
     77    public function getConfig(string $option = null);
    7878}
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php

    r2950993 r3032832  
    8181        return null;
    8282    }
    83     /**
    84      * {@inheritDoc}
    85      */
    8683    public function toArray() : array
    8784    {
     
    9087        }, $this->getIterator()->getArrayCopy());
    9188    }
    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
    9690    {
    9791        if (!$domain) {
     
    112106        }
    113107    }
    114     /**
    115      * {@inheritDoc}
    116      */
    117108    public function clearSessionCookies() : void
    118109    {
     
    121112        });
    122113    }
    123     /**
    124      * {@inheritDoc}
    125      */
    126114    public function setCookie(SetCookie $cookie) : bool
    127115    {
     
    205193     * Computes cookie path following RFC 6265 section 5.1.4
    206194     *
    207      * @see https://tools.ietf.org/html/rfc6265#section-5.1.4
     195     * @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.4
    208196     */
    209197    private function getCookiePathFromRequest(RequestInterface $request) : string
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php

    r2950993 r3032832  
    1414 *
    1515 * @see https://docs.python.org/2/library/cookielib.html Inspiration
     16 *
    1617 * @extends \IteratorAggregate<SetCookie>
    1718 */
     
    5859     * @param string|null $name   Clears cookies matching a domain, path, and name
    5960     */
    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;
    6162    /**
    6263     * Discard all sessions cookies.
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php

    r2950993 r3032832  
    355355        }
    356356        // Remove the leading '.' as per spec in RFC 6265.
    357         // https://tools.ietf.org/html/rfc6265#section-5.2.3
     357        // https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.3
    358358        $cookieDomain = \ltrim(\strtolower($cookieDomain), '.');
    359359        $domain = \strtolower($domain);
     
    363363        }
    364364        // Matching the subdomain according to RFC 6265.
    365         // https://tools.ietf.org/html/rfc6265#section-5.1.3
     365        // https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.3
    366366        if (\filter_var($domain, \FILTER_VALIDATE_IP)) {
    367367            return \false;
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

    r2950993 r3032832  
    176176        $method = $easy->request->getMethod();
    177177        if ($method === 'PUT' || $method === 'POST') {
    178             // See https://tools.ietf.org/html/rfc7230#section-3.3.2
     178            // See https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2
    179179            if (!$easy->request->hasHeader('Content-Length')) {
    180180                $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0';
     
    487487        };
    488488    }
     489    public function __destruct()
     490    {
     491        foreach ($this->handles as $id => $handle) {
     492            \curl_close($handle);
     493            unset($this->handles[$id]);
     494        }
     495    }
    489496}
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php

    r2950993 r3032832  
    1515 * **curl** key of the provided request options.
    1616 *
    17  * @property resource|\CurlMultiHandle $_mh Internal use only. Lazy loaded multi-handle.
    18  *
    1917 * @final
    2018 */
    21 #[\AllowDynamicProperties]
    2219class CurlMultiHandler
    2320{
     
    5047     */
    5148    private $options = [];
     49    /** @var resource|\CurlMultiHandle */
     50    private $_mh;
    5251    /**
    5352     * This handler accepts the following options:
     
    7170        }
    7271        $this->options = $options['options'] ?? [];
     72        // unsetting the property forces the first access to go through
     73        // __get().
     74        unset($this->_mh);
    7375    }
    7476    /**
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/HandlerStack.php

    r2950993 r3032832  
    4141     *                                                                            system will be utilized.
    4242     */
    43     public static function create(?callable $handler = null) : self
     43    public static function create(callable $handler = null) : self
    4444    {
    4545        $stack = new self($handler ?: Utils::chooseHandler());
     
    116116     * @param string                       $name       Name to register for this middleware.
    117117     */
    118     public function unshift(callable $middleware, ?string $name = null) : void
     118    public function unshift(callable $middleware, string $name = null) : void
    119119    {
    120120        \array_unshift($this->stack, [$middleware, $name]);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/MessageFormatter.php

    r2950993 r3032832  
    6565     * @param \Throwable|null        $error    Exception that was received
    6666     */
    67     public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null) : string
     67    public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null) : string
    6868    {
    6969        $cache = [];
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php

    r2950993 r3032832  
    1414     * @param \Throwable|null        $error    Exception that was received
    1515     */
    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;
    1717}
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/RequestOptions.php

    r2950993 r3032832  
    66 * This class contains a list of built-in Guzzle request options.
    77 *
    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
    119 */
    1210final class RequestOptions
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/TransferStats.php

    r2950993 r3032832  
    3939     * @param array                  $handlerStats     Handler specific stats.
    4040     */
    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 = [])
    4242    {
    4343        $this->request = $request;
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Utils.php

    r2950993 r3032832  
    156156CA bundle by default. In order to verify peer certificates, you will need to
    157157supply 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.
     158option: https://docs.guzzlephp.org/en/latest/request-options.html#verify. If
     159you do not need a specific certificate bundle, then Mozilla provides a commonly
     160used CA bundle which can be downloaded here (provided by the maintainer of
     161cURL): https://curl.haxx.se/ca/cacert.pem. Once you have a CA bundle available
     162on disk, you can set the 'openssl.cafile' PHP ini setting to point to the path
     163to the file, allowing you to omit the 'verify' request option. See
     164https://curl.haxx.se/docs/sslcerts.html for more information.
    166165EOT
    167166);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/Each.php

    r2950993 r3032832  
    1919     * side effects and choose to resolve or reject the aggregate if needed.
    2020     *
    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.
    2422     */
    2523    public static function of($iterable, callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface
     
    3735     * @param mixed        $iterable
    3836     * @param int|callable $concurrency
    39      * @param callable     $onFulfilled
    40      * @param callable     $onRejected
    4137     */
    4238    public static function ofLimit($iterable, $concurrency, callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface
     
    5147     * @param mixed        $iterable
    5248     * @param int|callable $concurrency
    53      * @param callable     $onFulfilled
    5449     */
    5550    public static function ofLimitAll($iterable, $concurrency, callable $onFulfilled = null) : PromiseInterface
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/EachPromise.php

    r2950993 r3032832  
    114114        }
    115115        // 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;
    117117        $concurrency = \max($concurrency - \count($this->pending), 0);
    118118        // Concurrency may be set to 0 to disallow new promises.
     
    141141        $this->pending[$idx] = $promise->then(function ($value) use($idx, $key) : void {
    142142            if ($this->onFulfilled) {
    143                 \call_user_func($this->onFulfilled, $value, $key, $this->aggregate);
     143                ($this->onFulfilled)($value, $key, $this->aggregate);
    144144            }
    145145            $this->step($idx);
    146146        }, function ($reason) use($idx, $key) : void {
    147147            if ($this->onRejected) {
    148                 \call_user_func($this->onRejected, $reason, $key, $this->aggregate);
     148                ($this->onRejected)($reason, $key, $this->aggregate);
    149149            }
    150150            $this->step($idx);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/RejectionException.php

    r2950993 r3032832  
    1717     * @param string|null $description Optional description.
    1818     */
    19     public function __construct($reason, ?string $description = null)
     19    public function __construct($reason, string $description = null)
    2020    {
    2121        $this->reason = $reason;
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/AppendStream.php

    r2950993 r3032832  
    195195    }
    196196    /**
    197      * {@inheritdoc}
    198      *
    199197     * @return mixed
    200198     */
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/BufferStream.php

    r2950993 r3032832  
    110110    }
    111111    /**
    112      * {@inheritdoc}
    113      *
    114112     * @return mixed
    115113     */
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/FnStream.php

    r2950993 r3032832  
    4343    {
    4444        if (isset($this->_fn_close)) {
    45             \call_user_func($this->_fn_close);
     45            ($this->_fn_close)();
    4646        }
    4747    }
     
    7878    {
    7979        try {
    80             return \call_user_func($this->_fn___toString);
     80            /** @var string */
     81            return ($this->_fn___toString)();
    8182        } catch (\Throwable $e) {
    8283            if (\PHP_VERSION_ID >= 70400) {
     
    8990    public function close() : void
    9091    {
    91         \call_user_func($this->_fn_close);
     92        ($this->_fn_close)();
    9293    }
    9394    public function detach()
    9495    {
    95         return \call_user_func($this->_fn_detach);
     96        return ($this->_fn_detach)();
    9697    }
    9798    public function getSize() : ?int
    9899    {
    99         return \call_user_func($this->_fn_getSize);
     100        return ($this->_fn_getSize)();
    100101    }
    101102    public function tell() : int
    102103    {
    103         return \call_user_func($this->_fn_tell);
     104        return ($this->_fn_tell)();
    104105    }
    105106    public function eof() : bool
    106107    {
    107         return \call_user_func($this->_fn_eof);
     108        return ($this->_fn_eof)();
    108109    }
    109110    public function isSeekable() : bool
    110111    {
    111         return \call_user_func($this->_fn_isSeekable);
     112        return ($this->_fn_isSeekable)();
    112113    }
    113114    public function rewind() : void
    114115    {
    115         \call_user_func($this->_fn_rewind);
     116        ($this->_fn_rewind)();
    116117    }
    117118    public function seek($offset, $whence = \SEEK_SET) : void
    118119    {
    119         \call_user_func($this->_fn_seek, $offset, $whence);
     120        ($this->_fn_seek)($offset, $whence);
    120121    }
    121122    public function isWritable() : bool
    122123    {
    123         return \call_user_func($this->_fn_isWritable);
     124        return ($this->_fn_isWritable)();
    124125    }
    125126    public function write($string) : int
    126127    {
    127         return \call_user_func($this->_fn_write, $string);
     128        return ($this->_fn_write)($string);
    128129    }
    129130    public function isReadable() : bool
    130131    {
    131         return \call_user_func($this->_fn_isReadable);
     132        return ($this->_fn_isReadable)();
    132133    }
    133134    public function read($length) : string
    134135    {
    135         return \call_user_func($this->_fn_read, $length);
     136        return ($this->_fn_read)($length);
    136137    }
    137138    public function getContents() : string
    138139    {
    139         return \call_user_func($this->_fn_getContents);
     140        return ($this->_fn_getContents)();
    140141    }
    141142    /**
    142      * {@inheritdoc}
    143      *
    144143     * @return mixed
    145144     */
    146145    public function getMetadata($key = null)
    147146    {
    148         return \call_user_func($this->_fn_getMetadata, $key);
     147        return ($this->_fn_getMetadata)($key);
    149148    }
    150149}
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Header.php

    r2950993 r3032832  
    2121            foreach (self::splitList($value) as $val) {
    2222                $part = [];
    23                 foreach (\preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
     23                foreach (\preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) ?: [] as $kvp) {
    2424                    if (\preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
    2525                        $m = $matches[0];
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/InflateStream.php

    r2950993 r3032832  
    1212 * to a Guzzle stream resource to be used as a Guzzle stream.
    1313 *
    14  * @see http://tools.ietf.org/html/rfc1950
    15  * @see http://tools.ietf.org/html/rfc1952
    16  * @see http://php.net/manual/en/filters.compression.php
     14 * @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
    1717 */
    1818final class InflateStream implements StreamInterface
     
    2525        $resource = StreamWrapper::getResource($stream);
    2626        // 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 inflateInit2
     27        // See https://www.zlib.net/manual.html#Advanced definition of inflateInit2
    2828        // "Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection"
    2929        // Default window size is 15.
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Message.php

    r2950993 r3032832  
    2727        }
    2828        foreach ($message->getHeaders() as $name => $values) {
    29             if (\strtolower($name) === 'set-cookie') {
     29            if (\is_string($name) && \strtolower($name) === 'set-cookie') {
    3030                foreach ($values as $value) {
    3131                    $msg .= "\r\n{$name}: " . $value;
     
    120120        // If these aren't the same, then one line didn't match and there's an invalid header.
    121121        if ($count !== \substr_count($rawHeaders, "\n")) {
    122             // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
     122            // Folding is deprecated, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4
    123123            if (\preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
    124124                throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
     
    178178    {
    179179        $data = self::parseMessage($message);
    180         // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
    181         // between status-code and reason-phrase is required. But browsers accept
    182         // 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.
    183183        if (!\preg_match('/^HTTP\\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
    184184            throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/MessageTrait.php

    r2950993 r3032832  
    1111trait MessageTrait
    1212{
    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 */
    1414    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 */
    1616    private $headerNames = [];
    1717    /** @var string */
     
    109109    }
    110110    /**
    111      * @param array<string|int, string|string[]> $headers
     111     * @param (string|string[])[] $headers
    112112     */
    113113    private function setHeaders(array $headers) : void
     
    156156     * @return string[] Trimmed header values
    157157     *
    158      * @see https://tools.ietf.org/html/rfc7230#section-3.2.4
     158     * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4
    159159     */
    160160    private function trimAndValidateHeaderValues(array $values) : array
     
    170170    }
    171171    /**
    172      * @see https://tools.ietf.org/html/rfc7230#section-3.2
     172     * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
    173173     *
    174174     * @param mixed $header
     
    184184    }
    185185    /**
    186      * @see https://tools.ietf.org/html/rfc7230#section-3.2
     186     * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
    187187     *
    188188     * field-value    = *( field-content / obs-fold )
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/MultipartStream.php

    r2950993 r3032832  
    4444     * Get the headers needed before transferring the content of a POST file
    4545     *
    46      * @param array<string, string> $headers
     46     * @param string[] $headers
    4747     */
    4848    private function getHeaders(array $headers) : string
     
    8989        $stream->addStream(Utils::streamFor("\r\n"));
    9090    }
     91    /**
     92     * @param string[] $headers
     93     *
     94     * @return array{0: StreamInterface, 1: string[]}
     95     */
    9196    private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers) : array
    9297    {
    9398        // 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');
    95100        if (!$disposition) {
    96101            $headers['Content-Disposition'] = $filename === '0' || $filename ? \sprintf('form-data; name="%s"; filename="%s"', $name, \basename($filename)) : "form-data; name=\"{$name}\"";
    97102        }
    98103        // 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');
    100105        if (!$length) {
    101106            if ($length = $stream->getSize()) {
     
    104109        }
    105110        // Set a default Content-Type if one was not supplied
    106         $type = $this->getHeader($headers, 'content-type');
     111        $type = self::getHeader($headers, 'content-type');
    107112        if (!$type && ($filename === '0' || $filename)) {
    108113            $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream';
     
    110115        return [$stream, $headers];
    111116    }
    112     private function getHeader(array $headers, string $key)
     117    /**
     118     * @param string[] $headers
     119     */
     120    private static function getHeader(array $headers, string $key) : ?string
    113121    {
    114122        $lowercaseHeader = \strtolower($key);
    115123        foreach ($headers as $k => $v) {
    116             if (\strtolower($k) === $lowercaseHeader) {
     124            if (\strtolower((string) $k) === $lowercaseHeader) {
    117125                return $v;
    118126            }
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/PumpStream.php

    r2950993 r3032832  
    1717final class PumpStream implements StreamInterface
    1818{
    19     /** @var callable|null */
     19    /** @var callable(int): (string|false|null)|null */
    2020    private $source;
    2121    /** @var int|null */
     
    2828    private $buffer;
    2929    /**
    30      * @param callable(int): (string|null|false)  $source  Source of the stream data. The callable MAY
     30     * @param callable(int): (string|false|null)  $source  Source of the stream data. The callable MAY
    3131     *                                                     accept an integer argument used to control the
    3232     *                                                     amount of data to return. The callable MUST
     
    124124    }
    125125    /**
    126      * {@inheritdoc}
    127      *
    128126     * @return mixed
    129127     */
     
    137135    private function pump(int $length) : void
    138136    {
    139         if ($this->source) {
     137        if ($this->source !== null) {
    140138            do {
    141                 $data = \call_user_func($this->source, $length);
     139                $data = ($this->source)($length);
    142140                if ($data === \false || $data === null) {
    143141                    $this->source = null;
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Request.php

    r2950993 r3032832  
    2323     * @param string                               $method  HTTP method
    2424     * @param string|UriInterface                  $uri     URI
    25      * @param array<string, string|string[]>       $headers Request headers
     25     * @param (string|string[])[]                  $headers Request headers
    2626     * @param string|resource|StreamInterface|null $body    Request body
    2727     * @param string                               $version Protocol version
     
    110110        }
    111111        // Ensure Host is the first header.
    112         // See: http://tools.ietf.org/html/rfc7230#section-5.4
     112        // See: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4
    113113        $this->headers = [$header => [$host]] + $this->headers;
    114114    }
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Response.php

    r2950993 r3032832  
    2020    /**
    2121     * @param int                                  $status  Status code
    22      * @param array<string, string|string[]>       $headers Response headers
     22     * @param (string|string[])[]                  $headers Response headers
    2323     * @param string|resource|StreamInterface|null $body    Response body
    2424     * @param string                               $version Protocol version
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/ServerRequest.php

    r2950993 r3032832  
    5252     * @param string                               $method       HTTP method
    5353     * @param string|UriInterface                  $uri          URI
    54      * @param array<string, string|string[]>       $headers      Request headers
     54     * @param (string|string[])[]                  $headers      Request headers
    5555     * @param string|resource|StreamInterface|null $body         Request body
    5656     * @param string                               $version      Protocol version
     
    223223    }
    224224    /**
    225      * {@inheritdoc}
    226      *
    227225     * @return array|object|null
    228226     */
     
    242240    }
    243241    /**
    244      * {@inheritdoc}
    245      *
    246242     * @return mixed
    247243     */
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Stream.php

    r2950993 r3032832  
    1111{
    1212    /**
    13      * @see http://php.net/manual/function.fopen.php
    14      * @see http://php.net/manual/en/function.gzopen.php
     13     * @see https://www.php.net/manual/en/function.fopen.php
     14     * @see https://www.php.net/manual/en/function.gzopen.php
    1515     */
    1616    private const READABLE_MODES = '/r|a\\+|ab\\+|w\\+|wb\\+|x\\+|xb\\+|c\\+|cb\\+/';
     
    219219    }
    220220    /**
    221      * {@inheritdoc}
    222      *
    223221     * @return mixed
    224222     */
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php

    r2950993 r3032832  
    6161        /** @var callable $callable */
    6262        $callable = [$this->stream, $method];
    63         $result = \call_user_func_array($callable, $args);
     63        $result = $callable(...$args);
    6464        // Always return the wrapped object if the result is a return $this
    6565        return $result === $this->stream ? $this : $result;
     
    7070    }
    7171    /**
    72      * {@inheritdoc}
    73      *
    7472     * @return mixed
    7573     */
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/StreamWrapper.php

    r2950993 r3032832  
    9898    }
    9999    /**
    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     * }
    101115     */
    102116    public function stream_stat() : array
     
    106120    }
    107121    /**
    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     * }
    109137     */
    110138    public function url_stat(string $path, int $flags) : array
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/UploadedFile.php

    r2950993 r3032832  
    8181        $this->error = $error;
    8282    }
    83     private function isStringNotEmpty($param) : bool
     83    private static function isStringNotEmpty($param) : bool
    8484    {
    8585        return \is_string($param) && \false === empty($param);
     
    121121    {
    122122        $this->validateActive();
    123         if (\false === $this->isStringNotEmpty($targetPath)) {
     123        if (\false === self::isStringNotEmpty($targetPath)) {
    124124            throw new InvalidArgumentException('Invalid path provided for move operation; must be a non-empty string');
    125125        }
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Uri.php

    r2950993 r3032832  
    2626     * Unreserved characters for use in a regex.
    2727     *
    28      * @see https://tools.ietf.org/html/rfc3986#section-2.3
     28     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3
    2929     */
    3030    private const CHAR_UNRESERVED = 'a-zA-Z0-9_\\-\\.~';
     
    3232     * Sub-delims for use in a regex.
    3333     *
    34      * @see https://tools.ietf.org/html/rfc3986#section-2.2
     34     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2
    3535     */
    3636    private const CHAR_SUB_DELIMS = '!\\$&\'\\(\\)\\*\\+,;=';
     
    119119     * that format).
    120120     *
    121      * @see https://tools.ietf.org/html/rfc3986#section-5.3
     121     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3
    122122     */
    123123    public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment) : string
     
    166166     * @see Uri::isAbsolutePathReference
    167167     * @see Uri::isRelativePathReference
    168      * @see https://tools.ietf.org/html/rfc3986#section-4
     168     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4
    169169     */
    170170    public static function isAbsolute(UriInterface $uri) : bool
     
    177177     * A relative reference that begins with two slash characters is termed an network-path reference.
    178178     *
    179      * @see https://tools.ietf.org/html/rfc3986#section-4.2
     179     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
    180180     */
    181181    public static function isNetworkPathReference(UriInterface $uri) : bool
     
    188188     * A relative reference that begins with a single slash character is termed an absolute-path reference.
    189189     *
    190      * @see https://tools.ietf.org/html/rfc3986#section-4.2
     190     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
    191191     */
    192192    public static function isAbsolutePathReference(UriInterface $uri) : bool
     
    199199     * A relative reference that does not begin with a slash character is termed a relative-path reference.
    200200     *
    201      * @see https://tools.ietf.org/html/rfc3986#section-4.2
     201     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
    202202     */
    203203    public static function isRelativePathReference(UriInterface $uri) : bool
     
    215215     * @param UriInterface|null $base An optional base URI to compare against
    216216     *
    217      * @see https://tools.ietf.org/html/rfc3986#section-4.4
     217     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4
    218218     */
    219219    public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) : bool
     
    263263     * It has the same behavior as withQueryValue() but for an associative array of key => value.
    264264     *
    265      * @param UriInterface               $uri           URI to use as a base.
    266      * @param array<string, string|null> $keyValueArray Associative array of key and values
     265     * @param UriInterface    $uri           URI to use as a base.
     266     * @param (string|null)[] $keyValueArray Associative array of key and values
    267267     */
    268268    public static function withQueryValues(UriInterface $uri, array $keyValueArray) : UriInterface
     
    277277     * Creates a URI from a hash of `parse_url` components.
    278278     *
    279      * @see http://php.net/manual/en/function.parse-url.php
     279     * @see https://www.php.net/manual/en/function.parse-url.php
    280280     *
    281281     * @throws MalformedUriException If the components do not form a valid URI.
     
    490490    }
    491491    /**
    492      * @param string[] $keys
     492     * @param (string|int)[] $keys
    493493     *
    494494     * @return string[]
     
    500500            return [];
    501501        }
    502         $decodedKeys = \array_map('rawurldecode', $keys);
     502        $decodedKeys = \array_map(function ($k) : string {
     503            return \rawurldecode((string) $k);
     504        }, $keys);
    503505        return \array_filter(\explode('&', $current), function ($part) use($decodedKeys) {
    504506            return !\in_array(\rawurldecode(\explode('=', $part)[0]), $decodedKeys, \true);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/UriNormalizer.php

    r2950993 r3032832  
    1010 * @author Tobias Schultze
    1111 *
    12  * @see https://tools.ietf.org/html/rfc3986#section-6
     12 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6
    1313 */
    1414final class UriNormalizer
     
    103103     * @param int          $flags A bitmask of normalizations to apply, see constants
    104104     *
    105      * @see https://tools.ietf.org/html/rfc3986#section-6.2
     105     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.2
    106106     */
    107107    public static function normalize(UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS) : UriInterface
     
    147147     * @param int          $normalizations A bitmask of normalizations to apply, see constants
    148148     *
    149      * @see https://tools.ietf.org/html/rfc3986#section-6.1
     149     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1
    150150     */
    151151    public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS) : bool
     
    156156    {
    157157        $regex = '/(?:%[A-Fa-f0-9]{2})++/';
    158         $callback = function (array $match) {
     158        $callback = function (array $match) : string {
    159159            return \strtoupper($match[0]);
    160160        };
     
    164164    {
    165165        $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 {
    167167            return \rawurldecode($match[0]);
    168168        };
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/UriResolver.php

    r2950993 r3032832  
    1010 * @author Tobias Schultze
    1111 *
    12  * @see https://tools.ietf.org/html/rfc3986#section-5
     12 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5
    1313 */
    1414final class UriResolver
     
    1717     * Removes dot segments from a path and returns the new path.
    1818     *
    19      * @see http://tools.ietf.org/html/rfc3986#section-5.2.4
     19     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4
    2020     */
    2121    public static function removeDotSegments(string $path) : string
     
    4747     * Converts the relative URI into a new URI that is resolved against the base URI.
    4848     *
    49      * @see http://tools.ietf.org/html/rfc3986#section-5.2
     49     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2
    5050     */
    5151    public static function resolve(UriInterface $base, UriInterface $rel) : UriInterface
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Utils.php

    r2950993 r3032832  
    1313     * Remove the items given by the keys, case insensitively from the data.
    1414     *
    15      * @param string[] $keys
     15     * @param (string|int)[] $keys
    1616     */
    1717    public static function caselessRemove(array $keys, array $data) : array
     
    1919        $result = [];
    2020        foreach ($keys as &$key) {
    21             $key = \strtolower($key);
     21            $key = \strtolower((string) $key);
    2222        }
    2323        foreach ($data as $k => $v) {
    24             if (!\is_string($k) || !\in_array(\strtolower($k), $keys)) {
     24            if (!\in_array(\strtolower((string) $k), $keys)) {
    2525                $result[$k] = $v;
    2626            }
     
    186186     * @param int|null        $maxLength Maximum buffer length
    187187     */
    188     public static function readLine(StreamInterface $stream, ?int $maxLength = null) : string
     188    public static function readLine(StreamInterface $stream, int $maxLength = null) : string
    189189    {
    190190        $buffer = '';
  • activecampaign-for-woocommerce/trunk/ac_vendor/laravel/serializable-closure/src/Support/ReflectionClosure.php

    r2950993 r3032832  
    480480                case 'id_name':
    481481                    switch ($token[0]) {
    482                         // named arguments...
    483                         case ':':
     482                        case $token[0] === ':' && $context !== 'instanceof':
    484483                            if ($lastState === 'closure' && $context === 'root') {
    485484                                $state = 'closure';
     
    606605                case 'anonymous':
    607606                    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;
    608612                        case \T_NS_SEPARATOR:
    609613                        case \T_STRING:
  • activecampaign-for-woocommerce/trunk/activecampaign-for-woocommerce.php

    r3017132 r3032832  
    1717 * Plugin URI:           https://www.activecampaign.com/
    1818 * Description:          Add Abandoned Cart functionality to your WooCommerce store, synchronize order & customer information using ActiveCampaign.
    19  * Version:              2.5.5
    20  * WC requires at least: 7.4
    21  * WC tested up to:      8.3.1
     19 * Version:              2.5.6
     20 * WC requires at least: 7.4.0
     21 * WC tested up to:      8.5.1
    2222 * Requires at least:    6.0
    2323 * Requires PHP:         7.4
  • activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin-historical-sync.php

    r2977226 r3032832  
    4242
    4343    /**
    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.
    4593     *
    4694     * @since 1.6.0
     
    4896    public function schedule_bulk_historical_sync() {
    4997        $logger = new Logger();
     98        $this->schedule_cron_syncs();
     99
    50100        try {
    51101            delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_RUNNING_STATUS_NAME );
     102            delete_transient( 'activecampaign_for_woocommerce_hs_contacts' );
    52103            $sync_contacts = self::get_request_data( 'syncContacts' );
    53104
     
    300351        delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_SCHEDULED_STATUS_NAME );
    301352        delete_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_HISTORICAL_SYNC_LAST_STATUS_NAME );
     353        delete_transient( 'activecampaign_for_woocommerce_hs_contacts' );
    302354        $this->clean_bad_data_from_table();
    303355        $this->clean_all_old_historical_syncs();
  • activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin-status.php

    r2988259 r3032832  
    107107            WC_Log_Handler_DB::delete_logs_before_timestamp( $date->format( 'U' ) );
    108108        } catch ( Throwable $t ) {
    109             $this->logger->warning(
     109            $logger = new Logger();
     110            $logger->warning(
    110111                'There was an issue trying to remove old log records.',
    111112                [
     
    161162            $data['wc_webhooks']                     = $wpdb->get_results( 'SELECT name, status FROM ' . $wpdb->prefix . 'wc_webhooks;' );
    162163            $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 AND wc_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' );
    164165            $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' );
    165166            $data['permalink_structure'] = get_option( 'permalink_structure' );
     
    204205            }
    205206        } catch ( Throwable $t ) {
    206             $this->logger->warning(
     207            $logger = new Logger();
     208            $logger->warning(
    207209                'ActiveCampaign status page threw an error',
    208210                [
     
    240242     */
    241243    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 {
    252301            $data['woocommerce_latest_version'] = get_transient( 'woocommerce_system_status_wp_version_check' );
    253302        } 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
    261312        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        }
    262333    }
    263334
     
    283354            }
    284355        } catch ( Throwable $t ) {
    285             $this->logger->warning(
     356            $logger = new Logger();
     357            $logger->warning(
    286358                'ActiveCampaign status page threw an error',
    287359                [
     
    309381        try {
    310382            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 );
    313386
    314387                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 );
    316389
    317390                    if ( $abandoned_schedule->timestamp && $abandoned_schedule->interval ) {
     
    334407                if ( $new_order_schedule ) {
    335408                    $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 );
    337410                    $data['new_order_schedule']['schedule']  = $new_order_schedule->schedule;
    338411                    if ( $new_order_schedule->timestamp && $new_order_schedule->interval ) {
     
    349422                    );
    350423                }
     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                }
    351442            } elseif ( function_exists( 'wp_next_scheduled' ) ) {
    352443                $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;
    358451                if ( ! $new_order_schedule || ! $abandoned_schedule ) {
    359452                    $logger->warning(
    360453                        'An order sync is not scheduled.',
    361454                        [
    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,
    364458                        ]
    365459                    );
  • activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin-wc-order-page.php

    r2966088 r3032832  
    1717class Activecampaign_For_Woocommerce_Admin_WC_Order_Page implements Synced_Status {
    1818    use Activecampaign_For_Woocommerce_Synced_Status_Handler,
     19        Activecampaign_For_Woocommerce_Order_Data_Gathering,
    1920        Activecampaign_For_Woocommerce_Admin_Utilities;
    2021
     
    9495
    9596            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                }
    97114
    98115                $table_data = self::get_table_data( $wc_order_id );
     
    112129            }
    113130
     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
    114141            $activecampaign_for_woocommerce_data = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->get_order_page_data( $table_data, $ac_contact );
    115142
    116143            require_once plugin_dir_path( __FILE__ ) . 'partials/activecampaign-for-woocommerce-order-meta.php';
    117144        }
     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;
    118157    }
    119158
     
    211250    }
    212251
    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 ) {
    214253        $logger = new Logger();
    215254
     
    264303                }
    265304
     305                if ( isset( $status_override ) && ! empty( $status_override ) ) {
     306                    $store_data['synced_to_ac'] = $status_override;
     307                }
     308
    266309                global $wpdb;
    267310                if ( isset( $table_data->id ) && ! empty( $table_data->id ) ) {
  • activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin.php

    r3017123 r3032832  
    11091109    public function schedule_cron_syncs() {
    11101110        wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME );
     1111        wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR );
    11111112        wp_clear_scheduled_hook( 'activecampaign_for_woocommerce_cart_updated_recurring_event' );
    11121113
     
    11191120                wp_schedule_event( time() + 10, 'hourly', 'activecampaign_for_woocommerce_cart_updated_recurring_event' );
    11201121                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 );
    11211123            }
    11221124        } catch ( Throwable $t ) {
     
    11371139        wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME );
    11381140        wp_clear_scheduled_hook( 'activecampaign_for_woocommerce_cart_updated_recurring_event' );
     1141        wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR );
    11391142    }
    11401143
     
    11821185                wp_clear_scheduled_hook( 'activecampaign_for_woocommerce_cart_updated_recurring_event' );
    11831186                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 );
    11851203                return true;
    11861204            } else {
  • activecampaign-for-woocommerce/trunk/admin/partials/activecampaign-for-woocommerce-status-mapping.php

    r3017132 r3032832  
    99 * @subpackage Activecampaign_For_Woocommerce/admin/partials
    1010 */
     11use Activecampaign_For_Woocommerce_Cofe_Ecom_Order_Status as Ecom_Order_Status;
    1112
    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;
     13try {
     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;
    1517
    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    );
    1861}
    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 these
    29 $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 
    5462?>
    5563<section>
     
    6068        <thead>
    6169        <tr>
    62             <th>WooCommerce</th>
    63             <th>ActiveCampaign</th>
     70            <th>WooCommerce order status will map to ></th>
     71            <th>ActiveCampaign status</th>
    6472            <th>Actions</th>
    6573        </tr>
     
    6775        <tr>
    6876            <td>
     77                <?php if ( isset( $activecampaign_for_woocommerce_wc_status_list ) && is_array( $activecampaign_for_woocommerce_wc_status_list ) ) : ?>
    6978                <select id="wc_status_key">
    7079                    <?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>'; ?>
    7281                    <?php endforeach; ?>
    7382                </select>
     83                <?php else : ?>
     84                    Unable to retrieve status list from WooCommerce.
     85                <?php endif; ?>
    7486            </td>
    7587            <td>
     88                <?php if ( isset( $activecampaign_for_woocommerce_ac_status_list ) && is_array( $activecampaign_for_woocommerce_ac_status_list ) ) : ?>
    7689                <select id="ac_status_key" class="activecampaign-for-woocommerce">
    7790                    <?php foreach ( array_unique( $activecampaign_for_woocommerce_ac_status_list ) as $activecampaign_for_woocommerce_ac_status_key => $activecampaign_for_woocommerce_ac_status_match ) : ?>
     
    7992                    <?php endforeach; ?>
    8093                </select>
     94                <?php else : ?>
     95                    Unable to retrieve stored AC status list from settings.
     96                <?php endif; ?>
    8197            </td>
    8298            <td>
     
    93109            <?php endforeach; ?>
    94110        <?php else : ?>
    95         <tr><td>No mappings set</td></tr>
     111            <tr>
     112                <td>
     113                    No mappings set
     114                </td>
     115            </tr>
    96116        <?php endif; ?>
    97117    </table>
  • activecampaign-for-woocommerce/trunk/admin/scripts/activecampaign-for-woocommerce-historical-sync.js

    r2874469 r3032832  
    6464            var run_status = false;
    6565
    66             console.log(response);
    6766            if(response.data.status !== false) {
    6867                $('#activecampaign-sync-run-section').show();
     
    8079                $('#activecampaign-historical-sync-contact-status span').html(run_status.run_sync.contacts);
    8180                $('#activecampaign-historical-sync-contacts-count').html(run_status.contact_total);
     81                $('#activecampaign-historical-sync-contacts-queue').html(run_status.contact_queue + ' (apx.)');
    8282                $('#activecampaign-run-historical-sync-contact-record-num').html(run_status.contact_count);
    8383                $('#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  
    1010 */
    1111
    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();
    1515?>
    1616<style>
     
    220220                                <td><span id="activecampaign-historical-sync-contacts-count"></span></td>
    221221                                <td>N/A</td>
    222                                 <td>N/A</td>
     222                                <td><span id="activecampaign-historical-sync-contacts-queue">-</span></td>
    223223                                <td><span id="activecampaign-run-historical-sync-contact-record-num"></span></td>
    224224                                <td>N/A</td>
     
    236236                        </table>
    237237                        <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>
    238246                        <?php if ( $activecampaign_for_woocommerce_options['ac_debug'] ) : ?>
    239247                            <hr/>
  • activecampaign-for-woocommerce/trunk/admin/views/activecampaign-for-woocommerce-status-display.php

    r2994180 r3032832  
    66     * @package    Activecampaign_For_Woocommerce
    77     */
    8 
    9     use Automattic\WooCommerce\Blocks\Package as Block_Package;
    10     use Activecampaign_For_Woocommerce_Logger as Logger;
    118
    129    global $wpdb;
     
    293290        </tr>
    294291        <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>
    295302            <td>AC Database Verison</td>
    296303            <td>
     
    313320                    <?php $this->output_yes_mark( 'No issues found' ); ?>
    314321                <?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/>
    315355            </td>
    316356        </tr>
     
    340380                    <mark class="error">Could not confirm the last order sync</mark>
    341381                <?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>
    342389                <?php if ( isset( $activecampaign_for_woocommerce_status_data['abandoned_interval_minutes'] ) && $activecampaign_for_woocommerce_status_data['abandoned_interval_minutes'] >= 0 ) : ?>
    343                     <?php esc_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 ); ?>
    344391                    <br/>
    345392                <?php endif; ?>
     
    360407                            echo 'Recently Synced Orders: ';
    361408                            break;
     409                        case 2:
     410                            echo 'Orders On Hold: ';
     411                            break;
    362412                        case 3:
    363                             echo 'Waiting for Historical Sync: ';
     413                            echo 'Pending for Historical Sync: ';
    364414                            break;
    365415                        case 4:
    366                             echo 'Prepared for Historical Sync: ';
     416                            echo 'Ready for Historical Sync: ';
    367417                            break;
    368418                        case 5:
  • activecampaign-for-woocommerce/trunk/includes/abandoned_carts/class-activecampaign-for-woocommerce-cart-events.php

    r2968938 r3032832  
    3636
    3737        try {
     38            set_transient( 'acforwc_cart_updated_hook', wp_date( DATE_ATOM ), 604800 );
     39
    3840            if (
    3941                ( ! self::validate_object( $wc_customer, 'get_billing_email' ) || empty( $wc_customer->get_billing_email() ) ) &&
     
    99101         * @var WC_Order $order
    100102         */
    101         try {
     103        $logger = new Logger();
     104
     105        try {
     106            set_transient( 'acforwc_cart_to_order_transition_hook', wp_date( DATE_ATOM ), 604800 );
     107
    102108            if ( isset( $args[0] ) ) {
    103109                $order = $args[0];
    104110
    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                    );
    106119                    return $order;
    107120                }
     
    173186
    174187                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 ) {
    178198            $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.',
    180200                [
    181201                    'class'   => 'Activecampaign_For_Woocommerce_Add_Cart_Id_To_Order_Command',
    182202                    'message' => $t->getMessage(),
    183                     'ac_code' => 'CE_180',
     203                    'ac_code' => 'CE_202',
    184204                ]
    185205            );
     
    216236                    'class'   => 'Activecampaign_For_Woocommerce_Create_And_Save_Cart_Id_Command',
    217237                    'message' => $t->getMessage(),
     238                    'ac_code' => 'CE_238',
    218239                ]
    219240            );
  • activecampaign-for-woocommerce/trunk/includes/abandoned_carts/class-activecampaign-for-woocommerce-run-abandonment-sync-command.php

    r2977226 r3032832  
    132132            $this->logger = new Logger();
    133133        }
     134
     135        set_transient( 'acforwc_abandoned_task_hook', wp_date( DATE_ATOM ), 604800 );
    134136
    135137        $now      = date_create( 'NOW' );
  • activecampaign-for-woocommerce/trunk/includes/api-client/class-activecampaign-for-woocommerce-api-client.php

    r2988259 r3032832  
    220220                // 'base_uri' => 'http://host.docker.internal:14001/graphql',
    221221                // 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(
    225227                    'Api-Token'         => $this->get_api_key(),
    226228                    'X-Request-Id'      => RequestIdService::get_request_id(),
  • activecampaign-for-woocommerce/trunk/includes/class-activecampaign-for-woocommerce.php

    r3017123 r3032832  
    426426            $this->new_order_created_event,
    427427            'execute_with_order_id',
    428             98
     428            28
    429429        );
    430430
     
    433433            $this->new_order_created_event,
    434434            'execute',
    435             90
     435            20
    436436        );
    437437
     
    440440            $this->new_order_created_event,
    441441            'execute',
    442             99
     442            29
    443443        );
    444444
     
    447447            $this->new_order_created_event,
    448448            'execute_with_order_obj',
    449             96
     449            26
    450450        );
    451451        // End order complete hooks
     
    558558            $this->order_events,
    559559            'execute_order_updated',
    560             99,
     560            10,
    561561            1
    562562        );
     
    566566            $this->order_events,
    567567            'execute_order_updated',
    568             99
     568            10
    569569        );
    570570
     
    574574            $this->order_events,
    575575            'execute_order_updated',
    576             99,
     576            10,
    577577            1
    578578        );
     
    663663
    664664        $this->loader->add_action(
    665             ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME,
     665            ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR,
    666666            $this->historical_sync,
    667667            'run_sync',
     
    671671
    672672        $this->loader->add_action(
    673             ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME,
     673            ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR,
    674674            $this->historical_sync,
    675675            'run_historical_sync_contacts',
     
    803803            $this->admin,
    804804            'add_admin_page',
    805             99
     805            10
    806806        );
    807807
  • activecampaign-for-woocommerce/trunk/includes/config/activecampaign-for-woocommerce-global-constants.php

    r3017132 r3032832  
    2626 */
    2727if ( ! defined( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION' ) ) {
    28     define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.5.5' );
     28    define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.5.6' );
    2929}
    3030
     
    179179
    180180/**
     181 * The run historical sync common name.
     182 *
     183 * @var string The run historical sync common name.
     184 * @since 1.5.0
     185 */
     186if ( ! 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/**
    181192 * The historical sync scheduled status common name.
    182193 *
  • activecampaign-for-woocommerce/trunk/includes/events/class-activecampaign-for-woocommerce-user-registered-event.php

    r2966088 r3032832  
    129129    /**
    130130     * Sets up and sends the customer for AC
    131      *
    132      * @throws GuzzleException Is not fatal.
    133131     */
    134132    private function setup_woocommerce_customer() {
     
    158156                try {
    159157                    // 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() ) ] );
    161159
    162160                    $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  
    3131        }
    3232
     33        set_transient( 'acforwc_order_created_hook', wp_date( DATE_ATOM ), 604800 );
     34
    3335        $logger->debug(
    3436            'Order created triggered',
     
    3739            ]
    3840        );
    39         if ( isset( $args ) ) {
     41
     42        if ( isset( $args ) && null !== $args && ! empty( $args ) ) {
    4043            wp_schedule_single_event(
    4144                time() + 30,
     
    5659                ]
    5760            );
     61
    5862            $post_type = get_post_type( $order_id );
    5963
     
    6266                return;
    6367            }
     68
     69            set_transient( 'acforwc_order_updated_hook', wp_date( DATE_ATOM ), 604800 );
    6470
    6571            $wc_order = $this->get_wc_order( $order_id );
     
    101107                    return;
    102108                }
     109
     110                set_transient( 'acforwc_order_deleted_hook', wp_date( DATE_ATOM ), 604800 );
    103111
    104112                $logger->debug(
  • activecampaign-for-woocommerce/trunk/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-contacts.php

    r2977226 r3032832  
    6262
    6363        $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'];
    6465        $this->update_sync_status();
    6566
     
    7273        $this->logger->debug( 'Contact historical sync started.', [ 'start transient' => $start ] );
    7374
    74         if ( ! empty( $start ) ) {
     75        if ( null !== $start && false !== $start ) {
    7576            $last_record     = $start;
    7677            $synced_contacts = $this->status['contact_count'];
     
    7879
    7980        // phpcs:disable
    80         wp_suspend_cache_addition(true); // Do not add to cache for session
     81
    8182        while ( $wc_customers = $wpdb->get_results(
    8283            $wpdb->prepare(
     
    122123                } catch ( Throwable $t ) {
    123124                    $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.',
    125126                        [
    126127                            'message' => $t->getMessage(),
     128                            'ac_code' => 'hsc_127',
    127129                        ]
    128130                    );
     
    155157                $this->status['contact_count'] = $synced_contacts;
    156158                $c                            += $limit;
     159                $this->status['contact_queue'] = $this->status['contact_total'] - $this->status['contact_count'] - $this->status['contact_failed_count'];
    157160                $this->update_sync_status();
    158161
     
    169172
    170173            set_transient( 'activecampaign_for_woocommerce_hs_contacts', $last_record, 3600 );
    171             if ( $c > 2000 ) {
     174
     175            if ( $c >= 2000 ) {
    172176                break;
    173177            }
     
    176180        if ( 0 === $c ) {
    177181            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        }
    181185
    182186        $this->logger->debug(
  • activecampaign-for-woocommerce/trunk/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-handler.php

    r2977226 r3032832  
    171171     */
    172172    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' ) ) {
    174174            $this->update_sync_running_status( 'contacts', 'syncing' );
    175175
  • activecampaign-for-woocommerce/trunk/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-prep.php

    r2966088 r3032832  
    5050        $this->logger = new Logger();
    5151        $this->logger->debug( 'Preparing historical sync records.' );
    52         $batch_limit = 100;
     52        $batch_limit = 30;
    5353        $this->clean_bad_data_from_table();
    5454
     
    253253     * @return stdClass|WC_Order[]
    254254     */
    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 ) {
    256256        // limits and paged can be added
    257257        if ( ! isset( $status ) ) {
  • activecampaign-for-woocommerce/trunk/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-runner-cofe.php

    r3017123 r3032832  
    122122
    123123        // 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 ) {
    125127            $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;
    132128        }
    133129
     
    166162
    167163        $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        );
    169174    }
    170175
     
    255260                        'message' => $t->getMessage(),
    256261                        'trace'   => $t->getTrace(),
     262                        'ac_code' => 'HSRC_262',
    257263                    ]
    258264                );
     
    261267            try {
    262268                // 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 ) {
    264270                    self::wpdb_update_in(
    265271                        ( $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME ), // table
     
    276282                        'message' => $t->getMessage(),
    277283                        'trace'   => $t->getTrace(),
     284                        'ac_code' => 'HSRC_284',
    278285                    ]
    279286                );
     
    299306                        'message' => $t->getMessage(),
    300307                        'trace'   => $t->getTrace(),
     308                        'ac_code' => 'HSRC_308',
    301309                    ]
    302310                );
     
    314322                    [
    315323                        'message' => $t->getMessage(),
    316                         'ac_code' => 'HSRC_305',
     324                        'ac_code' => 'HSRC_324',
    317325                        'trace'   => $t->getTrace(),
    318326                    ]
     
    344352                        [
    345353                            'order_id' => isset( $order_id ) ? $order_id : null,
    346                             'ac_code'  => 'HSRC_331',
     354                            'ac_code'  => 'HSRC_354',
    347355                        ]
    348356                    );
     
    359367                            'order_id' => isset( $order_id ) ? $order_id : null,
    360368                            'wc_order' => isset( $wc_order ) ? $wc_order : null,
    361                             'ac_code'  => 'HSRC_309',
     369                            'ac_code'  => 'HSRC_369',
    362370                        ]
    363371                    );
     
    392400                        'message'  => $t->getMessage(),
    393401                        'order_id' => $order_id,
    394                         'ac_code'  => 'HSRC_388',
     402                        'ac_code'  => 'HSRC_402',
    395403                        'trace'    => $t->getTrace(),
    396404                    ]
     
    440448                    [
    441449                        'suggested_action' => 'If this problem repeats please contact support.',
    442                         'ac_code'          => 'HSRC_380',
     450                        'ac_code'          => 'HSRC_450',
    443451                        'response'         => $response,
    444452                    ]
     
    457465                    [
    458466                        'suggested_action' => 'Please check with your host for issues with your server sending data to ActiveCampaign.',
    459                         'ac_code'          => 'HSRC_401',
     467                        'ac_code'          => 'HSRC_466',
    460468                        'response'         => $response,
    461469                    ]
     
    468476
    469477        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
    472485            $this->status['failed_order_id_array'] = array_unique( $this->status['failed_order_id_array'] );
     486
    473487            return false;
    474488        }
Note: See TracChangeset for help on using the changeset viewer.