Plugin Directory

Changeset 2994180


Ignore:
Timestamp:
11/10/2023 08:14:48 PM (2 years ago)
Author:
acteamintegrations
Message:

Version 2.5.1

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

Legend:

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

    r2988259 r2994180  
    33Tags: marketing, ecommerce, woocommerce, email, activecampaign, abandoned cart
    44Requires at least: 6.0
    5 Tested up to: 6.3.2
    6 Stable tag: 2.5.0
     5Tested up to: 6.4.1
     6Stable tag: 2.5.1
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    4848
    4949= WooCommerce Compatibility =
    50 * Tested up to version: 8.2.1
     50* Tested up to version: 8.3.0
    5151* Minimal version requirement: 7.0.0
    5252* HPOS Compatible
     
    8484== Changelog ==
    8585
     86== 2.5.1 2023-11-10 ==
     87* Bugfix for product types missing from product sync
     88* Deprecating connection option id
     89
    8690== 2.5.0 2023-11-02 ==
    8791* Adding save option to support logs
  • activecampaign-for-woocommerce/trunk/ac_vendor/autoload.php

    r2988259 r2994180  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitbf676c12852dd0e3db88a089cf454723::getLoader();
     7return ComposerAutoloaderInit1ad1f41efc084e1ae73102c451263a68::getLoader();
  • activecampaign-for-woocommerce/trunk/ac_vendor/composer/autoload_real.php

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

    r2988259 r2994180  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitbf676c12852dd0e3db88a089cf454723
     7class ComposerStaticInit1ad1f41efc084e1ae73102c451263a68
    88{
    99    public static $files = array (
     
    476476    {
    477477        return \Closure::bind(function () use ($loader) {
    478             $loader->prefixLengthsPsr4 = ComposerStaticInitbf676c12852dd0e3db88a089cf454723::$prefixLengthsPsr4;
    479             $loader->prefixDirsPsr4 = ComposerStaticInitbf676c12852dd0e3db88a089cf454723::$prefixDirsPsr4;
    480             $loader->classMap = ComposerStaticInitbf676c12852dd0e3db88a089cf454723::$classMap;
     478            $loader->prefixLengthsPsr4 = ComposerStaticInit1ad1f41efc084e1ae73102c451263a68::$prefixLengthsPsr4;
     479            $loader->prefixDirsPsr4 = ComposerStaticInit1ad1f41efc084e1ae73102c451263a68::$prefixDirsPsr4;
     480            $loader->classMap = ComposerStaticInit1ad1f41efc084e1ae73102c451263a68::$classMap;
    481481
    482482        }, null, ClassLoader::class);
  • activecampaign-for-woocommerce/trunk/activecampaign-for-woocommerce.php

    r2988259 r2994180  
    1717 * Plugin URI:           https://www.activecampaign.com/
    1818 * Description:          Add Abandoned Cart functionality to your WooCommerce store, synchronize order & customer information using ActiveCampaign.
    19  * Version:              2.5.0
     19 * Version:              2.5.1
    2020 * WC requires at least: 7.4
    2121 * WC tested up to:      8.2.0
  • activecampaign-for-woocommerce/trunk/admin/class-activecampaign-for-woocommerce-admin.php

    r2973117 r2994180  
    909909
    910910        update_option( ACTIVECAMPAIGN_FOR_WOOCOMMERCE_DB_CONNECTION_STORAGE_NAME, $data );
     911
    911912        delete_transient( 'activecampaign_for_woocommerce_all_connections' );
    912913        delete_transient( 'activecampaign_for_woocommerce_connection' );
  • activecampaign-for-woocommerce/trunk/admin/scripts/activecampaign-for-woocommerce-connection-settings.js

    r2931548 r2994180  
    110110    function rowStatusSuccess(id, tooltip){
    111111        updateRowStatus(id, 'Success', 'success', tooltip);
     112        setTimeout(function(){document.location.reload()}, 1000);
    112113    }
    113114
  • activecampaign-for-woocommerce/trunk/admin/trait-activecampaign-for-woocommerce-admin-connections.php

    r2966088 r2994180  
    205205                delete_option( 'activecampaign_for_woocommerce_connection_health_check_last_run' );
    206206                $this->update_storage_from_connection( $connection );
     207
    207208                wp_send_json_success( 'Connection saved.' );
    208209            }
  • activecampaign-for-woocommerce/trunk/admin/views/activecampaign-for-woocommerce-admin-display.php

    r2977226 r2994180  
    5656    }
    5757
     58    $activecampaign_for_woocommerce_connection_created_in = 'WooCommerce';
     59
    5860    if ( isset( $activecampaign_for_woocommerce_storage['is_internal'] ) ) {
    59         if ( 1 === $activecampaign_for_woocommerce_storage['is_internal'] ) {
     61        if ( 1 === $activecampaign_for_woocommerce_storage['is_internal'] || '1' === $activecampaign_for_woocommerce_storage['is_internal'] ) {
    6062            $activecampaign_for_woocommerce_connection_created_in = 'ActiveCampaign';
    61         } else {
    62             $activecampaign_for_woocommerce_connection_created_in = 'WooCommerce';
    6363        }
    6464    }
     
    8282    if ( isset( $activecampaign_for_woocommerce_storage['connection_id'] ) ) {
    8383        $activecampaign_for_woocommerce_connection_id = $activecampaign_for_woocommerce_storage['connection_id'];
    84     }
    85 
    86     $activecampaign_for_woocommerce_connection_option_id = 'UNKNOWN';
    87     if ( isset( $activecampaign_for_woocommerce_storage['connection_option_id'] ) ) {
    88         $activecampaign_for_woocommerce_connection_option_id = $activecampaign_for_woocommerce_storage['connection_option_id'];
    8984    }
    9085
     
    662657                                <p>
    663658                                    <?php
    664                                     esc_html_e( 'ActiveCampaign connection option ID: ', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN );
     659                                    esc_html_e( 'Connection managed in: ', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN );
    665660                                    ?>
    666                                     <?php if ( ! isset( $activecampaign_for_woocommerce_connection_option_id ) ) : ?>
    667                                         <?php esc_html_e( 'Error: No connection option ID found in settings! ', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?>
     661                                    <?php if ( ! isset( $activecampaign_for_woocommerce_connection_created_in ) ) : ?>
     662                                        <?php esc_html_e( 'Error: connection source not determined! ', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?>
    668663                                    <?php else : ?>
    669                                         <?php echo esc_html( $activecampaign_for_woocommerce_connection_option_id ); ?>
     664                                        <?php echo esc_html( $activecampaign_for_woocommerce_connection_created_in ); ?>
    670665                                    <?php endif; ?>
    671666                                </p>
  • activecampaign-for-woocommerce/trunk/admin/views/activecampaign-for-woocommerce-status-display.php

    r2988259 r2994180  
    138138            <td>
    139139                <?php
    140                 esc_html_e( 'ActiveCampaign connection option ID: ', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN );
    141                 ?>
    142             </td>
    143             <td>
    144                 <?php if ( empty( $this->get_storage() ) || ! $this->get_storage() || ! isset( $this->get_storage()['connection_option_id'] ) ) : ?>
     140                esc_html_e( 'ActiveCampaign connection managed in: ', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN );
     141                ?>
     142            </td>
     143            <td>
    145144                    <?php if ( 0 === $this->get_storage()['is_internal'] || '0' === $this->get_storage()['is_internal'] ) : ?>
    146                         <?php $this->output_yes_mark( 'Third Party' ); ?>
     145                        <?php $this->output_yes_mark( 'Third Party managed in WooCommerce' ); ?>
     146                    <?php elseif ( 1 === $this->get_storage()['is_internal'] || '1' === $this->get_storage()['is_internal'] ) : ?>
     147                        <?php $this->output_yes_mark( 'Internal Integration managed in Hosted' ); ?>
    147148                    <?php else : ?>
    148                         <?php esc_html_e( 'Error: No connection option ID found in settings! ', ACTIVECAMPAIGN_FOR_WOOCOMMERCE_LOCALIZATION_DOMAIN ); ?>
     149                        <?php $this->output_yes_mark( 'Third Party managed in WooCommerce' ); ?>
    149150                    <?php endif; ?>
    150                 <?php else : ?>
    151                     <?php if ( 1 === $this->get_storage()['is_internal'] || '1' === $this->get_storage()['is_internal'] ) : ?>
    152                         <?php $this->output_yes_mark( $this->get_storage()['connection_option_id'] . ' | Internal Integration' ); ?>
    153                     <?php else : ?>
    154                         <?php $this->output_yes_mark( $this->get_storage()['connection_option_id'] ) . ' | Third Party'; ?>
    155                     <?php endif; ?>
    156                 <?php endif; ?>
    157151            </td>
    158152        </tr>
  • activecampaign-for-woocommerce/trunk/includes/class-activecampaign-for-woocommerce.php

    r2988259 r2994180  
    898898        );
    899899
     900        // This is for repair connection button
    900901        $this->loader->add_action(
    901902            'wp_ajax_activecampaign_for_woocommerce_reset_connection_id',
  • activecampaign-for-woocommerce/trunk/includes/commands/class-activecampaign-for-woocommerce-create-or-update-connection-option-command.php

    r2966088 r2994180  
    2525 * @subpackage Activecampaign_For_Woocommerce/includes/commands
    2626 * @author     acteamintegrations <team-integrations@activecampaign.com>
     27 * @deprecated
    2728 */
    2829class Activecampaign_For_Woocommerce_Create_Or_Update_Connection_Option_Command implements Executable {
     
    109110     * @throws Activecampaign_For_Woocommerce_Resource_Unprocessable_Exception When the Connection Option is
    110111     *                                                                         unprocessable.
     112     * @deprecated
    111113     * @since 1.0.0
    112114     */
     
    154156     * @since  1.0.0
    155157     * @access private
     158     * @deprecated
    156159     */
    157160    private function necessary_values_are_missing() {
     
    165168     * @since  1.0.0
    166169     * @access private
     170     * @deprecated
    167171     */
    168172    private function get_connection_option() {
     
    187191     * @since  1.0.0
    188192     * @access private
     193     * @deprecated
    189194     */
    190195    private function connection_option_id_cache_is_missing() {
     
    198203     * @since  1.0.0
    199204     * @access private
     205     * @deprecated
    200206     */
    201207    private function create_connection_option() {
     
    232238    /**
    233239     * Attempts to find the connection option by its connection id before creating.
     240     *
     241     * @deprecated
    234242     */
    235243    private function maybe_find_connection_option_by_connection_id() {
     
    271279     * @since  1.0.0
    272280     * @access private
     281     * @deprecated
    273282     */
    274283    private function update_connection_option( $attempts = 0 ) {
     
    276285
    277286        // Don't override an existing ID.
     287        if ( $this->storage['connection_id'] === $connection_option->get_connectionid() &&
     288             $this->storage['connection_option_id'] !== $connection_option->get_value()
     289        ) {
     290            $connection_option->set_id( $this->storage['connection_option_id'] );
     291        }
     292
    278293        if ( ! $connection_option->get_id() ) {
    279294            $connection_option->set_id( $this->storage['connection_option_id'] );
     
    319334     * @since  1.0.0
    320335     * @access private
     336     * @deprecated
    321337     */
    322338    private function update_connection_option_id_cache( $id ) {
  • activecampaign-for-woocommerce/trunk/includes/config/activecampaign-for-woocommerce-global-constants.php

    r2988259 r2994180  
    2626 */
    2727if ( ! defined( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION' ) ) {
    28     define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.5.0' );
     28    define( 'ACTIVECAMPAIGN_FOR_WOOCOMMERCE_VERSION', '2.5.1' );
    2929}
    3030
  • activecampaign-for-woocommerce/trunk/includes/products/class-activecampaign-for-woocommerce-product-sync-job.php

    r2973117 r2994180  
    244244        // Do not include groups for now.
    245245        try {
     246            $safe_product_types = $this->get_cofe_safe_product_types();
     247
    246248            $data = [
    247249                'limit'   => (int) $limit,
    248250                'offset'  => (int) $offset,
    249                 'type'    => array( 'simple', 'variable', 'external', 'subscription', 'variable-subscription' ),
     251                'type'    => $safe_product_types,
    250252                'orderby' => 'none',
    251253                'order'   => 'ASC',
     
    259261                'Getting products by offset',
    260262                [
     263                    'producttypes'   => $safe_product_types,
    261264                    'data'           => $data,
    262265                    'return_id_only' => $return_id_only,
     
    748751        wp_send_json_success( 'Product sync data reset.' );
    749752    }
     753
     754    /**
     755     * Gets the safe COFE product types. This is a blacklist to remove any types that cause duplicates, conflicts, or issues with sync.
     756     *
     757     * @return int[]|string[]
     758     */
     759    private function get_cofe_safe_product_types() {
     760        $product_types = wc_get_product_types();
     761
     762        // Blacklist certain types that cause conflicts & duplicates
     763        if ( isset( $product_types['grouped'] ) ) {
     764            unset( $product_types['grouped'] );
     765        }
     766
     767        // WC returns array as type_name: type readable so return only the keys
     768        return array_keys( $product_types );
     769    }
     770
    750771}
Note: See TracChangeset for help on using the changeset viewer.