Plugin Directory

Changeset 3273692


Ignore:
Timestamp:
04/15/2025 02:51:05 PM (10 months ago)
Author:
ryanhungate
Message:

pre-release 5.4

Location:
mailchimp-for-woocommerce/trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • mailchimp-for-woocommerce/trunk/CHANGELOG.txt

    r3257919 r3273692  
    11== Changelog ==
     2= 5.4 =
     3* Performance and User Interface improvements
     4* Ability to sync Product Short Description
    25= 5.3 =
    36* WooCommerce Product Category Sync
  • mailchimp-for-woocommerce/trunk/README.txt

    r3257919 r3273692  
    44Donate link: https://mailchimp.com
    55Requires at least: 6.2
    6 Tested up to: 6.7
     6Tested up to: 6.8
    77Stable tag: 5.3
    88Requires PHP: 7.4
     
    7979
    8080== Changelog ==
    81 = 5.3 =
    82 * WooCommerce Product Category Sync
    83 * Updated compatibility with WPML 4.7
    84 * Improved database query performance to reduce processing time and optimize overall plugin efficiency
    85 * Fix issue where logs were being saved despite setting preferences to disable logging
    86 * Fix for trash and permanently deleted coupons
    87 * Removed duplicate queries
    88 * Updated various dependencies including cookie, express, and @wordpress/e2e-test-utils
    89 * Bumped `serialize-javascript` from 6.0.1 to 6.0.2 in `/blocks`
    90 * Bumped cookie, express, and @wordpress/e2e-test-utils-playwright**: Bumped cookie from 0.4.2 to 0.7.1, express, and @wordpress/e2e-test-utils-playwright
     81= 5.4 =
     82* Performance and User Interface improvements
     83* Ability to sync Product Short Description
  • mailchimp-for-woocommerce/trunk/admin/class-mailchimp-woocommerce-admin.php

    r3253510 r3273692  
    7878        // clean database
    7979        mailchimp_clean_database();
    80         \Mailchimp_Woocommerce_DB_Helpers::delete_option('mc-woocommerce-waiting-for-login');
     80        \Mailchimp_Woocommerce_DB_Helpers::delete_option('mailchimp-woocommerce-waiting-for-login');
    8181
    8282        return array();
     
    351351        // tammullen found this.
    352352        if ( $pagenow == 'admin.php' && isset( $_GET ) && isset( $_GET['page'] ) && 'mailchimp-woocommerce' === $_GET['page'] ) {
    353 
    354353            $this->handle_abandoned_cart_table();
    355354            $this->update_db_check();
     
    982981    }
    983982
     983    public function mailchimp_woocommerce_activate_account_event()
     984    {
     985        $this->adminOnlyMiddleware();
     986
     987        Mailchimp_Woocommerce_Event::track('connect_accounts:click_create_account', new DateTime());
     988
     989        wp_send_json_success([]);
     990    }
     991
    984992    /**
    985993     * Mailchimp OAuth connection status
     
    10571065            );
    10581066            Mailchimp_Woocommerce_Event::track('connect_accounts_oauth:complete', new DateTime());
     1067
     1068            do_action('mailchimp_woocommerce_connected_to_mailchimp');
    10591069
    10601070            wp_send_json_success( $response );
     
    11971207            $logged_in  = !(empty($profile['last_login']) || is_null($profile['last_login']));
    11981208            if ($logged_in) {
    1199                 \Mailchimp_Woocommerce_DB_Helpers::delete_option('mc-woocommerce-waiting-for-login');
     1209                \Mailchimp_Woocommerce_DB_Helpers::delete_option('mailchimp-woocommerce-waiting-for-login');
    12001210            }
    12011211            wp_send_json_success(array(
     
    12241234            Mailchimp_Woocommerce_Event::track('connect_accounts:create_account_complete', new DateTime());
    12251235            $result = json_decode( $response['body'], true);
    1226             $options = get_option($this->plugin_name);
     1236            $options = get_option($this->plugin_name, array());
    12271237            $options['mailchimp_api_key'] = $result['data']['oauth_token'].'-'.$result['data']['dc'];
    12281238            // go straight to the DB and update the options to bypass any filters.
     
    12321242                array('option_name' => $this->plugin_name)
    12331243            );
    1234             \Mailchimp_Woocommerce_DB_Helpers::update_option('mc-woocommerce-waiting-for-login', 'waiting');
     1244            \Mailchimp_Woocommerce_DB_Helpers::update_option('mailchimp-woocommerce-waiting-for-login', 'waiting');
    12351245            Mailchimp_Woocommerce_Event::track('account:verify_email', new DateTime());
     1246            $response_body->redirect = admin_url('admin.php?page=mailchimp-woocommerce');
     1247
     1248            do_action('mailchimp_woocommerce_connected_to_mailchimp');
     1249
    12361250            wp_send_json_success( $response_body );
    12371251        } elseif ( $response['response']['code'] == 404 ) {
     
    13861400     */
    13871401    protected function validatePostNewsletterSettings( $input ) {
    1388         $sanitized_tags = array_map( 'sanitize_text_field', explode( ',', $input['mailchimp_user_tags'] ) );
     1402        $sanitized_tags = isset($input['mailchimp_user_tags'])
     1403            ? array_map( 'sanitize_text_field', explode( ',', $input['mailchimp_user_tags'] ) )
     1404            : [];
    13891405        $breadcrumb = isset($input['mailchimp_active_breadcrumb']) ? $input['mailchimp_active_breadcrumb'] : '';
    13901406
     
    23012317          'continue_to_mailchimp' => 'audience_stats:continue_to_mailchimp',
    23022318          'save_log' => 'navigation_logs:save',
     2319          'click_connect_account' => 'connect_accounts:click_start',
    23032320        ];
    23042321        $payload = array_key_exists($mc_event, $map) ?
  • mailchimp-for-woocommerce/trunk/admin/js/mailchimp-woocommerce-create-account.js

    r3097450 r3273692  
    3636        $('#mc-woocommerce-create-activate-account').click((e) => {
    3737            e.preventDefault();
     38
     39            var data = {
     40                action: 'mailchimp_woocommerce_activate_account_event',
     41            }
     42
     43            $.post(ajaxurl, data, function(response) {})
    3844
    3945            profileDetailsInputs  = $('#mc-woocommerce-profile-details input');
     
    9096                data : data,
    9197                success: function(response) {
    92                     $('.js-mc-woocommerce-activate-account').addClass('hidden')
    93                     $("#mc-woocommerce-create-activate-account").attr('disabled', false)
    94                     $("#mc-woocommerce-create-activate-account .mc-wc-loading").addClass('hidden')
    95 
    9698                    if (response.data.suggest_login) {
     99                        $('.js-mc-woocommerce-activate-account').addClass('hidden')
     100                        $("#mc-woocommerce-create-activate-account").attr('disabled', false)
     101                        $("#mc-woocommerce-create-activate-account .mc-wc-loading").addClass('hidden')
     102
    97103                        $('.js-mc-woocommerce-suggest-to-login').removeClass('hidden');
    98104                        $('.js-mc-woocommerce-email').text(formDataObject.email)
    99105                        $('.mailchimp-connect').attr('href', response.data.login_link)
    100106                    } else {
    101                         $('.js-mc-woocommerce-confirm-email').removeClass('hidden')
    102                         $('.js-mc-woocommerce-email').text(formDataObject.email)
    103 
    104                         waitingForLogin()
     107                        window.location.href = response.data.redirect
    105108                    }
    106109                }
  • mailchimp-for-woocommerce/trunk/admin/v2/templates/connect-accounts/button-actions.php

    r3209992 r3273692  
    1515    </legend>
    1616    <div class="mc-wc-actions">
    17         <a id="mailchimp-oauth-connect" class="mc-wc-btn mc-wc-btn-primary oauth-connect"><?php esc_html_e( 'Connect Account', 'mailchimp-for-woocommerce' );  ?></a>
     17        <a id="mailchimp-oauth-connect" class="mc-wc-btn mc-wc-btn-primary oauth-connect js-mailchimp-woocommerce-send-event" data-mc-event="click_connect_account"><?php esc_html_e( 'Connect Account', 'mailchimp-for-woocommerce' );  ?></a>
    1818        <?php if (!isset($promo_active) || !$promo_active): ?>
    1919        <a class="mc-wc-btn mc-wc-btn-primary-outline create-account js-mailchimp-woocommerce-send-event" data-mc-event="click_create_account" href='<?php echo esc_url($create_account_url) ?>'><?php esc_html_e( 'Create account', 'mailchimp-for-woocommerce' ); ?></a>
  • mailchimp-for-woocommerce/trunk/admin/v2/templates/connect-accounts/create-account-page.php

    r3219233 r3273692  
    99    $user = get_user_by('id', $user_id);
    1010}
    11 $waiting_login = get_option('mc-woocommerce-waiting-for-login');
    12 $signup_initiated = $waiting_login && $waiting_login === 'waiting';
     11$signup_initiated = mailchimp_waiting_for_account_confirmation();
    1312
    1413$apiKey = mailchimp_get_api_key();
     
    311310                <div class="js-mc-woocommerce-confirm-email  <?php if (!$signup_initiated): ?>hidden<?php endif; ?>">
    312311                    <div class="title"><?php echo esc_html__( 'Check your email', 'mailchimp-for-woocommerce' ) ?></div>
    313                     <p class="h4"><?php echo esc_html__( 'To start using Mailchimp, activate your account with the link sent to ', 'mailchimp-for-woocommerce' ) ?><span class="js-mc-woocommerce-email"><?php echo esc_html($email); ?></span></p>
     312                    <p class="h4"><?php echo esc_html__( 'To start using Mailchimp, activate your account with the link sent to ', 'mailchimp-for-woocommerce' ) ?><span><?php echo esc_html($email); ?></span></p>
    314313
    315314                    <div class="flex items-center gap-x-6">
  • mailchimp-for-woocommerce/trunk/admin/v2/templates/mailchimp-woocommerce-admin-pages.php

    r3253510 r3273692  
    1111
    1212/** Grab all options for this particular tab we're viewing. */
    13 
    1413$options = mailchimp_get_admin_options();
    1514
     
    9897}
    9998$promo_active = false;
     99if (mailchimp_waiting_for_account_confirmation() && $active_breadcrumb !== MC_WC_REVIEW_SYNC_SETTINGS) {
     100    wp_redirect('admin.php?page=create-mailchimp-account');
     101}
    100102?>
    101103
  • mailchimp-for-woocommerce/trunk/blocks/package-lock.json

    r3253510 r3273692  
    76567656    },
    76577657    "node_modules/axios": {
    7658       "version": "1.7.7",
    7659       "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
    7660       "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
    7661       "dev": true,
     7658      "version": "1.8.3",
     7659      "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz",
     7660      "integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==",
     7661      "dev": true,
     7662      "license": "MIT",
    76627663      "dependencies": {
    76637664        "follow-redirects": "^1.15.6",
  • mailchimp-for-woocommerce/trunk/bootstrap.php

    r3253510 r3273692  
    112112        'repo' => 'master',
    113113        'environment' => 'production', // staging or production
    114         'version' => '5.3',
     114        'version' => '5.4',
    115115        'php_version' => phpversion(),
    116116        'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
     
    153153            try {
    154154                as_unschedule_action(get_class($job), array('obj_id' => $job->id), 'mc-woocommerce');
    155             } catch (Exception $e) {}
    156         }
    157         else {
     155
     156                // updating args after unschedule to refresh data in the jo
     157                $wpdb->update(
     158                    $wpdb->prefix . "mailchimp_jobs",
     159                    array(
     160                        'job' => maybe_serialize($job),
     161                        'created_at' => gmdate('Y-m-d H:i:s', time())
     162                    ),
     163                    array('obj_id' => $job->id)
     164                );
     165            } catch (Exception $e) {
     166            }
     167        } else {
    158168            $inserted = $wpdb->insert($wpdb->prefix."mailchimp_jobs", $args);
    159169            if (!$inserted) {
     
    13371347//    $sync_completed_at = get_option('mailchimp-woocommerce-sync.completed_at');
    13381348//    return ($sync_completed_at < $sync_started_at);
     1349}
     1350
     1351function mailchimp_waiting_for_account_confirmation() {
     1352    $waiting_login = \Mailchimp_Woocommerce_DB_Helpers::get_option('mailchimp-woocommerce-waiting-for-login');
     1353
     1354    return $waiting_login === 'waiting';
    13391355}
    13401356
     
    17871803        ),
    17881804        // App Setup: Connect Accounts
     1805        'connect_accounts:click_start' => [
     1806            'event' => 'integration:started',
     1807            'entry' => ['account_create_api', false],
     1808            'initiative_name' => 'strategic_partners',
     1809            'scope_area' => 'embedded_app',
     1810            'screen' => admin_url('admin.php?page=create-mailchimp-account'),
     1811            'object' => 'integration',
     1812            'object_detail' => 'connect_accounts',
     1813            'action' => 'started',
     1814            'ui_object' => "button",
     1815            'ui_object_detail' => "create_account",
     1816            'ui_action' => "clicked",
     1817            'ui_access_point' => "center",
     1818            'description' => 'Connect Accounts: Clicks to create account',
     1819        ],
    17891820        'connect_accounts:view_screen' => array(
    17901821            'initiative_name' => 'strategic_partners',
     
    17991830            'ui_access_point' => "'",
    18001831        ),
     1832        'connect_accounts:click_create_account' => [
     1833            'event' => 'integration:viewed',
     1834            'screen' => admin_url('admin.php?page=create-mailchimp-account'),
     1835            'object' => 'integration',
     1836            'object_detail' => 'create_account_form',
     1837            'action' => 'engaged',
     1838            'ui_object' => 'button',
     1839            'ui_object_detail' => 'activate_account',
     1840            'ui_action' => 'clicked',
     1841            'ui_access_point' => 'center',
     1842            'entry' => ['account_create_api', false],
     1843            'description' => 'Clicked the Activate Account button in the Create account flow',
     1844        ],
    18011845        'connect_accounts:view_create_account' => array(
    18021846            'initiative_name' => 'strategic_partners',
  • mailchimp-for-woocommerce/trunk/includes/api/class-mailchimp-api.php

    r3255500 r3273692  
    17431743        }
    17441744    }
     1745
     1746    /**
     1747     * @param $store_id
     1748     * @param $category_id
     1749     * @param $product_id
     1750     * @return bool
     1751     */
     1752    public function addProductToCategory($store_id, $category_id, $product_id)
     1753    {
     1754        try {
     1755            $data = array(
     1756                'id' => "{$product_id}"
     1757            );
     1758
     1759            return $this->post( "ecommerce/stores/{$store_id}/collections/{$category_id}/products", $data );
     1760        } catch ( MailChimp_WooCommerce_Error $e ) {
     1761            mailchimp_error('mailchimp_api.addProductToCategory', 'failed', ['error' => $e->getMessage()]);
     1762
     1763            return false;
     1764        }
     1765    }
     1766
     1767    /**
     1768     * @param $store_id
     1769     * @param $category_id
     1770     * @param $product_id
     1771     * @return bool
     1772     */
     1773    public function removeProductFromCategory($store_id, $category_id, $product_id)
     1774    {
     1775        try {
     1776            $data = array(
     1777                'id' => "{$product_id}"
     1778            );
     1779
     1780            return $this->delete( "ecommerce/stores/{$store_id}/collections/{$category_id}/products", $data );
     1781        } catch ( MailChimp_WooCommerce_Error $e ) {
     1782            mailchimp_error('mailchimp_api.removeProductFromCategory', 'failed', ['error' => $e->getMessage()]);
     1783            return false;
     1784        }
     1785    }
     1786
    17451787
    17461788
  • mailchimp-for-woocommerce/trunk/includes/class-mailchimp-woocommerce-rest-api.php

    r3234127 r3273692  
    4646        ));
    4747
     48        register_rest_route(static::$namespace, '/sync/stats/coupons', array(
     49            'methods' => 'GET',
     50            'callback' => array($this, 'get_coupons_count_stats'),
     51            'permission_callback' => array($this, 'permission_callback'),
     52        ));
     53
    4854        register_rest_route(static::$namespace, '/sync/stats/orders', array(
    4955            'methods' => 'GET',
     
    5561            'methods' => 'GET',
    5662            'callback' => array($this, 'get_product_count_stats'),
     63            'permission_callback' => array($this, 'permission_callback'),
     64        ));
     65
     66        register_rest_route(static::$namespace, '/store/resync', array(
     67            'methods' => 'POST',
     68            'callback' => array($this, 'resync_store'),
    5769            'permission_callback' => array($this, 'permission_callback'),
    5870        ));
     
    254266            'last_loop_at' => mailchimp_get_data('sync.last_loop_at'),
    255267            'real' => $internal ?? null,
     268        ));
     269    }
     270
     271    /**
     272     * @param WP_REST_Request $request
     273     *
     274     * @return WP_REST_Response
     275     */
     276    public function get_coupons_count_stats(WP_REST_Request $request)
     277    {
     278        // if the queue is running in the console - we need to say tell the response why it's not going to fire this way.
     279        if (!mailchimp_is_configured() || !($api = mailchimp_get_api())) {
     280            return $this->mailchimp_rest_response(array('success' => false, 'reason' => 'not configured'));
     281        }
     282
     283        try {
     284            $promo_rules = $api->getPromoRules(mailchimp_get_store_id(), 1, 1, 1);
     285            $mailchimp_total_promo_rules = $promo_rules['total_items'];
     286            if (isset($promo_rules_count['publish']) && $mailchimp_total_promo_rules > $promo_rules_count['publish']) $mailchimp_total_promo_rules = $promo_rules_count['publish'];
     287        } catch (Exception $e) { $mailchimp_total_promo_rules = 0; }
     288
     289
     290        // but we need to do it just in case.
     291        return $this->mailchimp_rest_response(array(
     292            'success' => true,
     293            'in_store' => mailchimp_get_coupons_count(),
     294            'in_mailchimp' => $mailchimp_total_promo_rules,
    256295        ));
    257296    }
     
    490529            $this->tower($request->get_query_params())->handle()
    491530        );
     531    }
     532
     533    public function resync_store(WP_REST_Request $request)
     534    {
     535        // if the queue is running in the console - we need to say tell the response why it's not going to fire this way.
     536        if (!mailchimp_is_configured() || !(mailchimp_get_api())) {
     537            return $this->mailchimp_rest_response(array('success' => false, 'reason' => 'Mailchimp not configured'));
     538        }
     539
     540        $service = new MailChimp_Service();
     541        $service->removePointers();
     542        MailChimp_WooCommerce_Admin::instance()->startSync();
     543        $service->setData('sync.config.resync', true);
     544
     545        return $this->mailchimp_rest_response(array(
     546            'success' => true,
     547            'message' => 'Successfully initiated the store resync'
     548        ));
    492549    }
    493550
  • mailchimp-for-woocommerce/trunk/includes/class-mailchimp-woocommerce-service.php

    r3254280 r3273692  
    389389            || $post_after->post_content !== $post_before->post_content
    390390            || $post_after->post_status !== $post_before->post_status
     391            || $post_after->post_excerpt !== $post_before->post_excerpt
    391392        ) {
    392393            mailchimp_handle_or_queue( new MailChimp_WooCommerce_Single_Product($post_ID), 5);
  • mailchimp-for-woocommerce/trunk/includes/class-mailchimp-woocommerce.php

    r3253510 r3273692  
    268268        // Mailchimp oAuth
    269269        $this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_oauth_start', $plugin_admin, 'mailchimp_woocommerce_ajax_oauth_start' );
     270        $this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_activate_account_event', $plugin_admin, 'mailchimp_woocommerce_activate_account_event' );
    270271        $this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_oauth_status', $plugin_admin, 'mailchimp_woocommerce_ajax_oauth_status' );
    271272        $this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_oauth_finish', $plugin_admin, 'mailchimp_woocommerce_ajax_oauth_finish' );
  • mailchimp-for-woocommerce/trunk/includes/processes/class-mailchimp-woocommerce-user-submit.php

    r3234127 r3273692  
    8282        if (!mailchimp_is_configured()) {
    8383            mailchimp_debug(get_called_class(), 'Mailchimp is not configured properly');
    84             static::$handling_for = null;
    85             return false;
    86         }
    87 
    88         if ($this->should_ignore) {
    89             mailchimp_debug(get_called_class(), "{$this->id} is currently in motion - skipping this one.");
    9084            static::$handling_for = null;
    9185            return false;
  • mailchimp-for-woocommerce/trunk/mailchimp-woocommerce.php

    r3257919 r3273692  
    1717 * Plugin URI:        https://mailchimp.com/connect-your-store/
    1818 * Description:       Connects WooCommerce to Mailchimp to sync your store data, send targeted campaigns to your customers, and sell more stuff.
    19  * Version:           5.3
     19 * Version:           5.4
    2020 * Author:            Mailchimp
    2121 * Author URI:        https://mailchimp.com
  • mailchimp-for-woocommerce/trunk/plugin_overview.md

    r2184004 r3273692  
    1 # Mailchimp for Woocommerce Integration
     1## Mailchimp for WooCommerce Integration Guide
    22
    3 In this article, you’ll learn how to connect Mailchimp for WooCommerce.
     3This guide provides instructions to seamlessly integrate your WooCommerce store with Mailchimp, outlining installation, configuration, synchronization, and support information.
    44
    5 ## Before You Start
     5## Before You Begin
    66
    7 **Here are some things to know before you begin this process.**
     7Before installing the plugin, ensure:
    88
    9 - For the most up-to-date install instructions, read [Connect or Disconnect Mailchimp for WooCommerce](http://kb.mailchimp.com/integrations/e-commerce/connect-or-disconnect-mailchimp-for-woocommerce).
     9- **WooCommerce** is installed and activated on your WordPress site.
     10- Your environment meets [WooCommerce's system requirements](https://docs.woocommerce.com/document/server-requirements/).
     11- The **WordPress REST API** is enabled.
     12- You have access to a staging environment for testing.
    1013
    11 - This plugin requires you to have the latest [WooCommerce plugin](https://wordpress.org/plugins/woocommerce) already installed and activated in WordPress.
     14## Installation and Activation
    1215
    13 - Your host environment must meet [WooCommerce's minimum requirements](https://docs.woocommerce.com/document/server-requirements), including PHP 7.0 or greater.
     161. **Download and Install**:
     17   - Visit [Mailchimp for WooCommerce](https://wordpress.org/plugins/mailchimp-for-woocommerce/).
     18   - Click **Download**, then upload the ZIP file via `Plugins > Add New > Upload Plugin`.
    1419
    15 - WordPress REST API should be enabled in order for this plugin to work.
     202. **Activate**:
     21   - Click **Activate Plugin** upon installation.
    1622
    17 - We recommend you use this plugin in a staging environment before installing it on production servers.
     23After activation, you’ll be directed to the initial setup.
    1824
    19 - Mailchimp for WooCommerce syncs the customer’s first name, last name, email address, and orders.
     25## Initial Setup and Synchronization
    2026
    21 - WooCommerce customers who haven't signed up for marketing emails will appear in the Transactional portion of your list, and cannot be exported.
     271. **Connect to Mailchimp**:
     28   - Click **Connect Account**.
     29   - Log in and authorize Mailchimp to sync data with your WooCommerce store.
    2230
    23 ## A Note for Current WooCommerce Integration Users
     312. **Initial Sync Options**:
    2432
    25 This plugin supports our most powerful API 3.0 features, and is intended for users who have not yet integrated their WooCommerce stores with Mailchimp. If your WooCommerce store is already integrated with Mailchimp via an integration that runs on an older version of Mailchimp’s API, consider your current sales volume before you make any changes that might disrupt business.
     33**Import customers (initial sync)** 
     34Choose how you'll add your WooCommerce customers to Mailchimp:
    2635
    27 You can run this new integration at the same time as your current WooCommerce integration for Mailchimp. However, data from the older integration will display separately in subscriber profiles, and can’t be used with e-commerce features that require API 3.0.
     36- **Sync as subscribed** 
     37  Indicates you've received permission to market to your customers. [Learn about permission](https://mailchimp.com/help/about-permission/).
    2838
    29 ## Task Roadmap
    30 **Here’s a brief overview of this multi-step process.**
     39- **Sync as non-subscribed** 
     40  Indicates you haven't received permission to market. You can still send transactional emails, postcards, and target them with ads.
    3141
    32 - Install the plugin on your WordPress Admin site.
    33 - Connect the plugin with your Mailchimp API Key.
    34 - Configure your list settings to complete the data sync process.
    35 - Troubleshoot any sync or data feed issues by sharing logs with Mailchimp support.
     42- **Sync existing contacts only** 
     43  Sync only WooCommerce customers already in your Mailchimp audience.
    3644
    37 ## Install the Plugin
    38 **To install the plugin, follow these steps.**
     45*Note*: If syncing as subscribed or non-subscribed, ensure your Mailchimp plan covers the total number of contacts to avoid additional charges. [Learn more about charges](https://mailchimp.com/help/about-additional-contact-charges/).
    3946
    40 1) Log in to your WordPress admin panel.
    41 2) In the left navigation panel, click **Plugins**, and choose **Add New**.
     47**Import customers (ongoing sync)** 
     48- **Sync new non-subscribed contacts** 
     49  Import new customers who haven't opted in. (Required for Abandoned Cart automations.)
    4250
    43 ![Add new](https://cloud.githubusercontent.com/assets/6547700/18677991/a7622bcc-7f28-11e6-8e8c-9bbdfa9861c7.png)
     51- **Tag WooCommerce customers** 
     52  Apply tags to contacts imported via the plugin for easier segmentation and personalization.
    4453
    45 3) Click **Upload Plugin**.
     543. Click **Start Sync** to begin synchronizing your WooCommerce data with Mailchimp.
    4655
    47 ![Upload](https://cloud.githubusercontent.com/assets/6547700/18677997/a76dab82-7f28-11e6-98e4-4309739cd840.png)
     56## Additional Features
    4857
    49 4) Click **Choose File** to select the ZIP file for the plugin, then click **Install Now**.
     58Enhance marketing efforts with:
    5059
    51 ![Install Now](https://cloud.githubusercontent.com/assets/6547700/18677988/a760949c-7f28-11e6-9e13-13c23d044ad4.png)
     60- **Pop-Up Forms**: Capture site visitors as subscribers.
     61- **Promo Codes**: Integrate WooCommerce discount codes into Mailchimp emails.
     62- **Landing Pages**: Promote products or sales to build your audience.
     63- **WPML Compatibility**: Multilingual support via [WPML](https://wpml.org/plugin/mailchimp-for-woocommerce/).
    5264
    53 5) Click **Activate Plugin**.
     65## Deactivation and Deletion
    5466
    55 ![Activate plugin](https://cloud.githubusercontent.com/assets/6547700/18677990/a760d7c2-7f28-11e6-8741-12c1efa7a991.png)
     671. **Deactivate**:
     68   - Navigate to `Plugins` > `Installed Plugins`.
     69   - Click **Deactivate** on Mailchimp for WooCommerce.
    5670
    57 After you activate the plugin, you’ll be taken to the **Settings** page, where you will add your API key and configure your list settings.
     712. **Delete (Optional)**:
     72   - After deactivation, click **Delete**.
    5873
    59 ## Configure and Sync
    60 **To configure your Mailchimp settings for WooCommerce customers and sync them to Mailchimp, follow these steps.**
     74Deleting removes synced e-commerce data from WooCommerce but retains subscriber details in Mailchimp.
    6175
    62 1) On the **Connect** tab, paste your Mailchimp API key into the field, choose whether or not you want to send debugging logs to Mailchimp, and click **Save all changes**. To learn how to generate a Mailchimp API Key, read [About API Keys](http://kb.mailchimp.com/integrations/api-integrations/about-api-keys).
     76## Troubleshooting and Support
    6377
    64 ![API key](https://cloud.githubusercontent.com/assets/19805049/18877771/3fca90e8-849c-11e6-9e3a-161a7b3936dd.png)
     78To facilitate troubleshooting, enable remote support:
    6579
    66 2) Navigate to the **Store Settings** tab.
     80- Navigate to the `Support` tab.
     81- Check the box **Enable Remote Support**.
     82- Click **Save changes**.
    6783
    68 ![Store Settings](https://cloud.githubusercontent.com/assets/6547700/18677998/a76e5640-7f28-11e6-9fd3-d66949fa1413.png)
     84For additional assistance:
    6985
    70 3) Enter the contact and location details for your WooCommerce Store, and click **Save all changes**.
    71 
    72 ![Save all changes](https://cloud.githubusercontent.com/assets/6547700/18677996/a76d126c-7f28-11e6-9150-4b289d20f057.png)
    73 
    74 4) Navigate to the **List Settings** tab.
    75 
    76 ![List Settings tab](https://cloud.githubusercontent.com/assets/19805049/18878446/961221d0-849e-11e6-99bb-175c22bf921e.png)
    77 
    78 5) Choose the list you want to sync, decide whether or not you want to auto-subscribe existing customers, set the subscribe message you want customers to see at checkout, and click **Save all changes**.
    79 
    80 ![Save all changes](https://cloud.githubusercontent.com/assets/19805049/18877772/3fd24162-849c-11e6-8442-79ec4550b8ac.png)
    81 
    82 All set! When you click **Save all changes**, we’ll start syncing your WooCommerce customers to Mailchimp. To view progress, check the **Sync Status** tab.
    83 
    84 If you have no audiences in your Mailchimp account, you will be given the option to create a new list on the **List Defaults** tab. To create a new list, set your list defaults, and click **Save all Changes** when you’re done. We’ll create a Mailchimp list for you, and begin the data sync.
    85 
    86 ![List Defaults tab](https://cloud.githubusercontent.com/assets/19805049/18956260/cffd3926-8628-11e6-9c68-9fe3c964c75c.png)
    87 
    88 ## Next Steps
    89 After you connect, you can do a lot with the the data you collect, like build segments, send Automation workflows, track purchases, and view results.
    90 
    91 Find out everything Mailchimp has to offer in our article, [How to Use Mailchimp for E-Commerce](http://kb.mailchimp.com/integrations/e-commerce/how-to-use-mailchimp-for-e-commerce).
    92 
    93 # Deactivate or Delete the Plugin
    94 When you deactivate Mailchimp for WooCommerce, it stops the sync but doesn’t remove the plugin. You can always re-activate the sync, which will backfill data at a later point in time.
    95 To deactivate Mailchimp for WooCommerce, follow these steps.
    96 
    97 1) Log in to your WordPress admin panel.
    98 
    99 2) In the left navigation panel, click **Plugins**, and choose **Installed Plugins**.
    100 
    101 ![Installed Plugins](https://cloud.githubusercontent.com/assets/6547700/18677993/a76542ee-7f28-11e6-99dd-cfd6c1f5c24a.png)
    102 
    103 3) Click the box next to the Mailchimp for WooCommerce plugin, and click **Deactivate**.   
    104 
    105 ![Deactivate](https://cloud.githubusercontent.com/assets/6547700/18677992/a762b844-7f28-11e6-9679-8d6c6a1d731d.png)
    106 
    107 After you deactivate the plugin, you will have the option to **Delete** it. If you delete the plugin, you will retain customers’ email addresses in your list, but remove all associated e-commerce data.
     86- **Logs and Debugging**: Enable debugging logs in plugin settings.
     87- **Documentation**: Visit the [GitHub Wiki](https://github.com/mailchimp/mc-woocommerce/wiki) and [FAQs](https://github.com/mailchimp/mc-woocommerce/blob/master/README.txt).
     88- **Support**: Submit issues via [GitHub](https://github.com/mailchimp/mc-woocommerce/issues) or contact Mailchimp support.
  • mailchimp-for-woocommerce/trunk/uninstall.php

    r3141736 r3273692  
    5454            }
    5555        }
    56         \Mailchimp_Woocommerce_DB_Helpers::delete_option('mc-woocommerce-waiting-for-login');
     56        \Mailchimp_Woocommerce_DB_Helpers::delete_option('mailchimp-woocommerce-waiting-for-login');
    5757
    5858    } catch (Exception $e) {
Note: See TracChangeset for help on using the changeset viewer.