Changeset 3273692
- Timestamp:
- 04/15/2025 02:51:05 PM (10 months ago)
- Location:
- mailchimp-for-woocommerce/trunk
- Files:
-
- 17 edited
-
CHANGELOG.txt (modified) (1 diff)
-
README.txt (modified) (2 diffs)
-
admin/class-mailchimp-woocommerce-admin.php (modified) (9 diffs)
-
admin/js/mailchimp-woocommerce-create-account.js (modified) (2 diffs)
-
admin/v2/templates/connect-accounts/button-actions.php (modified) (1 diff)
-
admin/v2/templates/connect-accounts/create-account-page.php (modified) (2 diffs)
-
admin/v2/templates/mailchimp-woocommerce-admin-pages.php (modified) (2 diffs)
-
blocks/package-lock.json (modified) (1 diff)
-
bootstrap.php (modified) (5 diffs)
-
includes/api/class-mailchimp-api.php (modified) (1 diff)
-
includes/class-mailchimp-woocommerce-rest-api.php (modified) (4 diffs)
-
includes/class-mailchimp-woocommerce-service.php (modified) (1 diff)
-
includes/class-mailchimp-woocommerce.php (modified) (1 diff)
-
includes/processes/class-mailchimp-woocommerce-user-submit.php (modified) (1 diff)
-
mailchimp-woocommerce.php (modified) (1 diff)
-
plugin_overview.md (modified) (1 diff)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mailchimp-for-woocommerce/trunk/CHANGELOG.txt
r3257919 r3273692 1 1 == Changelog == 2 = 5.4 = 3 * Performance and User Interface improvements 4 * Ability to sync Product Short Description 2 5 = 5.3 = 3 6 * WooCommerce Product Category Sync -
mailchimp-for-woocommerce/trunk/README.txt
r3257919 r3273692 4 4 Donate link: https://mailchimp.com 5 5 Requires at least: 6.2 6 Tested up to: 6. 76 Tested up to: 6.8 7 7 Stable tag: 5.3 8 8 Requires PHP: 7.4 … … 79 79 80 80 == 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 78 78 // clean database 79 79 mailchimp_clean_database(); 80 \Mailchimp_Woocommerce_DB_Helpers::delete_option('m c-woocommerce-waiting-for-login');80 \Mailchimp_Woocommerce_DB_Helpers::delete_option('mailchimp-woocommerce-waiting-for-login'); 81 81 82 82 return array(); … … 351 351 // tammullen found this. 352 352 if ( $pagenow == 'admin.php' && isset( $_GET ) && isset( $_GET['page'] ) && 'mailchimp-woocommerce' === $_GET['page'] ) { 353 354 353 $this->handle_abandoned_cart_table(); 355 354 $this->update_db_check(); … … 982 981 } 983 982 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 984 992 /** 985 993 * Mailchimp OAuth connection status … … 1057 1065 ); 1058 1066 Mailchimp_Woocommerce_Event::track('connect_accounts_oauth:complete', new DateTime()); 1067 1068 do_action('mailchimp_woocommerce_connected_to_mailchimp'); 1059 1069 1060 1070 wp_send_json_success( $response ); … … 1197 1207 $logged_in = !(empty($profile['last_login']) || is_null($profile['last_login'])); 1198 1208 if ($logged_in) { 1199 \Mailchimp_Woocommerce_DB_Helpers::delete_option('m c-woocommerce-waiting-for-login');1209 \Mailchimp_Woocommerce_DB_Helpers::delete_option('mailchimp-woocommerce-waiting-for-login'); 1200 1210 } 1201 1211 wp_send_json_success(array( … … 1224 1234 Mailchimp_Woocommerce_Event::track('connect_accounts:create_account_complete', new DateTime()); 1225 1235 $result = json_decode( $response['body'], true); 1226 $options = get_option($this->plugin_name );1236 $options = get_option($this->plugin_name, array()); 1227 1237 $options['mailchimp_api_key'] = $result['data']['oauth_token'].'-'.$result['data']['dc']; 1228 1238 // go straight to the DB and update the options to bypass any filters. … … 1232 1242 array('option_name' => $this->plugin_name) 1233 1243 ); 1234 \Mailchimp_Woocommerce_DB_Helpers::update_option('m c-woocommerce-waiting-for-login', 'waiting');1244 \Mailchimp_Woocommerce_DB_Helpers::update_option('mailchimp-woocommerce-waiting-for-login', 'waiting'); 1235 1245 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 1236 1250 wp_send_json_success( $response_body ); 1237 1251 } elseif ( $response['response']['code'] == 404 ) { … … 1386 1400 */ 1387 1401 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 : []; 1389 1405 $breadcrumb = isset($input['mailchimp_active_breadcrumb']) ? $input['mailchimp_active_breadcrumb'] : ''; 1390 1406 … … 2301 2317 'continue_to_mailchimp' => 'audience_stats:continue_to_mailchimp', 2302 2318 'save_log' => 'navigation_logs:save', 2319 'click_connect_account' => 'connect_accounts:click_start', 2303 2320 ]; 2304 2321 $payload = array_key_exists($mc_event, $map) ? -
mailchimp-for-woocommerce/trunk/admin/js/mailchimp-woocommerce-create-account.js
r3097450 r3273692 36 36 $('#mc-woocommerce-create-activate-account').click((e) => { 37 37 e.preventDefault(); 38 39 var data = { 40 action: 'mailchimp_woocommerce_activate_account_event', 41 } 42 43 $.post(ajaxurl, data, function(response) {}) 38 44 39 45 profileDetailsInputs = $('#mc-woocommerce-profile-details input'); … … 90 96 data : data, 91 97 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 96 98 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 97 103 $('.js-mc-woocommerce-suggest-to-login').removeClass('hidden'); 98 104 $('.js-mc-woocommerce-email').text(formDataObject.email) 99 105 $('.mailchimp-connect').attr('href', response.data.login_link) 100 106 } 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 105 108 } 106 109 } -
mailchimp-for-woocommerce/trunk/admin/v2/templates/connect-accounts/button-actions.php
r3209992 r3273692 15 15 </legend> 16 16 <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> 18 18 <?php if (!isset($promo_active) || !$promo_active): ?> 19 19 <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 9 9 $user = get_user_by('id', $user_id); 10 10 } 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(); 13 12 14 13 $apiKey = mailchimp_get_api_key(); … … 311 310 <div class="js-mc-woocommerce-confirm-email <?php if (!$signup_initiated): ?>hidden<?php endif; ?>"> 312 311 <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> 314 313 315 314 <div class="flex items-center gap-x-6"> -
mailchimp-for-woocommerce/trunk/admin/v2/templates/mailchimp-woocommerce-admin-pages.php
r3253510 r3273692 11 11 12 12 /** Grab all options for this particular tab we're viewing. */ 13 14 13 $options = mailchimp_get_admin_options(); 15 14 … … 98 97 } 99 98 $promo_active = false; 99 if (mailchimp_waiting_for_account_confirmation() && $active_breadcrumb !== MC_WC_REVIEW_SYNC_SETTINGS) { 100 wp_redirect('admin.php?page=create-mailchimp-account'); 101 } 100 102 ?> 101 103 -
mailchimp-for-woocommerce/trunk/blocks/package-lock.json
r3253510 r3273692 7656 7656 }, 7657 7657 "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", 7662 7663 "dependencies": { 7663 7664 "follow-redirects": "^1.15.6", -
mailchimp-for-woocommerce/trunk/bootstrap.php
r3253510 r3273692 112 112 'repo' => 'master', 113 113 'environment' => 'production', // staging or production 114 'version' => '5. 3',114 'version' => '5.4', 115 115 'php_version' => phpversion(), 116 116 'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version), … … 153 153 try { 154 154 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 { 158 168 $inserted = $wpdb->insert($wpdb->prefix."mailchimp_jobs", $args); 159 169 if (!$inserted) { … … 1337 1347 // $sync_completed_at = get_option('mailchimp-woocommerce-sync.completed_at'); 1338 1348 // return ($sync_completed_at < $sync_started_at); 1349 } 1350 1351 function 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'; 1339 1355 } 1340 1356 … … 1787 1803 ), 1788 1804 // 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 ], 1789 1820 'connect_accounts:view_screen' => array( 1790 1821 'initiative_name' => 'strategic_partners', … … 1799 1830 'ui_access_point' => "'", 1800 1831 ), 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 ], 1801 1845 'connect_accounts:view_create_account' => array( 1802 1846 'initiative_name' => 'strategic_partners', -
mailchimp-for-woocommerce/trunk/includes/api/class-mailchimp-api.php
r3255500 r3273692 1743 1743 } 1744 1744 } 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 1745 1787 1746 1788 -
mailchimp-for-woocommerce/trunk/includes/class-mailchimp-woocommerce-rest-api.php
r3234127 r3273692 46 46 )); 47 47 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 48 54 register_rest_route(static::$namespace, '/sync/stats/orders', array( 49 55 'methods' => 'GET', … … 55 61 'methods' => 'GET', 56 62 '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'), 57 69 'permission_callback' => array($this, 'permission_callback'), 58 70 )); … … 254 266 'last_loop_at' => mailchimp_get_data('sync.last_loop_at'), 255 267 '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, 256 295 )); 257 296 } … … 490 529 $this->tower($request->get_query_params())->handle() 491 530 ); 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 )); 492 549 } 493 550 -
mailchimp-for-woocommerce/trunk/includes/class-mailchimp-woocommerce-service.php
r3254280 r3273692 389 389 || $post_after->post_content !== $post_before->post_content 390 390 || $post_after->post_status !== $post_before->post_status 391 || $post_after->post_excerpt !== $post_before->post_excerpt 391 392 ) { 392 393 mailchimp_handle_or_queue( new MailChimp_WooCommerce_Single_Product($post_ID), 5); -
mailchimp-for-woocommerce/trunk/includes/class-mailchimp-woocommerce.php
r3253510 r3273692 268 268 // Mailchimp oAuth 269 269 $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' ); 270 271 $this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_oauth_status', $plugin_admin, 'mailchimp_woocommerce_ajax_oauth_status' ); 271 272 $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 82 82 if (!mailchimp_is_configured()) { 83 83 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.");90 84 static::$handling_for = null; 91 85 return false; -
mailchimp-for-woocommerce/trunk/mailchimp-woocommerce.php
r3257919 r3273692 17 17 * Plugin URI: https://mailchimp.com/connect-your-store/ 18 18 * Description: Connects WooCommerce to Mailchimp to sync your store data, send targeted campaigns to your customers, and sell more stuff. 19 * Version: 5. 319 * Version: 5.4 20 20 * Author: Mailchimp 21 21 * Author URI: https://mailchimp.com -
mailchimp-for-woocommerce/trunk/plugin_overview.md
r2184004 r3273692 1 # Mailchimp for Woocommerce Integration1 ## Mailchimp for WooCommerce Integration Guide 2 2 3 In this article, you’ll learn how to connect Mailchimp for WooCommerce.3 This guide provides instructions to seamlessly integrate your WooCommerce store with Mailchimp, outlining installation, configuration, synchronization, and support information. 4 4 5 ## Before You Start5 ## Before You Begin 6 6 7 **Here are some things to know before you begin this process.** 7 Before installing the plugin, ensure: 8 8 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. 10 13 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 12 15 13 - Your host environment must meet [WooCommerce's minimum requirements](https://docs.woocommerce.com/document/server-requirements), including PHP 7.0 or greater. 16 1. **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`. 14 19 15 - WordPress REST API should be enabled in order for this plugin to work. 20 2. **Activate**: 21 - Click **Activate Plugin** upon installation. 16 22 17 - We recommend you use this plugin in a staging environment before installing it on production servers. 23 After activation, you’ll be directed to the initial setup. 18 24 19 - Mailchimp for WooCommerce syncs the customer’s first name, last name, email address, and orders. 25 ## Initial Setup and Synchronization 20 26 21 - WooCommerce customers who haven't signed up for marketing emails will appear in the Transactional portion of your list, and cannot be exported. 27 1. **Connect to Mailchimp**: 28 - Click **Connect Account**. 29 - Log in and authorize Mailchimp to sync data with your WooCommerce store. 22 30 23 ## A Note for Current WooCommerce Integration Users 31 2. **Initial Sync Options**: 24 32 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)** 34 Choose how you'll add your WooCommerce customers to Mailchimp: 26 35 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/). 28 38 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. 31 41 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. 36 44 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/). 39 46 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.) 42 50 43  51 - **Tag WooCommerce customers** 52 Apply tags to contacts imported via the plugin for easier segmentation and personalization. 44 53 45 3 ) Click **Upload Plugin**.54 3. Click **Start Sync** to begin synchronizing your WooCommerce data with Mailchimp. 46 55 47  56 ## Additional Features 48 57 49 4) Click **Choose File** to select the ZIP file for the plugin, then click **Install Now**. 58 Enhance marketing efforts with: 50 59 51  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/). 52 64 53 5) Click **Activate Plugin**. 65 ## Deactivation and Deletion 54 66 55  67 1. **Deactivate**: 68 - Navigate to `Plugins` > `Installed Plugins`. 69 - Click **Deactivate** on Mailchimp for WooCommerce. 56 70 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. 71 2. **Delete (Optional)**: 72 - After deactivation, click **Delete**. 58 73 59 ## Configure and Sync 60 **To configure your Mailchimp settings for WooCommerce customers and sync them to Mailchimp, follow these steps.** 74 Deleting removes synced e-commerce data from WooCommerce but retains subscriber details in Mailchimp. 61 75 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 63 77 64  78 To facilitate troubleshooting, enable remote support: 65 79 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**. 67 83 68  84 For additional assistance: 69 85 70 3) Enter the contact and location details for your WooCommerce Store, and click **Save all changes**. 71 72  73 74 4) Navigate to the **List Settings** tab. 75 76  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  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  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  102 103 3) Click the box next to the Mailchimp for WooCommerce plugin, and click **Deactivate**. 104 105  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 54 54 } 55 55 } 56 \Mailchimp_Woocommerce_DB_Helpers::delete_option('m c-woocommerce-waiting-for-login');56 \Mailchimp_Woocommerce_DB_Helpers::delete_option('mailchimp-woocommerce-waiting-for-login'); 57 57 58 58 } catch (Exception $e) {
Note: See TracChangeset
for help on using the changeset viewer.