Plugin Directory

Changeset 3341145


Ignore:
Timestamp:
08/07/2025 03:19:30 PM (8 months ago)
Author:
acteamintegrations
Message:

Version 2.10.1

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

Legend:

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

    r3307195 r3341145  
    44Requires at least: 6.0
    55Tested up to: 6.8.1
    6 Stable tag: 2.10.0
     6Stable tag: 2.10.1
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    9696== Changelog ==
    9797
     98= 2.10.1 2025-08-07 =
     99* Fix - Distinction between user ID and customer ID when syncing order
     100* Fix - Syncing order multiple times causing automations to run twice
     101
    98102= 2.10.0 2025-05-15 =
    99103* Improvement - Accepts marketing support for WooCommerce Blocks added
  • activecampaign-for-woocommerce/trunk/ac_vendor/autoload.php

    r3307195 r3341145  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit1b745f4bb5309cf35a328c2aacb791d4::getLoader();
     7return ComposerAutoloaderInit3e2cba0abd503ac7ca9bd25b616cc324::getLoader();
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/autoload_real.php

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

    r3307195 r3341145  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit1b745f4bb5309cf35a328c2aacb791d4
     7class ComposerStaticInit3e2cba0abd503ac7ca9bd25b616cc324
    88{
    99    public static $files = array (
     
    494494    {
    495495        return \Closure::bind(function () use ($loader) {
    496             $loader->prefixLengthsPsr4 = ComposerStaticInit1b745f4bb5309cf35a328c2aacb791d4::$prefixLengthsPsr4;
    497             $loader->prefixDirsPsr4 = ComposerStaticInit1b745f4bb5309cf35a328c2aacb791d4::$prefixDirsPsr4;
    498             $loader->classMap = ComposerStaticInit1b745f4bb5309cf35a328c2aacb791d4::$classMap;
     496            $loader->prefixLengthsPsr4 = ComposerStaticInit3e2cba0abd503ac7ca9bd25b616cc324::$prefixLengthsPsr4;
     497            $loader->prefixDirsPsr4 = ComposerStaticInit3e2cba0abd503ac7ca9bd25b616cc324::$prefixDirsPsr4;
     498            $loader->classMap = ComposerStaticInit3e2cba0abd503ac7ca9bd25b616cc324::$classMap;
    499499
    500500        }, null, ClassLoader::class);
  • activecampaign-for-woocommerce/trunk/activecampaign-for-woocommerce.php

    r3307195 r3341145  
    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.10.0
     19 * Version:              2.10.1
    2020 * WC requires at least: 7.4.0
    2121 * WC tested up to:      9.8.5
  • activecampaign-for-woocommerce/trunk/admin/scripts/activecampaign-for-woocommerce-settings-page.js

    r3242090 r3341145  
    127127    const form = $('#activecampaign-for-woocommerce-options-form');
    128128   
    129     // https://my-woocommerce-store.shop/**/products/{{sku}}
     129    // https://my-woocommerce-store.shop/**/products/{{variantSku}}
    130130    function validProductUrlPattern(pattern) {
    131         let validUrlPatternVariables = ['sku', 'storePrimaryId', 'storeBaseProductId', 'upc', 'baseProductUrlSlug', 'variantProductUrlSlug'];
     131        let validUrlPatternVariables = ['variantSku', 'storePrimaryId', 'storeBaseProductId', 'upc', 'baseProductUrlSlug', 'variantProductUrlSlug'];
    132132        const regexp = /\{\{(.*?)}}/g;
    133133        if('' === pattern) {
     
    140140        }
    141141        // Variable validations
    142         // https://my-woocommerce-store.shop/**/products/{{sku}}/{{id}}
     142        // https://my-woocommerce-store.shop/**/products/{{variantSku}}/{{id}}
    143143        // https://my-woocommerce-store.shop/**/products/{{id}}
    144144        const matches = [...pattern.matchAll(regexp)]
     
    152152        }
    153153        // Wildcard next To Variable Validation
    154         // https://example.com/**{{sku}}
     154        // https://example.com/**{{variantSku}}
    155155        if(pattern.includes('**{{') || pattern.includes('}}**')) {
    156156            return false;
  • activecampaign-for-woocommerce/trunk/admin/views/activecampaign-for-woocommerce-admin-display.php

    r3307195 r3341145  
    232232}
    233233
    234 $activecampaign_for_woocommerce_ba_product_url_valid_variables = array( 'sku', 'storePrimaryId', 'storeBaseProductId', 'upc', 'baseProductUrlSlug', 'variantProductUrlSlug' );
     234$activecampaign_for_woocommerce_ba_product_url_valid_variables = array( 'variantSku', 'storePrimaryId', 'storeBaseProductId', 'upc', 'baseProductUrlSlug', 'variantProductUrlSlug' );
    235235
    236236$activecampaign_for_woocommerce_ac_debug_options = array(
  • activecampaign-for-woocommerce/trunk/includes/config/activecampaign-for-woocommerce-global-constants.php

    r3307195 r3341145  
    2626 */
    2727if ( ! defined( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION' ) ) {
    28     define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.10.0' );
     28    define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.10.1' );
    2929}
    3030
  • activecampaign-for-woocommerce/trunk/includes/events/class-activecampaign-for-woocommerce-scheduler-handler.php

    r3284304 r3341145  
    236236    }
    237237
     238    public static function remove_scheduled_ac_event( $event, $args = array() ) {
     239        ( new Activecampaign_For_Woocommerce_Scheduler_Handler() )->clear_single_event( $event, $args );
     240    }
     241
    238242    /**
    239243     * Schedules all events in the recurring list.
  • activecampaign-for-woocommerce/trunk/includes/models/class-activecampaign-for-woocommerce-cofe-ecom-order.php

    r3232769 r3341145  
    3333        set_properties_from_serialized_array as set_all_but_products_as_properties_from_serialized_array;
    3434    }
     35
     36    /**
     37     * CID - customer id
     38     * UID - registered user id
     39     * Related to DEFECT-30172 - Old order are syncing into new customer orders
     40     * We need to distinct customer and user ids, so we don't send duplicates
     41     */
     42    public const CUSTOMER_ID = 'CID';
     43    public const USER_ID = 'UID';
    3544
    3645    /**
     
    409418     */
    410419    public function set_currency( $currency ) {
    411         $this->currency = $currency;
     420        $this->currency = strtolower( $currency );
    412421    }
    413422
     
    9981007        }
    9991008        if ( isset( $order_data['customer_id'] ) ) {
    1000             // this is ok
    1001             $this->set_wc_customer_id( $order_data['customer_id'] );
     1009            $customer_id = $order_data['customer_id'];
     1010            if ( ! in_array( $customer_id, array( 0, '0', null ), true ) ) {
     1011                $customer_id = self::USER_ID . '-' . $customer_id;
     1012            }
     1013
     1014            $this->set_wc_customer_id( $customer_id );
    10021015        }
    10031016
  • activecampaign-for-woocommerce/trunk/includes/models/class-activecampaign-for-woocommerce-ecom-order.php

    r3220303 r3341145  
    310310     */
    311311    public function set_currency( $currency ) {
    312         $this->currency = $currency;
     312        $this->currency = strtolower( $currency );
    313313    }
    314314
  • activecampaign-for-woocommerce/trunk/includes/orders/class-activecampaign-for-woocommerce-cofe-order-builder.php

    r3220303 r3341145  
    351351            if ( ! is_null( $order ) && self::validate_object( $order, 'get_customer_id' ) && ! empty( $order->get_customer_id() ) ) {
    352352
    353                 return $order->get_customer_id();
     353                return Cofe_Ecom_Order::USER_ID . '-' . $order->get_customer_id();
    354354            }
    355355
    356356            if ( ! is_null( $order ) && self::validate_object( $order, 'get_user_id' ) && ! empty( $order->get_user_id() ) ) {
    357357
    358                 return $order->get_user_id();
     358                return Cofe_Ecom_Order::USER_ID . '-' . $order->get_user_id();
    359359            }
    360360        } catch ( Throwable $t ) {
     
    379379
    380380            if ( isset( $customer_row ) && ! empty( $customer_row->customer_id ) ) {
    381                 return $customer_row->customer_id;
     381                return Cofe_Ecom_Order::CUSTOMER_ID . '-' . $customer_row->customer_id;
    382382            }
    383383        } catch ( Throwable $t ) {
  • activecampaign-for-woocommerce/trunk/includes/orders/class-activecampaign-for-woocommerce-new-order-created-event.php

    r3284304 r3341145  
    579579    private function schedule_sync_job( $order_id ) {
    580580        try {
    581             if ( ! AC_Scheduler::is_scheduled( AC_Scheduler::SYNC_ONE_ORDER_ACTIVE, array( 'wc_order_id' => $order_id, 'event' => 'onetime' ) ) ) {
    582                 AC_Scheduler::schedule_ac_event(
    583                     AC_Scheduler::SYNC_ONE_ORDER_ACTIVE,
     581            if ( AC_Scheduler::is_scheduled( AC_Scheduler::SYNC_ONE_ORDER_ACTIVE, array( 'wc_order_id' => $order_id, 'event' => 'onetime' ) ) ) {
     582                AC_Scheduler::remove_scheduled_ac_event( AC_Scheduler::SYNC_ONE_ORDER_ACTIVE, array( 'wc_order_id' => $order_id, 'event' => 'onetime' ) );
     583
     584                $this->logger->debug(
     585                    'Removed finished order for immediate sync (duplicate job for single order).',
    584586                    array(
    585587                        'wc_order_id' => $order_id,
    586                         'event'       => 'onetime',
    587                     ),
    588                     false,
    589                     false
     588                        'event' => 'onetime',
     589                    )
    590590                );
    591591            }
     592
     593            AC_Scheduler::schedule_ac_event(
     594                AC_Scheduler::SYNC_ONE_ORDER_ACTIVE,
     595                array(
     596                    'wc_order_id' => $order_id,
     597                    'event'       => 'onetime',
     598                ),
     599                false,
     600                false
     601            );
    592602
    593603            $this->logger->debug(
     
    597607                    'current_time'        => time(),
    598608                    'scheduled_time'      => time() + 40,
    599                     'schedule validation' => AC_Scheduler::get_schedule( AC_Scheduler::SYNC_ONE_ORDER_ACTIVE, array( 'wc_order_id' => $order_id, 'event' => 'onetime' ) ),
     609                    'schedule_validation' => AC_Scheduler::get_schedule( AC_Scheduler::SYNC_ONE_ORDER_ACTIVE, array( 'wc_order_id' => $order_id, 'event' => 'onetime' ) ),
    600610                )
    601611            );
  • activecampaign-for-woocommerce/trunk/includes/subscriptions/models/class-activecampaign-for-woocommerce-subscription-model.php

    r3220303 r3341145  
    809809     */
    810810    public function set_currency( $currency ) {
    811         $this->currency = $currency;
     811        $this->currency = strtolower( $currency );
    812812    }
    813813
Note: See TracChangeset for help on using the changeset viewer.