Plugin Directory

Changeset 3232769


Ignore:
Timestamp:
01/31/2025 03:46:21 PM (14 months ago)
Author:
acteamintegrations
Message:

Version 2.8.4

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

Legend:

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

    r3227747 r3232769  
    44Requires at least: 6.0
    55Tested up to: 6.7.1
    6 Stable tag: 2.8.3
     6Stable tag: 2.8.4
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    6868
    6969= WooCommerce Compatibility =
    70 * Tested up to version: 9.5.2
     70* Tested up to version: 9.6.0
    7171* Minimal version requirement: 7.4.0
    7272* HPOS Compatible
     
    9494
    9595== Changelog ==
     96
     97= 2.8.4 2025-01-30 =
     98* Improvement - Recovered orders should track better
     99* Bugfix - Fixing issues discovered in WC version 9.6.0
     100* Bugfix - Abandoned carts would sometimes not get picked up
     101* Bugfix - Metadata relevant to order syncing was not being saved by WC
    96102
    97103= 2.8.3 2025-01-16 =
  • activecampaign-for-woocommerce/trunk/ac_vendor/autoload.php

    r3227747 r3232769  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit260c9fd4b34cebb5c211b0f72df1d798::getLoader();
     7return ComposerAutoloaderInitcc9ef1be9ee2971fdac871aab192449a::getLoader();
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/InstalledVersions.php

    r3032832 r3232769  
    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.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')));
     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.9.2', 'version' => '7.9.2.0', 'aliases' => array(), 'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b'), 'guzzlehttp/promises' => array('pretty_version' => '2.0.4', 'version' => '2.0.4.0', 'aliases' => array(), 'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455'), 'guzzlehttp/psr7' => array('pretty_version' => '2.7.0', 'version' => '2.7.0.0', 'aliases' => array(), 'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201'), 'laravel/serializable-closure' => array('pretty_version' => 'v1.3.7', 'version' => '1.3.7.0', 'aliases' => array(), 'reference' => '4f48ade902b94323ca3be7646db16209ec76be3d'), 'php-di/invoker' => array('pretty_version' => '2.3.6', 'version' => '2.3.6.0', 'aliases' => array(), 'reference' => '59f15608528d8a8838d69b422a919fd6b16aa576'), '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.1.0', 'version' => '1.1.0.0', 'aliases' => array(), 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a'), '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.4', 'version' => '2.5.4.0', 'aliases' => array(), 'reference' => '605389f2a7e5625f273b53960dc46aeaf9c62918')));
    1010    private static $canGetVendors;
    1111    private static $installedByVendor = array();
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/autoload_real.php

    r3227747 r3232769  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit260c9fd4b34cebb5c211b0f72df1d798
     5class ComposerAutoloaderInitcc9ef1be9ee2971fdac871aab192449a
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit260c9fd4b34cebb5c211b0f72df1d798', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitcc9ef1be9ee2971fdac871aab192449a', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit260c9fd4b34cebb5c211b0f72df1d798', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitcc9ef1be9ee2971fdac871aab192449a', '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\ComposerStaticInit260c9fd4b34cebb5c211b0f72df1d798::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInitcc9ef1be9ee2971fdac871aab192449a::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5454
    5555        if ($useStaticLoader) {
    56             $includeFiles = Composer\Autoload\ComposerStaticInit260c9fd4b34cebb5c211b0f72df1d798::$files;
     56            $includeFiles = Composer\Autoload\ComposerStaticInitcc9ef1be9ee2971fdac871aab192449a::$files;
    5757        } else {
    5858            $includeFiles = require __DIR__ . '/autoload_files.php';
    5959        }
    6060        foreach ($includeFiles as $fileIdentifier => $file) {
    61             composerRequire260c9fd4b34cebb5c211b0f72df1d798($fileIdentifier, $file);
     61            composerRequirecc9ef1be9ee2971fdac871aab192449a($fileIdentifier, $file);
    6262        }
    6363
     
    6666}
    6767
    68 function composerRequire260c9fd4b34cebb5c211b0f72df1d798($fileIdentifier, $file)
     68function composerRequirecc9ef1be9ee2971fdac871aab192449a($fileIdentifier, $file)
    6969{
    7070    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/autoload_static.php

    r3227747 r3232769  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit260c9fd4b34cebb5c211b0f72df1d798
     7class ComposerStaticInitcc9ef1be9ee2971fdac871aab192449a
    88{
    99    public static $files = array (
     
    493493    {
    494494        return \Closure::bind(function () use ($loader) {
    495             $loader->prefixLengthsPsr4 = ComposerStaticInit260c9fd4b34cebb5c211b0f72df1d798::$prefixLengthsPsr4;
    496             $loader->prefixDirsPsr4 = ComposerStaticInit260c9fd4b34cebb5c211b0f72df1d798::$prefixDirsPsr4;
    497             $loader->classMap = ComposerStaticInit260c9fd4b34cebb5c211b0f72df1d798::$classMap;
     495            $loader->prefixLengthsPsr4 = ComposerStaticInitcc9ef1be9ee2971fdac871aab192449a::$prefixLengthsPsr4;
     496            $loader->prefixDirsPsr4 = ComposerStaticInitcc9ef1be9ee2971fdac871aab192449a::$prefixDirsPsr4;
     497            $loader->classMap = ComposerStaticInitcc9ef1be9ee2971fdac871aab192449a::$classMap;
    498498
    499499        }, null, ClassLoader::class);
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/installed.json

    r3032832 r3232769  
    114114        {
    115115            "name": "guzzlehttp\/guzzle",
    116             "version": "7.8.1",
    117             "version_normalized": "7.8.1.0",
     116            "version": "7.9.2",
     117            "version_normalized": "7.9.2.0",
    118118            "source": {
    119119                "type": "git",
    120120                "url": "https:\/\/github.com\/guzzle\/guzzle.git",
    121                 "reference": "41042bc7ab002487b876a0683fc8dce04ddce104"
    122             },
    123             "dist": {
    124                 "type": "zip",
    125                 "url": "https:\/\/api.github.com\/repos\/guzzle\/guzzle\/zipball\/41042bc7ab002487b876a0683fc8dce04ddce104",
    126                 "reference": "41042bc7ab002487b876a0683fc8dce04ddce104",
     121                "reference": "d281ed313b989f213357e3be1a179f02196ac99b"
     122            },
     123            "dist": {
     124                "type": "zip",
     125                "url": "https:\/\/api.github.com\/repos\/guzzle\/guzzle\/zipball\/d281ed313b989f213357e3be1a179f02196ac99b",
     126                "reference": "d281ed313b989f213357e3be1a179f02196ac99b",
    127127                "shasum": ""
    128128            },
    129129            "require": {
    130130                "ext-json": "*",
    131                 "guzzlehttp\/promises": "^1.5.3 || ^2.0.1",
    132                 "guzzlehttp\/psr7": "^1.9.1 || ^2.5.1",
     131                "guzzlehttp\/promises": "^1.5.3 || ^2.0.3",
     132                "guzzlehttp\/psr7": "^2.7.0",
    133133                "php": "^7.2.5 || ^8.0",
    134134                "psr\/http-client": "^1.0",
     
    141141                "bamarni\/composer-bin-plugin": "^1.8.2",
    142142                "ext-curl": "*",
    143                 "php-http\/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
     143                "guzzle\/client-integration-tests": "3.0.2",
    144144                "php-http\/message-factory": "^1.1",
    145                 "phpunit\/phpunit": "^8.5.36 || ^9.6.15",
     145                "phpunit\/phpunit": "^8.5.39 || ^9.6.20",
    146146                "psr\/log": "^1.1 || ^2.0 || ^3.0"
    147147            },
     
    151151                "psr\/log": "Required for using the Log middleware"
    152152            },
    153             "time": "2023-12-03T20:35:24+00:00",
     153            "time": "2024-07-24T11:22:20+00:00",
    154154            "type": "library",
    155155            "extra": {
     
    239239        {
    240240            "name": "guzzlehttp\/promises",
    241             "version": "2.0.2",
    242             "version_normalized": "2.0.2.0",
     241            "version": "2.0.4",
     242            "version_normalized": "2.0.4.0",
    243243            "source": {
    244244                "type": "git",
    245245                "url": "https:\/\/github.com\/guzzle\/promises.git",
    246                 "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223"
    247             },
    248             "dist": {
    249                 "type": "zip",
    250                 "url": "https:\/\/api.github.com\/repos\/guzzle\/promises\/zipball\/bbff78d96034045e58e13dedd6ad91b5d1253223",
    251                 "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223",
     246                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
     247            },
     248            "dist": {
     249                "type": "zip",
     250                "url": "https:\/\/api.github.com\/repos\/guzzle\/promises\/zipball\/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
     251                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
    252252                "shasum": ""
    253253            },
     
    257257            "require-dev": {
    258258                "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",
     259                "phpunit\/phpunit": "^8.5.39 || ^9.6.20"
     260            },
     261            "time": "2024-10-17T10:06:22+00:00",
    262262            "type": "library",
    263263            "extra": {
     
    321321        {
    322322            "name": "guzzlehttp\/psr7",
    323             "version": "2.6.2",
    324             "version_normalized": "2.6.2.0",
     323            "version": "2.7.0",
     324            "version_normalized": "2.7.0.0",
    325325            "source": {
    326326                "type": "git",
    327327                "url": "https:\/\/github.com\/guzzle\/psr7.git",
    328                 "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221"
    329             },
    330             "dist": {
    331                 "type": "zip",
    332                 "url": "https:\/\/api.github.com\/repos\/guzzle\/psr7\/zipball\/45b30f99ac27b5ca93cb4831afe16285f57b8221",
    333                 "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221",
     328                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
     329            },
     330            "dist": {
     331                "type": "zip",
     332                "url": "https:\/\/api.github.com\/repos\/guzzle\/psr7\/zipball\/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     333                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
    334334                "shasum": ""
    335335            },
     
    346346            "require-dev": {
    347347                "bamarni\/composer-bin-plugin": "^1.8.2",
    348                 "http-interop\/http-factory-tests": "^0.9",
    349                 "phpunit\/phpunit": "^8.5.36 || ^9.6.15"
     348                "http-interop\/http-factory-tests": "0.9.0",
     349                "phpunit\/phpunit": "^8.5.39 || ^9.6.20"
    350350            },
    351351            "suggest": {
    352352                "laminas\/laminas-httphandlerrunner": "Emit PSR-7 responses"
    353353            },
    354             "time": "2023-12-03T20:05:35+00:00",
     354            "time": "2024-07-18T11:15:46+00:00",
    355355            "type": "library",
    356356            "extra": {
     
    436436        {
    437437            "name": "laravel\/serializable-closure",
    438             "version": "v1.3.3",
    439             "version_normalized": "1.3.3.0",
     438            "version": "v1.3.7",
     439            "version_normalized": "1.3.7.0",
    440440            "source": {
    441441                "type": "git",
    442442                "url": "https:\/\/github.com\/laravel\/serializable-closure.git",
    443                 "reference": "3dbf8a8e914634c48d389c1234552666b3d43754"
    444             },
    445             "dist": {
    446                 "type": "zip",
    447                 "url": "https:\/\/api.github.com\/repos\/laravel\/serializable-closure\/zipball\/3dbf8a8e914634c48d389c1234552666b3d43754",
    448                 "reference": "3dbf8a8e914634c48d389c1234552666b3d43754",
     443                "reference": "4f48ade902b94323ca3be7646db16209ec76be3d"
     444            },
     445            "dist": {
     446                "type": "zip",
     447                "url": "https:\/\/api.github.com\/repos\/laravel\/serializable-closure\/zipball\/4f48ade902b94323ca3be7646db16209ec76be3d",
     448                "reference": "4f48ade902b94323ca3be7646db16209ec76be3d",
    449449                "shasum": ""
    450450            },
     
    453453            },
    454454            "require-dev": {
    455                 "nesbot\/carbon": "^2.61",
     455                "illuminate\/support": "^8.0|^9.0|^10.0|^11.0",
     456                "nesbot\/carbon": "^2.61|^3.0",
    456457                "pestphp\/pest": "^1.21.3",
    457458                "phpstan\/phpstan": "^1.8.2",
    458                 "symfony\/var-dumper": "^5.4.11"
    459             },
    460             "time": "2023-11-08T14:08:06+00:00",
     459                "symfony\/var-dumper": "^5.4.11|^6.2.0|^7.0.0"
     460            },
     461            "time": "2024-11-14T18:34:49+00:00",
    461462            "type": "library",
    462463            "extra": {
     
    495496        {
    496497            "name": "php-di\/invoker",
    497             "version": "2.3.4",
    498             "version_normalized": "2.3.4.0",
     498            "version": "2.3.6",
     499            "version_normalized": "2.3.6.0",
    499500            "source": {
    500501                "type": "git",
    501502                "url": "https:\/\/github.com\/PHP-DI\/Invoker.git",
    502                 "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86"
    503             },
    504             "dist": {
    505                 "type": "zip",
    506                 "url": "https:\/\/api.github.com\/repos\/PHP-DI\/Invoker\/zipball\/33234b32dafa8eb69202f950a1fc92055ed76a86",
    507                 "reference": "33234b32dafa8eb69202f950a1fc92055ed76a86",
     503                "reference": "59f15608528d8a8838d69b422a919fd6b16aa576"
     504            },
     505            "dist": {
     506                "type": "zip",
     507                "url": "https:\/\/api.github.com\/repos\/PHP-DI\/Invoker\/zipball\/59f15608528d8a8838d69b422a919fd6b16aa576",
     508                "reference": "59f15608528d8a8838d69b422a919fd6b16aa576",
    508509                "shasum": ""
    509510            },
     
    517518                "phpunit\/phpunit": "^9.0"
    518519            },
    519             "time": "2023-09-08T09:24:21+00:00",
     520            "time": "2025-01-17T12:49:27+00:00",
    520521            "type": "library",
    521522            "installation-source": "dist",
     
    769770        {
    770771            "name": "psr\/http-factory",
    771             "version": "1.0.2",
    772             "version_normalized": "1.0.2.0",
     772            "version": "1.1.0",
     773            "version_normalized": "1.1.0.0",
    773774            "source": {
    774775                "type": "git",
    775776                "url": "https:\/\/github.com\/php-fig\/http-factory.git",
    776                 "reference": "e616d01114759c4c489f93b099585439f795fe35"
    777             },
    778             "dist": {
    779                 "type": "zip",
    780                 "url": "https:\/\/api.github.com\/repos\/php-fig\/http-factory\/zipball\/e616d01114759c4c489f93b099585439f795fe35",
    781                 "reference": "e616d01114759c4c489f93b099585439f795fe35",
    782                 "shasum": ""
    783             },
    784             "require": {
    785                 "php": ">=7.0.0",
     777                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
     778            },
     779            "dist": {
     780                "type": "zip",
     781                "url": "https:\/\/api.github.com\/repos\/php-fig\/http-factory\/zipball\/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     782                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     783                "shasum": ""
     784            },
     785            "require": {
     786                "php": ">=7.1",
    786787                "psr\/http-message": "^1.0 || ^2.0"
    787788            },
    788             "time": "2023-04-10T20:10:41+00:00",
     789            "time": "2024-04-15T12:06:14+00:00",
    789790            "type": "library",
    790791            "extra": {
     
    809810                }
    810811            ],
    811             "description": "Common interfaces for PSR-7 HTTP message factories",
     812            "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
    812813            "keywords": [
    813814                "factory",
     
    970971        {
    971972            "name": "symfony\/deprecation-contracts",
    972             "version": "v2.5.2",
    973             "version_normalized": "2.5.2.0",
     973            "version": "v2.5.4",
     974            "version_normalized": "2.5.4.0",
    974975            "source": {
    975976                "type": "git",
    976977                "url": "https:\/\/github.com\/symfony\/deprecation-contracts.git",
    977                 "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
    978             },
    979             "dist": {
    980                 "type": "zip",
    981                 "url": "https:\/\/api.github.com\/repos\/symfony\/deprecation-contracts\/zipball\/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
    982                 "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
     978                "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918"
     979            },
     980            "dist": {
     981                "type": "zip",
     982                "url": "https:\/\/api.github.com\/repos\/symfony\/deprecation-contracts\/zipball\/605389f2a7e5625f273b53960dc46aeaf9c62918",
     983                "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918",
    983984                "shasum": ""
    984985            },
     
    986987                "php": ">=7.1"
    987988            },
    988             "time": "2022-01-02T09:53:40+00:00",
     989            "time": "2024-09-25T14:11:13+00:00",
    989990            "type": "library",
    990991            "extra": {
     992                "thanks": {
     993                    "url": "https:\/\/github.com\/symfony\/contracts",
     994                    "name": "symfony\/contracts"
     995                },
    991996                "branch-alias": {
    992997                    "dev-main": "2.5-dev"
    993                 },
    994                 "thanks": {
    995                     "name": "symfony\/contracts",
    996                     "url": "https:\/\/github.com\/symfony\/contracts"
    997998                }
    998999            },
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/installed.php

    r3032832 r3232769  
    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.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')));
     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.9.2', 'version' => '7.9.2.0', 'aliases' => array(), 'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b'), 'guzzlehttp/promises' => array('pretty_version' => '2.0.4', 'version' => '2.0.4.0', 'aliases' => array(), 'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455'), 'guzzlehttp/psr7' => array('pretty_version' => '2.7.0', 'version' => '2.7.0.0', 'aliases' => array(), 'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201'), 'laravel/serializable-closure' => array('pretty_version' => 'v1.3.7', 'version' => '1.3.7.0', 'aliases' => array(), 'reference' => '4f48ade902b94323ca3be7646db16209ec76be3d'), 'php-di/invoker' => array('pretty_version' => '2.3.6', 'version' => '2.3.6.0', 'aliases' => array(), 'reference' => '59f15608528d8a8838d69b422a919fd6b16aa576'), '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.1.0', 'version' => '1.1.0.0', 'aliases' => array(), 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a'), '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.4', 'version' => '2.5.4.0', 'aliases' => array(), 'reference' => '605389f2a7e5625f273b53960dc46aeaf9c62918')));
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/BodySummarizer.php

    r2950993 r3232769  
    1010     */
    1111    private $truncateAt;
    12     public function __construct(int $truncateAt = null)
     12    public function __construct(?int $truncateAt = null)
    1313    {
    1414        $this->truncateAt = $truncateAt;
     
    1919    public function summarize(MessageInterface $message) : ?string
    2020    {
    21         return $this->truncateAt === null ? \AcVendor\GuzzleHttp\Psr7\Message::bodySummary($message) : \AcVendor\GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);
     21        return $this->truncateAt === null ? Psr7\Message::bodySummary($message) : Psr7\Message::bodySummary($message, $this->truncateAt);
    2222    }
    2323}
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Client.php

    r3032832 r3232769  
    5050     * @param array $config Client configuration settings.
    5151     *
    52      * @see \GuzzleHttp\RequestOptions for a list of available request options.
     52     * @see RequestOptions for a list of available request options.
    5353     */
    5454    public function __construct(array $config = [])
     
    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

    r3032832 r3232769  
    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

    r3032832 r3232769  
    8787        }, $this->getIterator()->getArrayCopy());
    8888    }
    89     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
    9090    {
    9191        if (!$domain) {
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php

    r3032832 r3232769  
    5959     * @param string|null $name   Clears cookies matching a domain, path, and name
    6060     */
    61     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;
    6262    /**
    6363     * Discard all sessions cookies.
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php

    r2950993 r3232769  
    1010class BadResponseException extends RequestException
    1111{
    12     public function __construct(string $message, RequestInterface $request, ResponseInterface $response, \Throwable $previous = null, array $handlerContext = [])
     12    public function __construct(string $message, RequestInterface $request, ResponseInterface $response, ?\Throwable $previous = null, array $handlerContext = [])
    1313    {
    1414        parent::__construct($message, $request, $response, $previous, $handlerContext);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php

    r2950993 r3232769  
    2020     */
    2121    private $handlerContext;
    22     public function __construct(string $message, RequestInterface $request, \Throwable $previous = null, array $handlerContext = [])
     22    public function __construct(string $message, RequestInterface $request, ?\Throwable $previous = null, array $handlerContext = [])
    2323    {
    2424        parent::__construct($message, 0, $previous);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Exception/RequestException.php

    r2950993 r3232769  
    88use AcVendor\Psr\Http\Message\RequestInterface;
    99use AcVendor\Psr\Http\Message\ResponseInterface;
    10 use AcVendor\Psr\Http\Message\UriInterface;
    1110/**
    1211 * HTTP Request exception
     
    2625     */
    2726    private $handlerContext;
    28     public function __construct(string $message, RequestInterface $request, ResponseInterface $response = null, \Throwable $previous = null, array $handlerContext = [])
     27    public function __construct(string $message, RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $previous = null, array $handlerContext = [])
    2928    {
    3029        // Set the code of the exception if the response is set and not future.
     
    5150     * @param BodySummarizerInterface|null $bodySummarizer Optional body summarizer
    5251     */
    53     public static function create(RequestInterface $request, ResponseInterface $response = null, \Throwable $previous = null, array $handlerContext = [], BodySummarizerInterface $bodySummarizer = null) : self
     52    public static function create(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $previous = null, array $handlerContext = [], ?BodySummarizerInterface $bodySummarizer = null) : self
    5453    {
    5554        if (!$response) {
     
    6766            $className = __CLASS__;
    6867        }
    69         $uri = $request->getUri();
    70         $uri = static::obfuscateUri($uri);
     68        $uri = \AcVendor\GuzzleHttp\Psr7\Utils::redactUserInfo($request->getUri());
    7169        // Client Error: `GET /` resulted in a `404 Not Found` response:
    7270        // <html> ... (truncated)
     
    7775        }
    7876        return new $className($message, $request, $response, $previous, $handlerContext);
    79     }
    80     /**
    81      * Obfuscates URI if there is a username and a password present
    82      */
    83     private static function obfuscateUri(UriInterface $uri) : UriInterface
    84     {
    85         $userInfo = $uri->getUserInfo();
    86         if (\false !== ($pos = \strpos($userInfo, ':'))) {
    87             return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
    88         }
    89         return $uri;
    9077    }
    9178    /**
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

    r3032832 r3232769  
    1212use AcVendor\GuzzleHttp\Utils;
    1313use AcVendor\Psr\Http\Message\RequestInterface;
     14use AcVendor\Psr\Http\Message\UriInterface;
    1415/**
    1516 * Creates curl resources from a request
     
    4142    public function create(RequestInterface $request, array $options) : EasyHandle
    4243    {
     44        $protocolVersion = $request->getProtocolVersion();
     45        if ('2' === $protocolVersion || '2.0' === $protocolVersion) {
     46            if (!self::supportsHttp2()) {
     47                throw new ConnectException('HTTP/2 is supported by the cURL handler, however libcurl is built without HTTP/2 support.', $request);
     48            }
     49        } elseif ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) {
     50            throw new ConnectException(\sprintf('HTTP/%s is not supported by the cURL handler.', $protocolVersion), $request);
     51        }
    4352        if (isset($options['curl']['body_as_string'])) {
    4453            $options['_body_as_string'] = $options['curl']['body_as_string'];
     
    6170        \curl_setopt_array($easy->handle, $conf);
    6271        return $easy;
     72    }
     73    private static function supportsHttp2() : bool
     74    {
     75        static $supportsHttp2 = null;
     76        if (null === $supportsHttp2) {
     77            $supportsHttp2 = self::supportsTls12() && \defined('CURL_VERSION_HTTP2') && \CURL_VERSION_HTTP2 & \curl_version()['features'];
     78        }
     79        return $supportsHttp2;
     80    }
     81    private static function supportsTls12() : bool
     82    {
     83        static $supportsTls12 = null;
     84        if (null === $supportsTls12) {
     85            $supportsTls12 = \CURL_SSLVERSION_TLSv1_2 & \curl_version()['features'];
     86        }
     87        return $supportsTls12;
     88    }
     89    private static function supportsTls13() : bool
     90    {
     91        static $supportsTls13 = null;
     92        if (null === $supportsTls13) {
     93            $supportsTls13 = \defined('CURL_SSLVERSION_TLSv1_3') && \CURL_SSLVERSION_TLSv1_3 & \curl_version()['features'];
     94        }
     95        return $supportsTls13;
    6396    }
    6497    public function release(EasyHandle $easy) : void
     
    119152        // Get error information and release the handle to the factory.
    120153        $ctx = ['errno' => $easy->errno, 'error' => \curl_error($easy->handle), 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME)] + \curl_getinfo($easy->handle);
    121         $ctx[self::CURL_VERSION_STR] = \curl_version()['version'];
     154        $ctx[self::CURL_VERSION_STR] = self::getCurlVersion();
    122155        $factory->release($easy);
    123156        // Retry when nothing is present or when curl failed to rewind.
     
    127160        return self::createRejection($easy, $ctx);
    128161    }
     162    private static function getCurlVersion() : string
     163    {
     164        static $curlVersion = null;
     165        if (null === $curlVersion) {
     166            $curlVersion = \curl_version()['version'];
     167        }
     168        return $curlVersion;
     169    }
    129170    private static function createRejection(EasyHandle $easy, array $ctx) : PromiseInterface
    130171    {
     
    138179            return P\Create::rejectionFor(new RequestException('An error was encountered during the on_headers event', $easy->request, $easy->response, $easy->onHeadersException, $ctx));
    139180        }
    140         $message = \sprintf('cURL error %s: %s (%s)', $ctx['errno'], $ctx['error'], 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html');
    141         $uriString = (string) $easy->request->getUri();
    142         if ($uriString !== '' && \false === \strpos($ctx['error'], $uriString)) {
    143             $message .= \sprintf(' for %s', $uriString);
     181        $uri = $easy->request->getUri();
     182        $sanitizedError = self::sanitizeCurlError($ctx['error'] ?? '', $uri);
     183        $message = \sprintf('cURL error %s: %s (%s)', $ctx['errno'], $sanitizedError, 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html');
     184        if ('' !== $sanitizedError) {
     185            $redactedUriString = \AcVendor\GuzzleHttp\Psr7\Utils::redactUserInfo($uri)->__toString();
     186            if ($redactedUriString !== '' && \false === \strpos($sanitizedError, $redactedUriString)) {
     187                $message .= \sprintf(' for %s', $redactedUriString);
     188            }
    144189        }
    145190        // Create a connection exception if it was a specific error code.
     
    147192        return P\Create::rejectionFor($error);
    148193    }
     194    private static function sanitizeCurlError(string $error, UriInterface $uri) : string
     195    {
     196        if ('' === $error) {
     197            return $error;
     198        }
     199        $baseUri = $uri->withQuery('')->withFragment('');
     200        $baseUriString = $baseUri->__toString();
     201        if ('' === $baseUriString) {
     202            return $error;
     203        }
     204        $redactedUriString = \AcVendor\GuzzleHttp\Psr7\Utils::redactUserInfo($baseUri)->__toString();
     205        return \str_replace($baseUriString, $redactedUriString, $error);
     206    }
    149207    /**
    150208     * @return array<int|string, mixed>
     
    157215        }
    158216        $version = $easy->request->getProtocolVersion();
    159         if ($version == 1.1) {
     217        if ('2' === $version || '2.0' === $version) {
     218            $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;
     219        } elseif ('1.1' === $version) {
    160220            $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1;
    161         } elseif ($version == 2.0) {
    162             $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;
    163221        } else {
    164222            $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0;
     
    286344                // sets a matching 'Accept-Encoding' header.
    287345                $conf[\CURLOPT_ENCODING] = '';
    288                 // But as the user did not specify any acceptable encodings we need
    289                 // to overwrite this implicit header with an empty one.
     346                // But as the user did not specify any encoding preference,
     347                // let's leave it up to server by preventing curl from sending
     348                // the header, which will be interpreted as 'Accept-Encoding: *'.
     349                // https://www.rfc-editor.org/rfc/rfc9110#field.accept-encoding
    290350                $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
    291351            }
     
    344404        }
    345405        if (isset($options['crypto_method'])) {
    346             if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) {
    347                 if (!\defined('CURL_SSLVERSION_TLSv1_0')) {
    348                     throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL');
    349                 }
     406            $protocolVersion = $easy->request->getProtocolVersion();
     407            // If HTTP/2, upgrade TLS 1.0 and 1.1 to 1.2
     408            if ('2' === $protocolVersion || '2.0' === $protocolVersion) {
     409                if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method'] || \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method'] || \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) {
     410                    $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2;
     411                } elseif (\defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) {
     412                    if (!self::supportsTls13()) {
     413                        throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL');
     414                    }
     415                    $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3;
     416                } else {
     417                    throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided');
     418                }
     419            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) {
    350420                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0;
    351421            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) {
    352                 if (!\defined('CURL_SSLVERSION_TLSv1_1')) {
    353                     throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL');
    354                 }
    355422                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1;
    356423            } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) {
    357                 if (!\defined('CURL_SSLVERSION_TLSv1_2')) {
     424                if (!self::supportsTls12()) {
    358425                    throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL');
    359426                }
    360427                $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2;
    361428            } elseif (\defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) {
    362                 if (!\defined('CURL_SSLVERSION_TLSv1_3')) {
     429                if (!self::supportsTls13()) {
    363430                    throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL');
    364431                }
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php

    r3032832 r3232769  
    33namespace AcVendor\GuzzleHttp\Handler;
    44
     5use Closure;
    56use AcVendor\GuzzleHttp\Promise as P;
    67use AcVendor\GuzzleHttp\Promise\Promise;
     
    130131            }
    131132        }
     133        // Run curl_multi_exec in the queue to enable other async tasks to run
     134        P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue']));
    132135        // Step through the task queue which may add additional requests.
    133136        P\Utils::queue()->run();
     
    138141        }
    139142        while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) {
     143            // Prevent busy looping for slow HTTP requests.
     144            \curl_multi_select($this->_mh, $this->selectTimeout);
    140145        }
    141146        $this->processMessages();
     147    }
     148    /**
     149     * Runs \curl_multi_exec() inside the event loop, to prevent busy looping
     150     */
     151    private function tickInQueue() : void
     152    {
     153        if (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) {
     154            \curl_multi_select($this->_mh, 0);
     155            P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue']));
     156        }
    142157    }
    143158    /**
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php

    r2950993 r3232769  
    4747     * @param callable|null $onRejected  Callback to invoke when the return value is rejected.
    4848     */
    49     public static function createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) : HandlerStack
     49    public static function createWithMiddleware(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null) : HandlerStack
    5050    {
    5151        return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
     
    5353    /**
    5454     * The passed in value must be an array of
    55      * {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions,
     55     * {@see ResponseInterface} objects, Exceptions,
    5656     * callables, or Promises.
    5757     *
     
    6060     * @param callable|null          $onRejected  Callback to invoke when the return value is rejected.
    6161     */
    62     public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null)
     62    public function __construct(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null)
    6363    {
    6464        $this->onFulfilled = $onFulfilled;
     
    164164     * @param mixed $reason Promise or reason.
    165165     */
    166     private function invokeStats(RequestInterface $request, array $options, ResponseInterface $response = null, $reason = null) : void
     166    private function invokeStats(RequestInterface $request, array $options, ?ResponseInterface $response = null, $reason = null) : void
    167167    {
    168168        if (isset($options['on_stats'])) {
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php

    r2950993 r3232769  
    3838            \usleep($options['delay'] * 1000);
    3939        }
     40        $protocolVersion = $request->getProtocolVersion();
     41        if ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) {
     42            throw new ConnectException(\sprintf('HTTP/%s is not supported by the stream handler.', $protocolVersion), $request);
     43        }
    4044        $startTime = isset($options['on_stats']) ? Utils::currentTime() : null;
    4145        try {
     
    6367        }
    6468    }
    65     private function invokeStats(array $options, RequestInterface $request, ?float $startTime, ResponseInterface $response = null, \Throwable $error = null) : void
     69    private function invokeStats(array $options, RequestInterface $request, ?float $startTime, ?ResponseInterface $response = null, ?\Throwable $error = null) : void
    6670    {
    6771        if (isset($options['on_stats'])) {
     
    211215        // HTTP/1.1 streams using the PHP stream wrapper require a
    212216        // Connection: close header
    213         if ($request->getProtocolVersion() == '1.1' && !$request->hasHeader('Connection')) {
     217        if ($request->getProtocolVersion() === '1.1' && !$request->hasHeader('Connection')) {
    214218            $request = $request->withHeader('Connection', 'close');
    215219        }
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/HandlerStack.php

    r3032832 r3232769  
    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());
     
    5353     * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler.
    5454     */
    55     public function __construct(callable $handler = null)
     55    public function __construct(?callable $handler = null)
    5656    {
    5757        $this->handler = $handler;
     
    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

    r3032832 r3232769  
    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

    r3032832 r3232769  
    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/Middleware.php

    r2950993 r3232769  
    4949     * @return callable(callable): callable Returns a function that accepts the next handler.
    5050     */
    51     public static function httpErrors(BodySummarizerInterface $bodySummarizer = null) : callable
     51    public static function httpErrors(?BodySummarizerInterface $bodySummarizer = null) : callable
    5252    {
    5353        return static function (callable $handler) use($bodySummarizer) : callable {
     
    105105     * @return callable Returns a function that accepts the next handler.
    106106     */
    107     public static function tap(callable $before = null, callable $after = null) : callable
     107    public static function tap(?callable $before = null, ?callable $after = null) : callable
    108108    {
    109109        return static function (callable $handler) use($before, $after) : callable {
     
    146146     * @return callable Returns a function that accepts the next handler.
    147147     */
    148     public static function retry(callable $decider, callable $delay = null) : callable
     148    public static function retry(callable $decider, ?callable $delay = null) : callable
    149149    {
    150150        return static function (callable $handler) use($decider, $delay) : RetryMiddleware {
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php

    r2950993 r3232769  
    6363        }
    6464        $expect = $options['expect'] ?? null;
    65         // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
    66         if ($expect === \false || $request->getProtocolVersion() < 1.1) {
     65        // Return if disabled or using HTTP/1.0
     66        if ($expect === \false || $request->getProtocolVersion() === '1.0') {
    6767            return;
    6868        }
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/RequestOptions.php

    r3032832 r3232769  
    5858     * jar to use or what cookies to send. This option only works if your
    5959     * handler has the `cookie` middleware. Valid values are `false` and
    60      * an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.
     60     * an instance of {@see Cookie\CookieJarInterface}.
    6161     */
    6262    public const COOKIES = 'cookies';
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/RetryMiddleware.php

    r2950993 r3232769  
    3737     *                                                                         milliseconds to delay.
    3838     */
    39     public function __construct(callable $decider, callable $nextHandler, callable $delay = null)
     39    public function __construct(callable $decider, callable $nextHandler, ?callable $delay = null)
    4040    {
    4141        $this->decider = $decider;
     
    8484        };
    8585    }
    86     private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) : PromiseInterface
     86    private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null) : PromiseInterface
    8787    {
    8888        $options['delay'] = ($this->delay)(++$options['retries'], $response, $request);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/guzzle/src/TransferStats.php

    r3032832 r3232769  
    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

    r3032832 r3232769  
    6565            return \STDOUT;
    6666        }
    67         return \AcVendor\GuzzleHttp\Psr7\Utils::tryFopen('php://output', 'w');
     67        return Psr7\Utils::tryFopen('php://output', 'w');
    6868    }
    6969    /**
     
    7979    {
    8080        $handler = null;
    81         if (\defined('CURLOPT_CUSTOMREQUEST')) {
     81        if (\defined('CURLOPT_CUSTOMREQUEST') && \function_exists('curl_version') && \version_compare(\curl_version()['version'], '7.21.2') >= 0) {
    8282            if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) {
    8383                $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/Coroutine.php

    r2950993 r3232769  
    7777        return new self($generatorFn);
    7878    }
    79     public function then(callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface
     79    public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface
    8080    {
    8181        return $this->result->then($onFulfilled, $onRejected);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/Each.php

    r3032832 r3232769  
    2121     * @param mixed $iterable Iterator or array to iterate over.
    2222     */
    23     public static function of($iterable, callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface
     23    public static function of($iterable, ?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface
    2424    {
    2525        return (new EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected]))->promise();
     
    3636     * @param int|callable $concurrency
    3737     */
    38     public static function ofLimit($iterable, $concurrency, callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface
     38    public static function ofLimit($iterable, $concurrency, ?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface
    3939    {
    4040        return (new EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected, 'concurrency' => $concurrency]))->promise();
     
    4848     * @param int|callable $concurrency
    4949     */
    50     public static function ofLimitAll($iterable, $concurrency, callable $onFulfilled = null) : PromiseInterface
     50    public static function ofLimitAll($iterable, $concurrency, ?callable $onFulfilled = null) : PromiseInterface
    5151    {
    5252        return self::ofLimit($iterable, $concurrency, $onFulfilled, function ($reason, $idx, PromiseInterface $aggregate) : void {
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/FulfilledPromise.php

    r2950993 r3232769  
    2525        $this->value = $value;
    2626    }
    27     public function then(callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface
     27    public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface
    2828    {
    2929        // Return itself if there is no onFulfilled function.
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/Promise.php

    r2950993 r3232769  
    2323     * @param callable $cancelFn Fn that when invoked cancels the promise.
    2424     */
    25     public function __construct(callable $waitFn = null, callable $cancelFn = null)
     25    public function __construct(?callable $waitFn = null, ?callable $cancelFn = null)
    2626    {
    2727        $this->waitFn = $waitFn;
    2828        $this->cancelFn = $cancelFn;
    2929    }
    30     public function then(callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface
     30    public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface
    3131    {
    3232        if ($this->state === self::PENDING) {
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/PromiseInterface.php

    r2950993 r3232769  
    2525     * @param callable $onRejected  Invoked when the promise is rejected.
    2626     */
    27     public function then(callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface;
     27    public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface;
    2828    /**
    2929     * Appends a rejection handler callback to the promise, and returns a new
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/RejectedPromise.php

    r2950993 r3232769  
    2525        $this->reason = $reason;
    2626    }
    27     public function then(callable $onFulfilled = null, callable $onRejected = null) : PromiseInterface
     27    public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface
    2828    {
    2929        // If there's no onRejected callback then just return self.
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/promises/src/RejectionException.php

    r3032832 r3232769  
    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/promises/src/Utils.php

    r2950993 r3232769  
    2121     * @param TaskQueueInterface|null $assign Optionally specify a new queue instance.
    2222     */
    23     public static function queue(TaskQueueInterface $assign = null) : TaskQueueInterface
     23    public static function queue(?TaskQueueInterface $assign = null) : TaskQueueInterface
    2424    {
    2525        static $queue;
     
    128128            $results[$idx] = $value;
    129129        }, function ($reason, $idx, Promise $aggregate) : void {
    130             $aggregate->reject($reason);
     130            if (Is::pending($aggregate)) {
     131                $aggregate->reject($reason);
     132            }
    131133        })->then(function () use(&$results) {
    132134            \ksort($results);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/CachingStream.php

    r2950993 r3232769  
    2626     * @param StreamInterface $target Optionally specify where data is cached
    2727     */
    28     public function __construct(StreamInterface $stream, StreamInterface $target = null)
     28    public function __construct(StreamInterface $stream, ?StreamInterface $target = null)
    2929    {
    3030        $this->remoteStream = $stream;
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/HttpFactory.php

    r2950993 r3232769  
    2424final class HttpFactory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface
    2525{
    26     public function createUploadedFile(StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null) : UploadedFileInterface
     26    public function createUploadedFile(StreamInterface $stream, ?int $size = null, int $error = \UPLOAD_ERR_OK, ?string $clientFilename = null, ?string $clientMediaType = null) : UploadedFileInterface
    2727    {
    2828        if ($size === null) {
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/MultipartStream.php

    r3032832 r3232769  
    2828     * @throws \InvalidArgumentException
    2929     */
    30     public function __construct(array $elements = [], string $boundary = null)
     30    public function __construct(array $elements = [], ?string $boundary = null)
    3131    {
    3232        $this->boundary = $boundary ?: \bin2hex(\random_bytes(20));
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Query.php

    r2950993 r3232769  
    5858     * encountered (like `http_build_query()` would).
    5959     *
    60      * @param array     $params   Query string parameters.
    61      * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
    62      *                            to encode using RFC3986, or PHP_QUERY_RFC1738
    63      *                            to encode using RFC1738.
     60     * @param array     $params           Query string parameters.
     61     * @param int|false $encoding         Set to false to not encode,
     62     *                                    PHP_QUERY_RFC3986 to encode using
     63     *                                    RFC3986, or PHP_QUERY_RFC1738 to
     64     *                                    encode using RFC1738.
     65     * @param bool      $treatBoolsAsInts Set to true to encode as 0/1, and
     66     *                                    false as false/true.
    6467     */
    65     public static function build(array $params, $encoding = \PHP_QUERY_RFC3986) : string
     68    public static function build(array $params, $encoding = \PHP_QUERY_RFC3986, bool $treatBoolsAsInts = \true) : string
    6669    {
    6770        if (!$params) {
     
    7982            throw new \InvalidArgumentException('Invalid type');
    8083        }
     84        $castBool = $treatBoolsAsInts ? static function ($v) {
     85            return (int) $v;
     86        } : static function ($v) {
     87            return $v ? 'true' : 'false';
     88        };
    8189        $qs = '';
    8290        foreach ($params as $k => $v) {
     
    8492            if (!\is_array($v)) {
    8593                $qs .= $k;
    86                 $v = \is_bool($v) ? (int) $v : $v;
     94                $v = \is_bool($v) ? $castBool($v) : $v;
    8795                if ($v !== null) {
    8896                    $qs .= '=' . $encoder((string) $v);
     
    92100                foreach ($v as $vv) {
    93101                    $qs .= $k;
    94                     $vv = \is_bool($vv) ? (int) $vv : $vv;
     102                    $vv = \is_bool($vv) ? $castBool($vv) : $vv;
    95103                    if ($vv !== null) {
    96104                        $qs .= '=' . $encoder((string) $vv);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Response.php

    r3032832 r3232769  
    2525     * @param string|null                          $reason  Reason phrase (when empty a default will be used based on the status code)
    2626     */
    27     public function __construct(int $status = 200, array $headers = [], $body = null, string $version = '1.1', string $reason = null)
     27    public function __construct(int $status = 200, array $headers = [], $body = null, string $version = '1.1', ?string $reason = null)
    2828    {
    2929        $this->assertStatusCodeRange($status);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/StreamWrapper.php

    r3032832 r3232769  
    5757        }
    5858    }
    59     public function stream_open(string $path, string $mode, int $options, string &$opened_path = null) : bool
     59    public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null) : bool
    6060    {
    6161        $options = \stream_context_get_options($this->context);
     
    112112     *   blksize: int,
    113113     *   blocks: int
    114      * }
     114     * }|false
    115115     */
    116     public function stream_stat() : array
     116    public function stream_stat()
    117117    {
     118        if ($this->stream->getSize() === null) {
     119            return \false;
     120        }
    118121        static $modeMap = ['r' => 33060, 'rb' => 33060, 'r+' => 33206, 'w' => 33188, 'wb' => 33188];
    119122        return ['dev' => 0, 'ino' => 0, 'mode' => $modeMap[$this->mode], 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => $this->stream->getSize() ?: 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0];
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/UploadedFile.php

    r3032832 r3232769  
    4242     * @param StreamInterface|string|resource $streamOrFile
    4343     */
    44     public function __construct($streamOrFile, ?int $size, int $errorStatus, string $clientFilename = null, string $clientMediaType = null)
     44    public function __construct($streamOrFile, ?int $size, int $errorStatus, ?string $clientFilename = null, ?string $clientMediaType = null)
    4545    {
    4646        $this->setError($errorStatus);
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Uri.php

    r3032832 r3232769  
    217217     * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4
    218218     */
    219     public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) : bool
     219    public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null) : bool
    220220    {
    221221        if ($base !== null) {
  • activecampaign-for-woocommerce/trunk/ac_vendor/guzzlehttp/psr7/src/Utils.php

    r3032832 r3232769  
    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 = '';
     
    201201        }
    202202        return $buffer;
     203    }
     204    /**
     205     * Redact the password in the user info part of a URI.
     206     */
     207    public static function redactUserInfo(UriInterface $uri) : UriInterface
     208    {
     209        $userInfo = $uri->getUserInfo();
     210        if (\false !== ($pos = \strpos($userInfo, ':'))) {
     211            return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
     212        }
     213        return $uri;
    203214    }
    204215    /**
  • activecampaign-for-woocommerce/trunk/ac_vendor/laravel/serializable-closure/src/Serializers/Native.php

    r2950993 r3232769  
    298298                        continue;
    299299                    }
     300                    if (\PHP_VERSION >= 8.1 && $property->isReadOnly()) {
     301                        continue;
     302                    }
    300303                    $item = $property->getValue($data);
    301304                    if ($item instanceof SerializableClosure || $item instanceof UnsignedSerializableClosure || $item instanceof SelfReference && $item->hash === $this->code['self']) {
     
    385388                        continue;
    386389                    }
     390                    if (\PHP_VERSION >= 8.1 && $property->isReadOnly() && $property->class !== $reflection->name) {
     391                        continue;
     392                    }
    387393                    $value = $property->getValue($instance);
    388394                    if (\is_array($value) || \is_object($value)) {
  • activecampaign-for-woocommerce/trunk/ac_vendor/laravel/serializable-closure/src/Support/ReflectionClosure.php

    r3032832 r3232769  
    746746    }
    747747    /**
    748      * The the hash of the current file name.
     748     * The hash of the current file name.
    749749     *
    750750     * @return string
  • activecampaign-for-woocommerce/trunk/ac_vendor/psr/http-factory/src/UploadedFileFactoryInterface.php

    r2950993 r3232769  
    1616     * @param StreamInterface $stream Underlying stream representing the
    1717     *     uploaded file content.
    18      * @param int $size in bytes
     18     * @param int|null $size in bytes
    1919     * @param int $error PHP file upload error
    20      * @param string $clientFilename Filename as provided by the client, if any.
    21      * @param string $clientMediaType Media type as provided by the client, if any.
     20     * @param string|null $clientFilename Filename as provided by the client, if any.
     21     * @param string|null $clientMediaType Media type as provided by the client, if any.
    2222     *
    2323     * @return UploadedFileInterface
     
    2525     * @throws \InvalidArgumentException If the file resource is not readable.
    2626     */
    27     public function createUploadedFile(StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null) : UploadedFileInterface;
     27    public function createUploadedFile(StreamInterface $stream, ?int $size = null, int $error = \UPLOAD_ERR_OK, ?string $clientFilename = null, ?string $clientMediaType = null) : UploadedFileInterface;
    2828}
  • activecampaign-for-woocommerce/trunk/activecampaign-for-woocommerce.php

    r3227747 r3232769  
    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.8.3
     19 * Version:              2.8.4
    2020 * WC requires at least: 7.4.0
    21  * WC tested up to:      9.5.2
     21 * WC tested up to:      9.6.0
    2222 * Requires at least:    6.0
    2323 * Requires PHP:         7.4
  • activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin-historical-sync.php

    r3220303 r3232769  
    135135
    136136            wp_schedule_single_event(
    137                 time() + 10,
     137                time() + 30,
    138138                'activecampaign_for_woocommerce_prep_historical_data',
    139                 array()
     139                array('current_page' => 0)
    140140            );
    141141
  • activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin-wc-order-page.php

    r3220303 r3232769  
    7373
    7474        try {
    75             $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;
    76 
    77             if ( isset( $order->ID ) ) {
    78                 $wc_order_id = $order->ID;
     75            $wc_order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;
     76
     77            if ( isset( $wc_order->ID ) ) {
     78                $wc_order_id = $wc_order->ID;
    7979            } else {
    80                 $wc_order_id = $order->get_id();
    81             }
    82 
    83             $order = wc_get_order( $wc_order_id );
    84 
    85             if ( isset( $order ) && self::validate_object( $order, 'get_id' ) ) {
    86                 $table_data = $wpdb->get_row(
    87                     // phpcs:disable
    88                     $wpdb->prepare( 'SELECT id, synced_to_ac, ac_order_id, wc_order_id, ac_customer_id, abandoned_date, customer_email, ac_externalcheckoutid, customer_first_name, customer_last_name
    89                         FROM
    90                         `' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '`
    91                         WHERE wc_order_id = %d
    92                         LIMIT 1',
    93                         $wc_order_id
    94                     )
    95                     // phpcs:enable
    96                 );
    97 
    98                 if ( ! isset( $table_data, $table_data->id ) ) {
    99                     $order_ac    = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->check_for_synced_order( $wc_order_id );
    100                     $order_ac_id = $order_ac->get_id();
     80                $wc_order_id = $wc_order->get_id();
     81            }
     82
     83            $wc_order = wc_get_order( $wc_order_id );
     84
     85            if ( self::validate_object( $wc_order, 'get_id' ) ) {
     86                $table_data = self::get_table_data( $wc_order_id );
     87
     88                if ( ! isset( $table_data, $table_data->id, $table_data->ac_order_id ) ) {
     89                    $ac_order    = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->check_for_synced_order( $wc_order_id );
     90                    $order_ac_id = $ac_order->get_id();
    10191                }
    10292
    10393                if (
    104                     ! isset( $order_ac ) &&
     94                    ! isset( $ac_order ) &&
    10595                    isset( $table_data->synced_to_ac ) &&
    106                     in_array( $table_data->synced_to_ac, array( 0, '0' ) )
     96                    in_array( $table_data->synced_to_ac, array( self::STATUS_UNSYNCED, self::STATUS_ABANDONED_CART_UNSYNCED, self::STATUS_ABANDONED_CART_RECOVERED ) )
    10797                ) {
    108                     $order_ac    = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->check_for_synced_order( $wc_order_id );
    109                     $order_ac_id = $order_ac->get_id();
     98                    $ac_order    = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->check_for_synced_order( $wc_order_id );
     99                    $order_ac_id = $ac_order->get_id();
     100                }
     101
     102                if (
     103                    isset( $ac_order ) &&
     104                    self::validate_object( $ac_order, 'get_id' )
     105                ) {
     106                    $table_data->ac_order_id    = $ac_order->get_id();
     107                    $table_data->ac_customer_id = $ac_order->get_customerid();
     108                    self::save_table_data( $wc_order, $table_data );
    110109                }
    111110
    112111                if ( ! isset( $table_data, $table_data->id ) ) {
    113112                    if ( isset( $order_ac_id ) && ! empty( $order_ac_id ) ) {
    114                         self::save_table_data( $order, null, 1 );
     113                        self::save_table_data( $wc_order, null, 1 );
    115114                    }
    116115
     
    118117                }
    119118
    120                 $ac_contact = get_transient( 'activecampaign_for_woocommerce_contact' . $order->get_billing_email() );
    121 
    122                 if ( ! isset( $ac_contact ) || false === $ac_contact ) {
    123                     $ac_contact = $contact_repository->find_by_email( $order->get_billing_email() );
    124                     set_transient( 'activecampaign_for_woocommerce_contact' . $order->get_billing_email(), $ac_contact, 3600 );
    125                 }
    126 
    127                 if ( isset( $table_data ) && is_null( $table_data->customer_email ) ) {
    128                     self::save_table_data( $order, $table_data );
     119                $ac_contact = get_transient( 'activecampaign_for_woocommerce_contact' . $wc_order->get_billing_email() );
     120
     121                if ( ! isset( $ac_contact ) || false === $ac_contact || '' === $ac_contact ) {
     122                    $ac_contact = $contact_repository->find_by_email( $wc_order->get_billing_email() );
     123                    set_transient( 'activecampaign_for_woocommerce_contact' . $wc_order->get_billing_email(), $ac_contact, 300 );
     124                }
     125
     126                if ( isset( $table_data ) && is_null( $table_data->customer_email ) || ! isset( $table_data->ac_order_id ) ) {
     127                    self::save_table_data( $wc_order, $table_data );
    129128
    130129                    $table_data = self::get_table_data( $wc_order_id );
     
    132131
    133132                if (
    134                     isset( $order_ac_id ) &&
    135133                    ! empty( $order_ac_id ) &&
    136134                    isset( $table_data->synced_to_ac ) &&
    137135                    in_array( $table_data->synced_to_ac, array( 0, '0' ) )
    138136                ) {
    139                     $table_data->synced_to_ac = 1;
    140                     self::save_table_data( $order, $table_data );
     137                    self::save_table_data( $wc_order, $table_data );
    141138                }
    142139
    143140                if ( isset( $table_data ) ) {
    144                     $activecampaign_for_woocommerce_data = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->get_order_page_data( $table_data, $ac_contact );
    145                 }
     141                    $activecampaign_for_woocommerce_data                        = ( new Activecampaign_For_Woocommerce_Admin_WC_Order_Page() )->get_order_page_data( $table_data, $ac_contact );
     142                    $activecampaign_for_woocommerce_data['meta_abandoned_date'] = $wc_order->get_meta( 'activecampaign_for_woocommerce_abandoned_date', $wc_order_id );
     143                }
     144
    146145                require_once plugin_dir_path( __FILE__ ) . 'partials/activecampaign-for-woocommerce-order-meta.php';
    147146            }
    148147        } catch ( Throwable $t ) {
    149             $logger->warning( 'There was an issue retrieving or loading the order data for this page.', array( $post_or_order_object ) );
     148            $logger->warning( 'There was an issue retrieving or loading the order data for this page.', array($t->getMessage(), $post_or_order_object, 'trace' => $t->getTrace() ) );
    150149        }
    151150    }
     
    230229    }
    231230
     231    /**
     232     * Runs through a hook ac_ajax_sync_single_record.
     233     *
     234     * @return void
     235     */
    232236    public function ac_ajax_sync_single_record() {
    233237        $nonce = self::get_request_data( 'activecampaign_for_woocommerce_settings_nonce_field' );
     
    244248
    245249                if ( 'new' === $type ) {
     250                    $data['type'] = 'new';
    246251                    do_action( 'activecampaign_for_woocommerce_admin_sync_single_order_active', $data );
    247252                } elseif ( 'historical' === $type ) {
     253                    $data['type'] = 'historical';
    248254                    do_action( 'activecampaign_for_woocommerce_admin_sync_single_order_historical', $data );
    249255                }
     
    315321                }
    316322
     323                if ( isset( $table_data->ac_order_id ) ) {
     324                    $store_data['ac_order_id'] = $table_data->ac_order_id;
     325                }
     326
     327                if ( isset( $table_data->ac_customer_id ) ) {
     328                    $store_data['ac_customer_id'] = $table_data->ac_customer_id;
     329                }
     330
    317331                if ( isset( $status_override ) && ! empty( $status_override ) ) {
    318332                    $store_data['synced_to_ac'] = $status_override;
  • activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin.php

    r3227747 r3232769  
    124124        $this->contact_repository    = $contact_repository;
    125125        $this->api_client            = $api_client;
     126    }
     127
     128    public function cron_add_ten_minute( $schedules ) {
     129        // Adds once weekly to the existing schedules.
     130        $schedules['ten_minute'] = array(
     131            'interval' => 600,
     132            'display'  => __( 'Ten Minutes', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ),
     133        );
     134
     135        return $schedules;
    126136    }
    127137
     
    11641174                $this->is_configured()
    11651175            ) {
    1166                 wp_schedule_event( time() + 10, 'every_minute', 'activecampaign_for_woocommerce_cart_updated_recurring_event' );
    1167                 wp_schedule_event( time() + 10, 'every_minute', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME );
     1176                wp_schedule_event( time() + 10, 'ten_minute', 'activecampaign_for_woocommerce_cart_updated_recurring_event' );
     1177                wp_schedule_event( time() + 10, 'ten_minute', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME );
    11681178                wp_schedule_event( time() + 15, 'every_minute', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_HISTORICAL_RECUR );
    11691179            }
  • activecampaign-for-woocommerce/trunk/admin/partials/activecampaign-for-woocommerce-order-meta.php

    r2968938 r3232769  
    6363                        </p>
    6464                    <?php endif; ?>
    65 
    6665                    <?php if ( ! empty( $activecampaign_for_woocommerce_data['abandoned_date'] ) ) : ?>
    6766                        <p>
    6867                            <?php esc_html_e( 'This is a recovered order. Abandoned on: ', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?>
    69                             <?php echo esc_html( activecampaign_for_woocommerce_convert_date_to_local( $activecampaign_for_woocommerce_data['abandoned_date'] ) ); ?>
     68                            <?php if ( isset( $activecampaign_for_woocommerce_data['meta_abandoned_date'] ) ) : ?>
     69                                <?php echo esc_html( activecampaign_for_woocommerce_convert_date_to_local( $activecampaign_for_woocommerce_data['meta_abandoned_date'] ) ); ?>
     70                            <?php else : ?>
     71                                <?php echo esc_html( activecampaign_for_woocommerce_convert_date_to_local( $activecampaign_for_woocommerce_data['abandoned_date'] ) ); ?>
     72                            <?php endif; ?>
    7073                        </p>
    7174                    <?php endif; ?>
     
    117120        </div>
    118121
    119         <?php if ( $activecampaign_for_woocommerce_data['debug'] ) : ?>
     122        <?php if ( isset( $activecampaign_for_woocommerce_data['debug'] ) && in_array( $activecampaign_for_woocommerce_data['debug'], array( 1, '1') ) ) : ?>
    120123            <div style="margin-top:20px;border-top:1px solid #ccc;">
    121124                <h4><?php esc_html_e( 'ActiveCampaign Debug info', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?></h4>
  • activecampaign-for-woocommerce/trunk/admin/scripts/activecampaign-for-woocommerce-settings-page.js

    r3227747 r3232769  
    128128    // https://my-woocommerce-store.shop/**/products/{{sku}}
    129129    function validProductUrlPattern(pattern) {
    130         let validUrlPatternVariables = ['sku', 'storePrimaryId', 'storeBaseProductId', 'upc', 'baseProductSlug', 'variantSlug'];
     130        let validUrlPatternVariables = ['sku', 'storePrimaryId', 'storeBaseProductId', 'upc', 'baseProductUrlSlug', 'variantProductUrlSlug'];
    131131        const regexp = /\{\{(.*?)}}/g;
    132132
  • activecampaign-for-woocommerce/trunk/admin/views/activecampaign-for-woocommerce-abandoned-cart-display.php

    r3220303 r3232769  
    219219                                                ! empty( $activecampaign_for_woocommerce_ab_cart->order_date ) &&
    220220                                                ! empty( $activecampaign_for_woocommerce_ab_cart->abandoned_date ) &&
    221                                                 in_array( $activecampaign_for_woocommerce_ab_cart->synced_to_ac, array( 23, '23', 1, '1' ), true )
     221                                                in_array( $activecampaign_for_woocommerce_ab_cart->synced_to_ac, array( 23, '23', 1, '1', 0, '0' ), true )
    222222                                        ) :
    223223                                            ?>
     
    251251                                        if (
    252252                                                ( empty( $activecampaign_for_woocommerce_ab_cart->order_date ) && empty( $activecampaign_for_woocommerce_ab_cart->abandoned_date ) ) ||
    253                                                 in_array( $activecampaign_for_woocommerce_ab_cart->synced_to_ac, array( 0, 20, '0', '20' ), true )
     253                                                in_array( $activecampaign_for_woocommerce_ab_cart->synced_to_ac, array( 20, '20' ), true )
    254254                                        ) :
    255255                                            ?>
     
    335335                                            </div>
    336336                                            <?php
    337                                             $activecampaign_for_woocommerce_array_data = json_decode( $activecampaign_for_woocommerce_ab_cart->customer_ref_json, true );
    338                                             if ( is_array( $activecampaign_for_woocommerce_array_data ) ) {
    339                                                 echo nl2br( esc_html( activecampaign_for_woocommerce_parse_array( $activecampaign_for_woocommerce_array_data ) ) );
     337                                            if (isset( $activecampaign_for_woocommerce_ab_cart->customer_ref_json ) ) {
     338                                                $activecampaign_for_woocommerce_array_data = json_decode( $activecampaign_for_woocommerce_ab_cart->customer_ref_json, true );
     339                                                if ( is_array( $activecampaign_for_woocommerce_array_data ) ) {
     340                                                    echo nl2br( esc_html( activecampaign_for_woocommerce_parse_array( $activecampaign_for_woocommerce_array_data ) ) );
     341                                                } else {
     342                                                    echo 'There was an issue parsing this data.';
     343                                                }
     344                                            } else {
     345                                                echo 'Cart data could not be retrieved for this record.';
     346
    340347                                            }
    341348                                            ?>
     
    343350                                            <h2>Cart details</h2>
    344351                                            <?php
    345                                             $activecampaign_for_woocommerce_array_data = json_decode( $activecampaign_for_woocommerce_ab_cart->cart_ref_json, true );
    346                                             if ( is_array( $activecampaign_for_woocommerce_array_data ) ) {
    347                                                 echo nl2br( esc_html( activecampaign_for_woocommerce_parse_array( array_values( $activecampaign_for_woocommerce_array_data )[0] ) ) );
     352                                            if (isset( $activecampaign_for_woocommerce_ab_cart->cart_ref_json ) ) {
     353                                                $activecampaign_for_woocommerce_array_data = json_decode( $activecampaign_for_woocommerce_ab_cart->cart_ref_json, true );
     354                                                if ( is_array( $activecampaign_for_woocommerce_array_data ) ) {
     355                                                    echo nl2br( esc_html( activecampaign_for_woocommerce_parse_array( array_values( $activecampaign_for_woocommerce_array_data )[0] ) ) );
     356                                                } else {
     357                                                    echo '<h2>There was an issue parsing this data.</h2>';
     358                                                }
     359                                            } else {
     360                                                echo 'Cart data could not be retrieved for this record.';
     361
    348362                                            }
    349363                                            ?>
  • activecampaign-for-woocommerce/trunk/admin/views/activecampaign-for-woocommerce-admin-display.php

    r3227747 r3232769  
    4242    esc_html( sanitize_text_field( $activecampaign_for_woocommerce_external_id . '/?product={{storeBaseProductId}}' ) ),
    4343    esc_html( sanitize_text_field( $activecampaign_for_woocommerce_external_id . '/?**product={{storeBaseProductId}}&**' ) ),
    44     esc_html( sanitize_text_field( $activecampaign_for_woocommerce_external_id . '/product/{{storeBaseProductId}}' ) ),
    45     esc_html( sanitize_text_field( $activecampaign_for_woocommerce_external_id . '/shop/{{storeBaseProductId}}' ) ),
    46     esc_html( sanitize_text_field( $activecampaign_for_woocommerce_external_id . '/shop/**/{{storeBaseProductId}}' ) ),
     44    esc_html( sanitize_text_field( $activecampaign_for_woocommerce_external_id . '/product/{{baseProductUrlSlug}}' ) ),
     45    esc_html( sanitize_text_field( $activecampaign_for_woocommerce_external_id . '/product/{{baseProductUrlSlug}}/**' ) ),
     46    esc_html( sanitize_text_field( $activecampaign_for_woocommerce_external_id . '/shop/{{baseProductUrlSlug}}' ) ),
     47    esc_html( sanitize_text_field( $activecampaign_for_woocommerce_external_id . '/shop/**/{{baseProductUrlSlug}}' ) ),
     48
    4749);
    48 $activecampaign_for_woocommerce_optin_checkbox_text             = esc_html__( 'Keep me up to date on news and exclusive offers', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN );
    49 $activecampaign_for_woocommerce_optin_checkbox_display_option   = 'visible_checked_by_default';
    50 $activecampaign_for_woocommerce_custom_email_field              = esc_html__( 'billing_email', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN );
    51 $activecampaign_for_woocommerce_debug_excess                    = 0;
    52 $activecampaign_for_woocommerce_desc_select                     = '0';
    53 $activecampaign_for_woocommerce_browse_tracking                 = '0';
    54 $activecampaign_for_woocommerce_debug_disable_meta_save         = '0';
    55 $activecampaign_for_woocommerce_debug_disable_ots               = '0';
     50$activecampaign_for_woocommerce_optin_checkbox_text           = esc_html__( 'Keep me up to date on news and exclusive offers', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN );
     51$activecampaign_for_woocommerce_optin_checkbox_display_option = 'visible_checked_by_default';
     52$activecampaign_for_woocommerce_custom_email_field            = esc_html__( 'billing_email', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN );
     53$activecampaign_for_woocommerce_debug_excess                  = 0;
     54$activecampaign_for_woocommerce_desc_select                   = '0';
     55$activecampaign_for_woocommerce_browse_tracking               = '0';
     56$activecampaign_for_woocommerce_debug_disable_meta_save       = '0';
     57$activecampaign_for_woocommerce_debug_disable_ots             = '0';
    5658
    5759if ( is_array( $activecampaign_for_woocommerce_options ) ) {
     
    217219    '24' => esc_html__( '24 hours', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ),
    218220);
    219 $activecampaign_for_woocommerce_ba_product_url_valid_variables                    = array( 'sku', 'storePrimaryId', 'storeBaseProductId', 'upc', 'baseProductSlug', 'variantSlug' );
     221$activecampaign_for_woocommerce_ba_product_url_valid_variables                    = array( 'sku', 'storePrimaryId', 'storeBaseProductId', 'upc', 'baseProductUrlSlug', 'variantProductUrlSlug' );
    220222
    221223$activecampaign_for_woocommerce_ac_debug_options = array(
  • activecampaign-for-woocommerce/trunk/includes/abandoned_carts/class-activecampaign-for-woocommerce-cart-events.php

    r3220303 r3232769  
    1515use Activecampaign_For_Woocommerce_Save_Abandoned_Cart_Command as Abandoned_Cart;
    1616use Activecampaign_For_Woocommerce_Cofe_Browse_Session_Repository as Browse_Session_Repository;
     17use Activecampaign_For_Woocommerce_Synced_Status_Interface as Synced_Status;
    1718
    1819class Activecampaign_For_Woocommerce_Cart_Events {
    1920    use Activecampaign_For_Woocommerce_Data_Validation;
    2021    use Activecampaign_For_Woocommerce_Abandoned_Cart_Utilities;
    21 
     22    use Activecampaign_For_Woocommerce_Order_Data_Gathering;
    2223
    2324    /**
     
    134135         */
    135136        $logger = new Logger();
     137        if ( ! is_admin() && ! WC()->session->has_session() ) {
     138            WC()->session->set_customer_session_cookie( true );
     139        }
    136140
    137141        try {
     
    156160                if ( ! $user_id ) {
    157161                    // Guest checkout
    158                     $persistant_cart_id_name = $this->generate_externalcheckoutid(
     162                    $persistant_cart_id = $this->generate_externalcheckoutid(
    159163                        wc()->session->get_customer_id(),
    160164                        $order->get_billing_email()
     
    173177                    if ( $cart_id ) {
    174178                        // Registered user (customer) initiated cart and completed checkout
    175                         $persistant_cart_id_name = $cart_id;
     179                        $persistant_cart_id = $cart_id;
    176180                    } else {
    177181                        // Registered user (customer) only completed checkout (guest initiated cart)
     
    199203                        $woocommerce_session_hash = $woocommerce_session_cookie[0];
    200204
    201                         $persistant_cart_id_name = $this->generate_externalcheckoutid(
     205                        $persistant_cart_id = $this->generate_externalcheckoutid(
    202206                            $woocommerce_session_hash,
    203207                            $order->get_billing_email()
     
    209213                $order->add_meta_data(
    210214                    ACTIVECAMPAIGN_FOR_WOOCOMMERCE_PERSISTENT_CART_ID_NAME,
    211                     $persistant_cart_id_name,
     215                    $persistant_cart_id,
    212216                    true
    213217                );
    214                 // $order->update_meta_data(
    215                 // ACTIVECAMPAIGN_FOR_WOOCOMMERCE_PERSISTENT_CART_ID_NAME,
    216                 // $persistant_cart_id_name
    217                 // );
    218218
    219219                return $order;
  • activecampaign-for-woocommerce/trunk/includes/abandoned_carts/class-activecampaign-for-woocommerce-save-abandoned-cart-command.php

    r3220303 r3232769  
    6767        // Store the cart
    6868        try {
     69            if ( ! is_admin() && ! WC()->session->has_session() ) {
     70                WC()->session->set_customer_session_cookie( true );
     71            }
    6972            $this->prep_abandoned_cart_data();
    7073        } catch ( Throwable $e ) {
  • activecampaign-for-woocommerce/trunk/includes/class-activecampaign-for-woocommerce-plugin-upgrade.php

    r3220303 r3232769  
    364364        $this->logger->info( 'Plugin Upgrade Command: Table upgrade finished!' );
    365365        $this->disable_old_webhooks();
     366
     367        // v1.1.6 //
     368        // Clear the scheduled hooks and build new ten minute ones.
     369        wp_clear_scheduled_hook( 'activecampaign_for_woocommerce_cart_updated_recurring_event' );
     370        wp_clear_scheduled_hook( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME );
    366371    }
    367372
  • activecampaign-for-woocommerce/trunk/includes/class-activecampaign-for-woocommerce.php

    r3220303 r3232769  
    439439        }
    440440
     441        $this->loader->add_filter(
     442            'cron_schedules',
     443            $this->admin,
     444            'cron_add_ten_minute'
     445        );
     446
    441447        // Cart actions
    442448        $this->loader->add_action(
     
    462468            'woocommerce_checkout_update_order_meta',
    463469            $this->cart_events,
    464             'cart_emptied'
     470            'cart_emptied',
     471            60
    465472        );
    466473
     
    652659            $this->new_order_sync,
    653660            'execute',
    654             1,
     661            9,
    655662            2
    656663        );
     
    756763            $this->historical_sync,
    757764            'prep_data',
    758             1,
    759             2
     765            1
    760766        );
    761767
     
    867873            $this->new_subscription_sync,
    868874            'execute',
    869             2,
     875            8,
    870876            2
    871877        );
     
    963969        $this->loader->add_action(
    964970            'woocommerce_checkout_create_order',
     971            $this->cart_events,
     972            'cart_to_order_transition'
     973        );
     974
     975        // For blocks
     976        $this->loader->add_action(
     977            'woocommerce_store_api_checkout_order_processed',
    965978            $this->cart_events,
    966979            'cart_to_order_transition'
     
    12921305                );
    12931306
     1307                $this->loader->add_action(
     1308                    'woocommerce_store_api_checkout_order_processed',
     1309                    $this->add_accepts_marketing_to_customer_meta_command,
     1310                    'execute'
     1311                );
     1312
    12941313                // Add the checkbox to the billing form
    12951314                $this->loader->add_action(
  • activecampaign-for-woocommerce/trunk/includes/commands/class-activecampaign-for-woocommerce-add-accepts-marketing-to-customer-meta-command.php

    r3220303 r3232769  
    7373        if ( ! isset( $args[0] ) ) {
    7474            $this->logger->notice( 'Accepts Marketing: Valid order not passed in args.' );
    75             return;
     75            return $args;
    7676        }
    7777
  • activecampaign-for-woocommerce/trunk/includes/commands/class-activecampaign-for-woocommerce-create-or-update-connection-option-command.php

    r3220303 r3232769  
    356356                $this->repository->create( $connection_option );
    357357
    358                 $this->logger->info( 'Create or update connection option command:  single connection option created -' . $connection_option->get_option() );
     358                $this->logger->info( 'Create or update connection option command:  single connection option created -', ['option' => $connection_option->get_option(), 'value' => $connection_option->get_value()] );
    359359            } catch ( Throwable $t ) {
    360360                $this->admin->add_async_processing_notification(
     
    379379                $this->repository->update( $connection_option );
    380380
    381                 $this->logger->info( 'Create or update connection option command:  single connection option updated - ' . $connection_option->get_option() );
     381                $this->logger->info( 'Create or update connection option command:  single connection option updated - ', ['option' => $connection_option->get_option(), 'value' => $connection_option->get_value()] );
    382382            } catch ( Throwable $t ) {
    383383                $this->admin->add_async_processing_notification(
  • activecampaign-for-woocommerce/trunk/includes/config/activecampaign-for-woocommerce-global-constants.php

    r3227747 r3232769  
    2626 */
    2727if ( ! defined( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION' ) ) {
    28     define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.8.3' );
     28    define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.8.4' );
    2929}
    3030
     
    3636 */
    3737if ( ! defined( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_DB_VERSION' ) ) {
    38     define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_DB_VERSION', '1.1.5' );
     38    define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_DB_VERSION', '1.1.6' );
    3939}
    4040
  • activecampaign-for-woocommerce/trunk/includes/models/class-activecampaign-for-woocommerce-cofe-ecom-order.php

    r3189047 r3232769  
    10231023
    10241024        $this->set_accepts_marketing( $this->get_order_metadata( $order_data, 'activecampaign_for_woocommerce_accepts_marketing' ) );
     1025        $this->set_externalcheckoutid( $this->get_order_metadata( $order_data, 'activecampaign_for_woocommerce_external_checkout_id' ) );
    10251026
    10261027        if ( ! empty( $order_data['date_created'] ) ) {
  • activecampaign-for-woocommerce/trunk/includes/orders/class-activecampaign-for-woocommerce-new-order-created-event.php

    r3220303 r3232769  
    1515use Activecampaign_For_Woocommerce_Logger as Logger;
    1616use Activecampaign_For_Woocommerce_Customer_Utilities as Customer_Utilities;
     17use Activecampaign_For_Woocommerce_Synced_Status_Interface as Synced_Status;
    1718
    1819/**
     
    278279
    279280            if ( $this->is_renewal( $wc_order ) ) {
     281                // A renewal may not have set the external checkout ID so make sure it's set.
    280282                $wc_order->update_meta_data(
    281283                    ACTIVECAMPAIGN_FOR_WOOCOMMERCE_PERSISTENT_CART_ID_NAME,
     
    286288            $stored_row = $wpdb->get_row(
    287289                $wpdb->prepare(
    288                     'SELECT id, wc_order_id FROM ' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '
     290                    'SELECT id, wc_order_id, abandoned_date FROM ' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '
    289291                    WHERE wc_order_id = %d LIMIT 1',
    290292                    [ $order_id ]
     
    299301            $stored_row = $wpdb->get_row(
    300302                $wpdb->prepare(
    301                     'SELECT id, wc_order_id FROM ' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '
     303                    'SELECT id, wc_order_id, abandoned_date FROM ' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '
    302304                    WHERE ac_externalcheckoutid = %s OR activecampaignfwc_order_external_uuid = %s LIMIT 1',
    303305                    [ $externalcheckoutid, $cart_uuid ]
     
    316318            }
    317319
     320            $was_abandoned = false;
     321            if ( null !== $stored_row->abandoned_date ) {
     322                $was_abandoned = true;
     323            }
    318324            if (
    319325                isset( wc()->session ) &&
     
    418424        }
    419425
     426        if ( $was_abandoned ) {
     427            // Abandoned cart item mark as recovered in synced_to_ac
     428            $store_data['synced_to_ac'] = Synced_Status::STATUS_ABANDONED_CART_RECOVERED;
     429        }
     430
    420431        try {
    421             if ( isset( $stored_id ) && ! empty( $stored_id ) ) {
     432            if ( ! empty( $abandoned_cart_id ) ) {
     433                // Abandoned cart item mark as recovered in synced_to_ac
     434                $store_data['synced_to_ac'] = Synced_Status::STATUS_ABANDONED_CART_RECOVERED;
     435                $wpdb->update(
     436                    $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME,
     437                    $store_data,
     438                    array(
     439                        'id' => $abandoned_cart_id,
     440                    )
     441                );
     442            } elseif ( isset( $stored_id ) && ! empty( $stored_id ) ) {
     443                if ( $was_abandoned ) {
     444                    // Abandoned cart item mark as recovered in synced_to_ac
     445                    $store_data['synced_to_ac'] = Synced_Status::STATUS_ABANDONED_CART_RECOVERED;
     446                }
    422447                $wpdb->update(
    423448                    $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME,
     
    429454
    430455                $this->schedule_sync_job( $order_id );
    431             } elseif ( ! empty( $abandoned_cart_id ) ) {
    432                 // Abandoned cart item mark as recovered in synced_to_ac
    433                 $wpdb->update(
    434                     $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME,
    435                     $store_data,
    436                     array(
    437                         'id' => $abandoned_cart_id,
    438                     )
    439                 );
    440456            } else {
     457
    441458                if ( ! isset( $stored_id ) ) {
    442459                    $stored_id = null;
     
    488505            // wp_clear_scheduled_hook('activecampaign_for_woocommerce_cart_updated_recurring_event');
    489506            if ( ! wp_next_scheduled( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME ) ) {
    490                 wp_schedule_event( time() + 10, 'every_minute', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME );
     507                wp_schedule_event( time() + 10, 'ten_minute', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME, null, true );
    491508            } elseif ( function_exists( 'wp_get_scheduled_event' ) ) {
    492509                $logger->debug_excess(
     
    512529     * Schedules the sync job.
    513530     *
    514      * @param int $row_id The row id.
    515      */
    516     private function schedule_sync_job( $row_id ) {
     531     * @param int $order_id The order id.
     532     */
     533    private function schedule_sync_job( $order_id ) {
    517534        try {
    518             if ( ! wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME, array( 'row_id' => $row_id ) ) ) {
     535            if ( ! wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME, array( 'wc_order_id' => $order_id, 'event' => 'onetime' ) ) ) {
    519536                wp_schedule_single_event(
    520                     time() + 10,
    521                     ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME,
     537                    time() + 40,
     538                    'activecampaign_for_woocommerce_admin_sync_single_order_active',
    522539                    array(
    523                         'row_id' => $row_id,
    524                     )
     540                        'wc_order_id' => $order_id,
     541                        'event'       => 'onetime',
     542                    ),
     543                    true
    525544                );
    526545            }
     
    529548                'Schedule finished order for immediate sync.',
    530549                array(
    531                     'row_id'       => $row_id,
    532                     'current_time' => time() + 10,
    533                     'schedule'     => wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME, array( 'row_id' => $row_id ) ),
     550                    'wc_order_id'         => $order_id,
     551                    'current_time'        => time(),
     552                    'scheduled_time'      => time() + 40,
     553                    'schedule validation' => wp_get_scheduled_event( 'activecampaign_for_woocommerce_admin_sync_single_order_active', array( 'wc_order_id' => $order_id, 'event' => 'onetime' ) ),
    534554                )
    535555            );
  • activecampaign-for-woocommerce/trunk/includes/orders/class-activecampaign-for-woocommerce-new-order-sync-job.php

    r3220303 r3232769  
    204204            );
    205205        }
     206
     207        return $args;
    206208    }
    207209
     
    241243                    return false;
    242244                }
     245
     246                $this->add_meta_to_order( $wc_order );
    243247
    244248                $ac_customer_id = $this->get_ac_customer_id( $wc_order->get_billing_email() );
     
    299303                $last_run = get_option( 'activecampaign_for_woocommerce_abandoned_cart_last_run' );
    300304
    301                 // Try and keep this event from running too many times.
    302                 // The cron will run every minute but this needs to run every 10 instead.
    303                 if ( false !== $last_run ) {
    304                     $interval         = date_diff( $now, $last_run );
    305                     $interval_minutes = $interval->format( '%i' );
    306                 } else {
    307                     $interval_minutes = 10;
    308                 }
    309 
    310                 if ( ! isset( $interval_minutes ) || empty( $interval_minutes ) || $interval_minutes >= 10 ) {
    311                     $unsynced_order_data = $this->get_unsynced_orders_from_table( null, false );
    312                     $recovered_orders    = $this->get_unsynced_orders_from_table( null, true );
    313                 }
     305                $unsynced_order_data = $this->get_unsynced_orders_from_table( null, false );
     306                $recovered_orders    = $this->get_unsynced_orders_from_table( null, true );
     307
    314308            }
    315309        } catch ( Throwable $t ) {
     
    348342            );
    349343        }
     344
     345        return $args;
    350346    }
    351347
     
    494490     *
    495491     * @param WC_Order $wc_order The WC order.
    496      * @param string   $externalcheckoutid The external checkout ID passed only if it's recovered order.
     492     * @param string   $externalcheckoutid The external checkout ID passed only if it's an unsynced recovered order.
    497493     *
    498494     * @return false|void
     
    543539
    544540            $result = $this->cofe_order_repository->upsert_order( $ecom_order->serialize_to_array() );
    545 
     541            delete_transient( 'activecampaign_for_woocommerce_contact' . $wc_order->get_billing_email() );
    546542            // Change this to return the response from AC if we have a data response
    547543            return $result;
     
    730726            // Get the expired carts from our table
    731727            if ( null !== $id ) {
     728                // We have an order ID, get that specific one.
    732729                if ( true === $recovered ) {
    733730                    $where = 'abandoned_date IS NOT NULL';
     
    755752                );
    756753
     754            } elseif ( true === $recovered ) {
     755                    $orders = $wpdb->get_results(
     756                    // phpcs:disable
     757                        $wpdb->prepare( 'SELECT id, wc_order_id, ac_externalcheckoutid, customer_email, ac_customer_id
     758                    FROM
     759                        `' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '`
     760                    WHERE
     761                        wc_order_id IS NOT NULL
     762                        AND abandoned_date IS NOT NULL
     763                        AND (
     764                            synced_to_ac = %d
     765                            OR synced_to_ac = %d
     766                            )
     767                        ORDER BY id ASC
     768                        LIMIT 50',
     769                            self::STATUS_ABANDONED_CART_RECOVERED, self::STATUS_UNSYNCED
     770
     771                        )
     772                    // phpcs:enable
     773                    );
    757774            } else {
    758                 if ( true === $recovered ) {
    759                     $where = 'AND abandoned_date IS NOT NULL';
    760                 } else {
    761                     $where = 'AND abandoned_date IS NULL';
    762                 }
    763 
    764775                $orders = $wpdb->get_results(
    765776                // phpcs:disable
     
    769780                    WHERE
    770781                        wc_order_id IS NOT NULL
    771                         '.$where.'
     782                        AND abandoned_date IS NULL
    772783                        AND synced_to_ac = %d
    773784                        ORDER BY id ASC
    774                         LIMIT 100',
     785                        LIMIT 50',
    775786                        0
    776787
     
    855866            $wc_order->add_meta_data( 'ac_datahash', md5( json_encode( $wc_order->get_data() ) ), true );
    856867        }
    857         $disable_meta_save = false;
    858         $settings          = get_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_DB_SETTINGS_NAME );
    859         if (isset( $settings['disable_meta_save'] ) ) {
    860             $disable_meta_save = $settings['disable_meta_save'];
    861         }
    862         if ( false === $disable_meta_save ) {
    863             $wc_order->save_meta_data();
    864         }
     868
     869        // Update order meta with relevant data from the stored data so we do not lose it
     870        global $wpdb;
     871        $ac_stored_row = $wpdb->get_row(
     872        // phpcs:disable
     873             $wpdb->prepare( 'SELECT id, wc_order_id, ac_externalcheckoutid, customer_email, abandoned_date, ac_customer_id
     874                        FROM
     875                            `' . $wpdb->prefix . ACTIVECAMPAIGN_FOR_WOOCOMMERCE_TABLE_NAME . '`
     876                        WHERE wc_order_id = %s
     877                            LIMIT 1',
     878                $wc_order->get_id()
     879
     880            )
     881        // phpcs:enable
     882        );
     883
     884        if (isset( $ac_stored_row->ac_externalcheckoutid ) && ! empty( $ac_stored_row->ac_externalcheckoutid ) ) {
     885            $wc_order->add_meta_data(
     886                ACTIVECAMPAIGN_FOR_WOOCOMMERCE_PERSISTENT_CART_ID_NAME,
     887                $ac_stored_row->ac_externalcheckoutid,
     888                true
     889            );
     890        }
     891
     892        if ( ! empty( $ac_stored_row->abandoned_date ) ) {
     893            $wc_order->add_meta_data(
     894                'activecampaign_for_woocommerce_abandoned_date',
     895                $ac_stored_row->abandoned_date,
     896                false
     897            );
     898
     899        }
     900
     901        $settings = get_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_DB_SETTINGS_NAME );
     902
     903        if ( isset( $settings['disable_meta_save'] ) && 1 === $settings['disable_meta_save'] ) {
     904            return;
     905        }
     906
     907        $wc_order->save_meta_data();
    865908    }
    866909}
  • activecampaign-for-woocommerce/trunk/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php

    r3220303 r3232769  
    127127                    wp_schedule_single_event(
    128128                        time() + 10,
    129                         'activecampaign_for_woocommerce_admin_sync_single_order_active',
     129                        'activecampaign_for_woocommerce_admin_sync_single_order_status',
    130130                        array(
    131131                            'wc_order_id' => $order_id,
  • activecampaign-for-woocommerce/trunk/includes/orders/historical/class-activecampaign-for-woocommerce-historical-sync-prep.php

    r3220303 r3232769  
    198198                self::STATUS_ON_HOLD,
    199199                self::STATUS_REFUND,
     200                self::STATUS_ABANDONED_CART_RECOVERED,
    200201            )
    201202        );
  • activecampaign-for-woocommerce/trunk/includes/orders/trait-activecampaign-for-woocommerce-synced-status-handler.php

    r3220303 r3232769  
    7272        ),
    7373        23 => array(
    74             'title' => 'Abandoned cart recovered',
    75             'help'  => '',
     74            'title' => 'Abandoned cart recovered, not synced',
     75            'help'  => 'This order was abandoned, recovered, but has not been synced.',
    7676        ),
    7777        24 => array(
     
    126126
    127127    public function get_readable_sync_status( $status_ref ) {
    128         $mappings = $this->readable_status_mapping;
     128        $status_ref = (int) $status_ref;
     129        $mappings   = $this->readable_status_mapping;
    129130
    130131        foreach ( $mappings as $local_numeric => $readable ) {
    131             if ( $status_ref == $local_numeric ) {
     132            if ( $status_ref === $local_numeric ) {
    132133                return $readable;
    133134            }
  • activecampaign-for-woocommerce/trunk/includes/subscriptions/class-activecampaign-for-woocommerce-new-subscription-sync-job.php

    r3220303 r3232769  
    602602        if ( isset( $wc_order_id ) && ! empty( $wc_order_id ) ) {
    603603            $this->execute( array( 'wc_order_id' => $wc_order_id ) );
     604            return $args;
    604605        } else {
    605606            return false;
     
    628629            $wc_subscription->add_meta_data( 'ac_datahash', md5( json_encode( $wc_subscription->get_data() ) ), true );
    629630        }
    630         $disable_meta_save = false;
    631         $settings          = get_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_DB_SETTINGS_NAME );
    632         if ( isset( $settings['disable_meta_save'] ) ) {
    633             $disable_meta_save = $settings['disable_meta_save'];
    634         }
    635         if ( false === $disable_meta_save ) {
    636             $wc_subscription->save_meta_data();
    637         }
     631
     632        $settings = get_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_DB_SETTINGS_NAME );
     633        if ( isset( $settings['disable_meta_save'] ) && 1 === $settings['disable_meta_save'] ) {
     634            return;
     635        }
     636
     637        $wc_subscription->save_meta_data();
    638638    }
    639639}
  • activecampaign-for-woocommerce/trunk/includes/subscriptions/class-activecampaign-for-woocommerce-subscription-events.php

    r3220303 r3232769  
    114114
    115115            if ( isset( $subscription_id ) && null !== $subscription_id && ! empty( $subscription_id ) ) {
    116                 if ( ! wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME, array( 'wc_order_id' => $subscription_id ) ) ) {
     116                if ( ! wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME, array( 'wc_order_id' => $subscription_id, 'event' => 'onetime' ) ) ) {
    117117                    wp_schedule_single_event(
    118118                        time() + 30,
    119119                        'activecampaign_for_woocommerce_update_subscription',
    120                         array( 'wc_order_id' => $subscription_id )
     120                        array( 'wc_order_id' => $subscription_id, 'event' => 'onetime' ),
     121                        true
    121122                    );
    122123                }
     
    158159            $this->update_status( $wc_subscription, 0 );
    159160            if ( isset( $subscription_id ) && null !== $subscription_id && ! empty( $subscription_id ) ) {
    160                 if ( ! wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME, array( 'wc_order_id' => $subscription_id ) ) ) {
     161                if ( ! wp_get_scheduled_event( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_RUN_NEW_ORDER_SYNC_NAME, array( 'wc_order_id' => $subscription_id, 'event' => 'onetime' ) ) ) {
    161162                    wp_schedule_single_event(
    162163                        time() + 30,
    163164                        'activecampaign_for_woocommerce_update_subscription',
    164                         array( 'wc_order_id' => $subscription_id )
     165                        array( 'wc_order_id' => $subscription_id, 'event' => 'onetime' ),
     166                        true
    165167                    );
    166168                }
  • activecampaign-for-woocommerce/trunk/includes/traits/class-activecampaign-for-woocommerce-interacts-with-api-trait.php

    r3220303 r3232769  
    6464
    6565                if ( ! is_object( $result ) || ! self::validate_object( $result, 'getBody' ) ) {
    66                     $logger->debug(
     66                    $logger->debug_excess(
    6767                        'Result of get and set model from get_and_set_model_properties_from_api_by_id',
    6868                        array(
Note: See TracChangeset for help on using the changeset viewer.