MailChimp for WooCommerce - Version 2.1.16

Version Description

  • support for HTML in opt-in checkbox
  • support for language translation
  • fixes abandoned_cart.error
  • support for audience tags
  • adds responsive checkboxes for newsletter settings
  • adds sanitizing function to order ids
  • copy change from List terminology to Audience
Download this release

Release Info

Developer ryanhungate
Plugin Icon wp plugin MailChimp for WooCommerce
Version 2.1.16
Comparing to
See all releases

Code changes from version 2.1.15 to 2.1.16

Files changed (32) hide show
  1. README.txt +18 -11
  2. admin/class-mailchimp-woocommerce-admin.php +24 -12
  3. admin/partials/mailchimp-woocommerce-admin-tabs.php +21 -16
  4. admin/partials/tabs/api_key.php +4 -4
  5. admin/partials/tabs/campaign_defaults.php +17 -13
  6. admin/partials/tabs/logs.php +9 -8
  7. admin/partials/tabs/newsletter_settings.php +49 -35
  8. admin/partials/tabs/notices.php +6 -6
  9. admin/partials/tabs/store_info.php +44 -39
  10. admin/partials/tabs/store_sync.php +10 -10
  11. bootstrap.php +219 -4
  12. includes/api/assets/class-mailchimp-cart.php +5 -3
  13. includes/api/assets/class-mailchimp-order.php +6 -4
  14. includes/api/class-mailchimp-api.php +53 -0
  15. includes/api/class-mailchimp-woocommerce-transform-orders-wc3.php +5 -1
  16. includes/api/class-mailchimp-woocommerce-transform-orders.php +0 -536
  17. includes/api/helpers/class-mailchimp-woocommerce-api-currency-codes.php +1080 -111
  18. includes/class-mailchimp-woocommerce-deactivation-survey.php +18 -9
  19. includes/class-mailchimp-woocommerce-newsletter.php +1 -1
  20. includes/class-mailchimp-woocommerce-privacy.php +2 -1
  21. includes/class-mailchimp-woocommerce-rest-api.php +27 -17
  22. includes/class-mailchimp-woocommerce-service.php +4 -0
  23. includes/class-mailchimp-woocommerce.php +1 -1
  24. includes/processes/class-mailchimp-woocommerce-cart-update.php +11 -1
  25. includes/processes/class-mailchimp-woocommerce-rest-queue.php +8 -5
  26. includes/processes/class-mailchimp-woocommerce-single-order.php +7 -2
  27. includes/vendor/queue.php +0 -103
  28. languages/mailchimp-woocommerce-pt_BR.mo +0 -0
  29. languages/mailchimp-woocommerce-pt_BR.po +764 -0
  30. languages/mailchimp-woocommerce.pot +623 -0
  31. mailchimp-woocommerce.php +2 -2
  32. plugin_overview.md +1 -1
README.txt CHANGED
@@ -4,17 +4,17 @@ Tags: ecommerce,email,workflows,mailchimp
4
  Donate link: https://mailchimp.com
5
  Requires at least: 4.3
6
  Tested up to: 5.1
7
- Stable tag: 2.1.15
8
  Requires PHP: 7.0
9
  WC tested up to: 3.5.4
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
- Connect your store to your Mailchimp list to track sales, create targeted emails, send abandoned cart emails, and more.
13
 
14
  == Description ==
15
  Join the 17 million customers who use Mailchimp, the world's largest marketing automation platform, to develop their e-commerce marketing strategy. With the official Mailchimp for WooCommerce integration, your customers and their purchase data are automatically synced with your Mailchimp account, making it easy to send targeted campaigns, automatically follow up with customers post-purchase, recommend products, recover abandoned carts, and measure the ROI of your marketing efforts. And it's completely free.
16
  With Mailchimp for WooCommerce, you’ll have the power to:
17
- - Sync list and purchase data.
18
  - Set up marketing automations to remind customers about items they left in their cart or viewed on your site, win back lapsed customers, and follow up post-purchase. (Now available for free accounts!)
19
  - Showcase product recommendations.
20
  - Track and segment customers based on purchase history and purchase frequency.
@@ -22,13 +22,12 @@ With Mailchimp for WooCommerce, you’ll have the power to:
22
  - Find new customers, connect with current ones, and drive them all to your website with [Facebook](https://mailchimp.com/features/facebook-ads/) and [Instagram](https://mailchimp.com/features/instagram-ads/) ads. Then, set up [Google remarketing](https://mailchimp.com/features/google-remarketing-ads/) ads to turn your site visitors into shoppers.
23
  - Automatically embed a pop-up form that converts your website visitors to subscribers.
24
  - Add discount codes created in WooCommerce to your emails and automations with a Promo Code content block
25
- - Create beautiful landing pages that make it easy to highlight your products, promote a sale or giveaway, and grow your list.
26
  ###Important Notes
27
- 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.
28
- 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.
29
  WordPress.com compatibility is limited to Business tier users only.
30
- At this time, the synchronization of product categories from WooCommerce to Mailchimp is not supported.
31
- Attention advanced users, theme makers and developers! We have a Wiki to help with advanced workflows and features of the plugin. You can find it on our GitHub Repository. <https://github.com/mailchimp/mc-woocommerce/wiki>
32
  == Installation ==
33
  ###Before You Start
34
  Here are some things to know before you begin this process.
@@ -36,13 +35,13 @@ Here are some things to know before you begin this process.
36
  - Your hosting environment must meet [WooCommerce's minimum requirements](https://docs.woocommerce.com/document/server-requirements), including PHP 7.0 or greater.
37
  - We recommend you use this plugin in a staging environment before installing it on production servers. To learn more about staging environments, [check out these related Wordpress plugins](https://wordpress.org/plugins/search.php?q=staging).
38
  - Mailchimp for WooCommerce syncs the customer’s first name, last name, email address, and orders.
39
- - WooCommerce customers who haven't signed up for marketing emails will appear in the **Transactional** portion of your list, and cannot be exported.
40
  ###Task Roadmap
41
  You’ll need to do a few things to connect your WooCommerce store to Mailchimp.
42
  - Download the plugin.
43
  - Install the plugin on your WordPress Admin site.
44
  - Connect the plugin with your Mailchimp API Key.
45
- - Configure your list settings to complete the data sync process.
46
  ###Advanced Queue Setup In CLI mode
47
  To optimize the performance of your Mailchimp integration - it is recommended that you run the queue in CLI mode.
48
  First define a constant in your config file
@@ -59,10 +58,18 @@ This is helpful with high CPU usage on small servers by making a call to the adm
59
  ### Multi-site Setups
60
  The Mailchimp for WooCommerce supports Wordpress Multi Sites and below are a few things to note.
61
  - Each site that has the plugin installed is a separate connection to Mailchimp.
62
- - Deactivating - disables the plugin from sending data to Mailchimp. Upon reactivating the plugins original setup details will be intact. Deleting is necessary to connect a different Mailchimp list with WooCommerce.
63
  - Deleting removes the connection between Mailchimp and WooCommerce, and uninstalls the plugin from your site.
64
  Refer to the Wordpress Codex for more information about [Multisite Network Administration](https://codex.wordpress.org/Multisite_Network_Administration)
65
  == Changelog ==
 
 
 
 
 
 
 
 
66
  = 2.1.15 =
67
  * adds optional feedback survey on deactivate
68
  * updates syncing engine to use REST API
4
  Donate link: https://mailchimp.com
5
  Requires at least: 4.3
6
  Tested up to: 5.1
7
+ Stable tag: 2.1.16
8
  Requires PHP: 7.0
9
  WC tested up to: 3.5.4
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
+ Connect your store to your Mailchimp audience to track sales, create targeted emails, send abandoned cart emails, and more.
13
 
14
  == Description ==
15
  Join the 17 million customers who use Mailchimp, the world's largest marketing automation platform, to develop their e-commerce marketing strategy. With the official Mailchimp for WooCommerce integration, your customers and their purchase data are automatically synced with your Mailchimp account, making it easy to send targeted campaigns, automatically follow up with customers post-purchase, recommend products, recover abandoned carts, and measure the ROI of your marketing efforts. And it's completely free.
16
  With Mailchimp for WooCommerce, you’ll have the power to:
17
+ - Sync audience and purchase data.
18
  - Set up marketing automations to remind customers about items they left in their cart or viewed on your site, win back lapsed customers, and follow up post-purchase. (Now available for free accounts!)
19
  - Showcase product recommendations.
20
  - Track and segment customers based on purchase history and purchase frequency.
22
  - Find new customers, connect with current ones, and drive them all to your website with [Facebook](https://mailchimp.com/features/facebook-ads/) and [Instagram](https://mailchimp.com/features/instagram-ads/) ads. Then, set up [Google remarketing](https://mailchimp.com/features/google-remarketing-ads/) ads to turn your site visitors into shoppers.
23
  - Automatically embed a pop-up form that converts your website visitors to subscribers.
24
  - Add discount codes created in WooCommerce to your emails and automations with a Promo Code content block
25
+ - Create beautiful landing pages that make it easy to highlight your products, promote a sale or giveaway, and grow your audience.
26
  ###Important Notes
27
+ 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.
28
+ 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.
29
  WordPress.com compatibility is limited to Business tier users only.
30
+ At this time, the synchronization of product categories from WooCommerce to Mailchimp is not supported.
 
31
  == Installation ==
32
  ###Before You Start
33
  Here are some things to know before you begin this process.
35
  - Your hosting environment must meet [WooCommerce's minimum requirements](https://docs.woocommerce.com/document/server-requirements), including PHP 7.0 or greater.
36
  - We recommend you use this plugin in a staging environment before installing it on production servers. To learn more about staging environments, [check out these related Wordpress plugins](https://wordpress.org/plugins/search.php?q=staging).
37
  - Mailchimp for WooCommerce syncs the customer’s first name, last name, email address, and orders.
38
+ - WooCommerce customers who haven't signed up for marketing emails will appear in the **Transactional** portion of your audience, and cannot be exported.
39
  ###Task Roadmap
40
  You’ll need to do a few things to connect your WooCommerce store to Mailchimp.
41
  - Download the plugin.
42
  - Install the plugin on your WordPress Admin site.
43
  - Connect the plugin with your Mailchimp API Key.
44
+ - Configure your audience settings to complete the data sync process.
45
  ###Advanced Queue Setup In CLI mode
46
  To optimize the performance of your Mailchimp integration - it is recommended that you run the queue in CLI mode.
47
  First define a constant in your config file
58
  ### Multi-site Setups
59
  The Mailchimp for WooCommerce supports Wordpress Multi Sites and below are a few things to note.
60
  - Each site that has the plugin installed is a separate connection to Mailchimp.
61
+ - Deactivating - disables the plugin from sending data to Mailchimp. Upon reactivating the plugins original setup details will be intact. Deleting is necessary to connect a different Mailchimp Audience with WooCommerce.
62
  - Deleting removes the connection between Mailchimp and WooCommerce, and uninstalls the plugin from your site.
63
  Refer to the Wordpress Codex for more information about [Multisite Network Administration](https://codex.wordpress.org/Multisite_Network_Administration)
64
  == Changelog ==
65
+ = 2.1.16 =
66
+ * support for HTML in opt-in checkbox
67
+ * support for language translation
68
+ * fixes abandoned_cart.error
69
+ * support for audience tags
70
+ * adds responsive checkboxes for newsletter settings
71
+ * adds sanitizing function to order ids
72
+ * copy change from List terminology to Audience
73
  = 2.1.15 =
74
  * adds optional feedback survey on deactivate
75
  * updates syncing engine to use REST API
admin/class-mailchimp-woocommerce-admin.php CHANGED
@@ -75,7 +75,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
75
  */
76
  public function add_plugin_admin_menu() {
77
  add_menu_page(
78
- 'Mailchimp - WooCommerce Setup',
79
  'Mailchimp',
80
  'manage_options',
81
  $this->plugin_name,
@@ -114,7 +114,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
114
  */
115
  public function add_action_links($links) {
116
  $settings_link = array(
117
- '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_name ) . '">' . __('Settings', $this->plugin_name) . '</a>',
118
  );
119
  return array_merge($settings_link, $links);
120
  }
@@ -424,7 +424,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
424
  */
425
  protected function addInvalidAddressAlert()
426
  {
427
- add_settings_error('mailchimp_store_settings', '', 'As part of the Mailchimp Terms of Use, we require a contact email and a physical mailing address.');
428
  }
429
 
430
  /**
@@ -432,7 +432,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
432
  */
433
  protected function addInvalidPhoneAlert()
434
  {
435
- add_settings_error('mailchimp_store_settings', '', 'As part of the Mailchimp Terms of Use, we require a valid phone number for your store.');
436
  }
437
 
438
  /**
@@ -440,7 +440,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
440
  */
441
  protected function addInvalidStoreNameAlert()
442
  {
443
- add_settings_error('mailchimp_store_settings', '', 'Mailchimp for WooCommerce requires a Store Name to connect your store.');
444
  }
445
 
446
  /**
@@ -458,7 +458,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
458
  'campaign_from_email' => isset($input['campaign_from_email']) && is_email($input['campaign_from_email']) ? $input['campaign_from_email'] : false,
459
  'campaign_subject' => isset($input['campaign_subject']) ? $input['campaign_subject'] : get_option('blogname'),
460
  'campaign_language' => isset($input['campaign_language']) ? $input['campaign_language'] : 'en',
461
- 'campaign_permission_reminder' => isset($input['campaign_permission_reminder']) ? $input['campaign_permission_reminder'] : 'You were subscribed to the newsletter from '.get_option('blogname'),
462
  );
463
 
464
  if (!$this->hasValidCampaignDefaults($data)) {
@@ -491,13 +491,24 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
491
  if (isset($input['mailchimp_checkbox_defaults']) && !empty($input['mailchimp_checkbox_defaults'])) {
492
  $checkbox = $input['mailchimp_checkbox_defaults'];
493
  }
 
 
 
 
 
 
 
 
 
 
494
 
495
  $data = array(
496
  'mailchimp_list' => isset($input['mailchimp_list']) ? $input['mailchimp_list'] : $this->getOption('mailchimp_list', ''),
497
- 'newsletter_label' => isset($input['newsletter_label']) ? $input['newsletter_label'] : $this->getOption('newsletter_label', 'Subscribe to our newsletter'),
498
  'mailchimp_auto_subscribe' => isset($input['mailchimp_auto_subscribe']) ? (bool) $input['mailchimp_auto_subscribe'] : $this->getOption('mailchimp_auto_subscribe', '0'),
499
  'mailchimp_checkbox_defaults' => $checkbox,
500
  'mailchimp_checkbox_action' => isset($input['mailchimp_checkbox_action']) ? $input['mailchimp_checkbox_action'] : $this->getOption('mailchimp_checkbox_action', 'woocommerce_after_checkout_billing_form'),
 
501
  'mailchimp_product_image_key' => isset($input['mailchimp_product_image_key']) ? $input['mailchimp_product_image_key'] : 'medium',
502
  );
503
 
@@ -602,7 +613,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
602
  public function hasValidMailChimpList()
603
  {
604
  if (!$this->hasValidApiKey()) {
605
- add_settings_error('mailchimp_api_key', '', 'You must supply your Mailchimp API key to pull the lists.');
606
  return false;
607
  }
608
 
@@ -989,11 +1000,12 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
989
  */
990
  private function showSyncStartedMessage()
991
  {
992
- $text = 'Starting the sync process…<br/>'.
993
  '<p id="sync-status-message">'.
994
- 'Please hang tight while we work our mojo. '.
995
- 'Sometimes the sync can take a while, especially on sites with lots of orders and/or products.'.
 
996
  '</p>';
997
- add_settings_error('mailchimp-woocommerce_notice', $this->plugin_name, __($text), 'updated');
998
  }
999
  }
75
  */
76
  public function add_plugin_admin_menu() {
77
  add_menu_page(
78
+ __('Mailchimp - WooCommerce Setup', 'mailchimp-woocommerce'),
79
  'Mailchimp',
80
  'manage_options',
81
  $this->plugin_name,
114
  */
115
  public function add_action_links($links) {
116
  $settings_link = array(
117
+ '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_name ) . '">' . __('Settings') . '</a>',
118
  );
119
  return array_merge($settings_link, $links);
120
  }
424
  */
425
  protected function addInvalidAddressAlert()
426
  {
427
+ add_settings_error('mailchimp_store_settings', '', __('As part of the Mailchimp Terms of Use, we require a contact email and a physical mailing address.', 'mailchimp-woocommerce'));
428
  }
429
 
430
  /**
432
  */
433
  protected function addInvalidPhoneAlert()
434
  {
435
+ add_settings_error('mailchimp_store_settings', '', __('As part of the Mailchimp Terms of Use, we require a valid phone number for your store.', 'mailchimp-woocommerce'));
436
  }
437
 
438
  /**
440
  */
441
  protected function addInvalidStoreNameAlert()
442
  {
443
+ add_settings_error('mailchimp_store_settings', '', __('Mailchimp for WooCommerce requires a Store Name to connect your store.', 'mailchimp-woocommerce'));
444
  }
445
 
446
  /**
458
  'campaign_from_email' => isset($input['campaign_from_email']) && is_email($input['campaign_from_email']) ? $input['campaign_from_email'] : false,
459
  'campaign_subject' => isset($input['campaign_subject']) ? $input['campaign_subject'] : get_option('blogname'),
460
  'campaign_language' => isset($input['campaign_language']) ? $input['campaign_language'] : 'en',
461
+ 'campaign_permission_reminder' => isset($input['campaign_permission_reminder']) ? $input['campaign_permission_reminder'] : sprintf(/* translators: %s - plugin name. */esc_html__( 'You were subscribed to the newsletter from %s', $this->plugin_name ),get_option('blogname')),
462
  );
463
 
464
  if (!$this->hasValidCampaignDefaults($data)) {
491
  if (isset($input['mailchimp_checkbox_defaults']) && !empty($input['mailchimp_checkbox_defaults'])) {
492
  $checkbox = $input['mailchimp_checkbox_defaults'];
493
  }
494
+ $sanitized_tags = array_map("sanitize_text_field", explode(",", $input['mailchimp_user_tags']));
495
+
496
+ $allowed_html = array(
497
+ 'a' => array(
498
+ 'href' => array(),
499
+ 'title' => array(),
500
+ 'target' => array()
501
+ ),
502
+ 'br' => array()
503
+ );
504
 
505
  $data = array(
506
  'mailchimp_list' => isset($input['mailchimp_list']) ? $input['mailchimp_list'] : $this->getOption('mailchimp_list', ''),
507
+ 'newsletter_label' => (isset($input['newsletter_label']) && $input['newsletter_label'] != '') ? wp_kses($input['newsletter_label'], $allowed_html) : $this->getOption('newsletter_label', __('Subscribe to our newsletter', 'mailchimp-woocommerce')),
508
  'mailchimp_auto_subscribe' => isset($input['mailchimp_auto_subscribe']) ? (bool) $input['mailchimp_auto_subscribe'] : $this->getOption('mailchimp_auto_subscribe', '0'),
509
  'mailchimp_checkbox_defaults' => $checkbox,
510
  'mailchimp_checkbox_action' => isset($input['mailchimp_checkbox_action']) ? $input['mailchimp_checkbox_action'] : $this->getOption('mailchimp_checkbox_action', 'woocommerce_after_checkout_billing_form'),
511
+ 'mailchimp_user_tags' => isset($input['mailchimp_user_tags']) ? implode(",",$sanitized_tags) : $this->getOption('mailchimp_user_tags'),
512
  'mailchimp_product_image_key' => isset($input['mailchimp_product_image_key']) ? $input['mailchimp_product_image_key'] : 'medium',
513
  );
514
 
613
  public function hasValidMailChimpList()
614
  {
615
  if (!$this->hasValidApiKey()) {
616
+ add_settings_error('mailchimp_api_key', '', __('You must supply your Mailchimp API key to pull the audiences.', 'mailchimp-woocommerce'));
617
  return false;
618
  }
619
 
1000
  */
1001
  private function showSyncStartedMessage()
1002
  {
1003
+ $text = __('Starting the sync process...', 'mailchimp-woocommerce').'<br/>'.
1004
  '<p id="sync-status-message">'.
1005
+ __('Please hang tight while we work our mojo.', 'mailchimp-woocommerce') .
1006
+ ' ' .
1007
+ __('Sometimes the sync can take a while, especially on sites with lots of orders and/or products.', 'mailchimp-woocommerce') .
1008
  '</p>';
1009
+ add_settings_error('mailchimp-woocommerce_notice', $this->plugin_name, $text, 'updated');
1010
  }
1011
  }
admin/partials/mailchimp-woocommerce-admin-tabs.php CHANGED
@@ -45,6 +45,11 @@ if (isset($options['mailchimp_api_key'])) {
45
  $has_api_error = $e->getMessage().' on '.$e->getLine().' in '.$e->getFile();
46
  }
47
  }
 
 
 
 
 
48
  ?>
49
 
50
  <style>
@@ -78,13 +83,13 @@ if (isset($options['mailchimp_api_key'])) {
78
 
79
  <?php if (!defined('PHP_VERSION_ID') || (PHP_VERSION_ID < 70000)): ?>
80
  <div data-dismissible="notice-php-version" class="error notice notice-error is-dismissible">
81
- <p><?php _e('Mailchimp says: Please upgrade your PHP version to a minimum of 7.0', 'mailchimp-woocommerce'); ?></p>
82
  </div>
83
  <?php endif; ?>
84
 
85
  <?php if (!empty($has_api_error)): ?>
86
  <div data-dismissible="notice-api-error" class="error notice notice-error is-dismissible">
87
- <p><?php _e("Mailchimp says: API Request Error - ".$has_api_error, 'mailchimp-woocommerce'); ?></p>
88
  </div>
89
  <?php endif; ?>
90
 
@@ -93,22 +98,22 @@ if (isset($options['mailchimp_api_key'])) {
93
  <!-- Create a header in the default WordPress 'wrap' container -->
94
  <div class="wrap">
95
  <div id="icon-themes" class="icon32"></div>
96
- <h2>Mailchimp Settings</h2>
97
 
98
  <h2 class="nav-tab-wrapper">
99
- <a href="?page=mailchimp-woocommerce&tab=api_key" class="nav-tab <?php echo $active_tab == 'api_key' ? 'nav-tab-active' : ''; ?>">Connect</a>
100
  <?php if($has_valid_api_key): ?>
101
- <a href="?page=mailchimp-woocommerce&tab=store_info" class="nav-tab <?php echo $active_tab == 'store_info' ? 'nav-tab-active' : ''; ?>">Store Settings</a>
102
  <?php if ($handler->hasValidStoreInfo()) : ?>
103
  <?php if($show_campaign_defaults): ?>
104
- <a href="?page=mailchimp-woocommerce&tab=campaign_defaults" class="nav-tab <?php echo $active_tab == 'campaign_defaults' ? 'nav-tab-active' : ''; ?>">List Defaults</a>
105
  <?php endif; ?>
106
  <?php if($handler->hasValidCampaignDefaults()): ?>
107
- <a href="?page=mailchimp-woocommerce&tab=newsletter_settings" class="nav-tab <?php echo $active_tab == 'newsletter_settings' ? 'nav-tab-active' : ''; ?>">List Settings</a>
108
  <?php endif; ?>
109
  <?php if($show_sync_tab): ?>
110
- <a href="?page=mailchimp-woocommerce&tab=sync" class="nav-tab <?php echo $active_tab == 'sync' ? 'nav-tab-active' : ''; ?>">Sync</a>
111
- <a href="?page=mailchimp-woocommerce&tab=logs" class="nav-tab <?php echo $active_tab == 'logs' ? 'nav-tab-active' : ''; ?>">Logs</a>
112
  <?php endif; ?>
113
  <?php endif;?>
114
  <?php endif; ?>
@@ -152,18 +157,18 @@ if (isset($options['mailchimp_api_key'])) {
152
  <?php include_once 'tabs/logs.php'; ?>
153
  <?php endif; ?>
154
 
155
- <?php if ($active_tab !== 'sync' && $active_tab !== 'logs') submit_button('Save all changes', 'primary','submit', TRUE); ?>
156
 
157
  </form>
158
 
159
  <?php if ($active_tab == 'sync'): ?>
160
- <h2 style="padding-top: 1em;">More Information</h2>
161
  <ul>
162
- <li>Have a larger store or having issues syncing? Consider using <a href="https://github.com/mailchimp/mc-woocommerce/issues/158" target="_blank">WP-CLI</a>.</li>
163
- <li>Order and customer information will not sync if they contain an Amazon or generic email address.</li>
164
- <li>Need help to connect your store? Visit the Mailchimp <a href="http://kb.mailchimp.com/integrations/e-commerce/connect-or-disconnect-mailchimp-for-woocommerce/" target="_blank">Knowledge Base</a>.</li>
165
- <li>Want to tell us how we're doing? <a href="https://wordpress.org/support/plugin/mailchimp-for-woocommerce/reviews/" target="_blank">Leave a review on Wordpress.org</a>.</li>
166
- <li>By using this plugin, Mailchimp will process customer information in accordance with their <a href="https://mailchimp.com/legal/privacy/ " target="_blank">Privacy Policy</a>.</li>
167
  </ul>
168
  <?php endif; ?>
169
 
45
  $has_api_error = $e->getMessage().' on '.$e->getLine().' in '.$e->getFile();
46
  }
47
  }
48
+
49
+ if (mailchimp_should_init_rest_queue() && !get_site_transient('http_worker_queue_listen')) {
50
+ mailchimp_call_rest_api_queue_manually();
51
+ }
52
+
53
  ?>
54
 
55
  <style>
83
 
84
  <?php if (!defined('PHP_VERSION_ID') || (PHP_VERSION_ID < 70000)): ?>
85
  <div data-dismissible="notice-php-version" class="error notice notice-error is-dismissible">
86
+ <p><?php esc_html_e('Mailchimp says: Please upgrade your PHP version to a minimum of 7.0', 'mailchimp-woocommerce'); ?></p>
87
  </div>
88
  <?php endif; ?>
89
 
90
  <?php if (!empty($has_api_error)): ?>
91
  <div data-dismissible="notice-api-error" class="error notice notice-error is-dismissible">
92
+ <p><?php esc_html_e("Mailchimp says: API Request Error - ".$has_api_error, 'mailchimp-woocommerce'); ?></p>
93
  </div>
94
  <?php endif; ?>
95
 
98
  <!-- Create a header in the default WordPress 'wrap' container -->
99
  <div class="wrap">
100
  <div id="icon-themes" class="icon32"></div>
101
+ <h2><?= __('Mailchimp for Woocommerce Settings', 'mailchimp-woocommerce');?></h2>
102
 
103
  <h2 class="nav-tab-wrapper">
104
+ <a href="?page=mailchimp-woocommerce&tab=api_key" class="nav-tab <?php echo $active_tab == 'api_key' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Connect', 'mailchimp-woocommerce');?></a>
105
  <?php if($has_valid_api_key): ?>
106
+ <a href="?page=mailchimp-woocommerce&tab=store_info" class="nav-tab <?php echo $active_tab == 'store_info' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Store Settings', 'mailchimp-woocommerce');?></a>
107
  <?php if ($handler->hasValidStoreInfo()) : ?>
108
  <?php if($show_campaign_defaults): ?>
109
+ <a href="?page=mailchimp-woocommerce&tab=campaign_defaults" class="nav-tab <?php echo $active_tab == 'campaign_defaults' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Audience Defaults', 'mailchimp-woocommerce');?></a>
110
  <?php endif; ?>
111
  <?php if($handler->hasValidCampaignDefaults()): ?>
112
+ <a href="?page=mailchimp-woocommerce&tab=newsletter_settings" class="nav-tab <?php echo $active_tab == 'newsletter_settings' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Audience Settings', 'mailchimp-woocommerce');?></a>
113
  <?php endif; ?>
114
  <?php if($show_sync_tab): ?>
115
+ <a href="?page=mailchimp-woocommerce&tab=sync" class="nav-tab <?php echo $active_tab == 'sync' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Sync', 'mailchimp-woocommerce');?></a>
116
+ <a href="?page=mailchimp-woocommerce&tab=logs" class="nav-tab <?php echo $active_tab == 'logs' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Logs', 'mailchimp-woocommerce');?></a>
117
  <?php endif; ?>
118
  <?php endif;?>
119
  <?php endif; ?>
157
  <?php include_once 'tabs/logs.php'; ?>
158
  <?php endif; ?>
159
 
160
+ <?php if ($active_tab !== 'sync' && $active_tab !== 'logs') submit_button(__('Save all changes'), 'primary','submit', TRUE); ?>
161
 
162
  </form>
163
 
164
  <?php if ($active_tab == 'sync'): ?>
165
+ <h2 style="padding-top: 1em;"><?php esc_html_e('More Information', 'mailchimp-woocommerce'); ?></h2>
166
  <ul>
167
+ <li><?= sprintf(/* translators: %s - WP-CLI URL. */wp_kses( __( 'Have a larger store or having issues syncing? Consider using <a href=%s target=_blank>WP-CLI</a>.', 'mailchimp-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://github.com/mailchimp/mc-woocommerce/issues/158' ) );?></li>
168
+ <li><?= esc_html__('Order and customer information will not sync if they contain an Amazon or generic email address.', 'mailchimp-woocommerce');?></li>
169
+ <li><?= sprintf(/* translators: %s - Mailchimp Support URL. */wp_kses( __( 'Need help to connect your store? Visit the Mailchimp <a href=%s target=_blank>Knowledge Base</a>.', 'mailchimp-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://mailchimp.com/help/connect-or-disconnect-mailchimp-for-woocommerce/' ) );?></li>
170
+ <li><?= sprintf(/* translators: %s - Plugin review URL. */wp_kses( __( 'Want to tell us how we\'re doing? <a href=%s target=_blank>Leave a review on Wordpress.org</a>.', 'mailchimp-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://wordpress.org/support/plugin/mailchimp-for-woocommerce/reviews/' ) );?></li>
171
+ <li><?= sprintf(/* translators: %s - Mailchimp Privacy Policy URL. */wp_kses( __( 'By using this plugin, Mailchimp will process customer information in accordance with their <a href=%s target=_blank>Privacy Policy</a>.', 'mailchimp-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://mailchimp.com/legal/privacy/' ) );?></li>
172
  </ul>
173
  <?php endif; ?>
174
 
admin/partials/tabs/api_key.php CHANGED
@@ -1,15 +1,15 @@
1
  <input type="hidden" name="mailchimp_active_settings_tab" value="api_key"/>
2
 
3
- <h2 style="padding-top: 1em;">API Information</h2>
4
- <p>To find your Mailchimp API key, log into your account settings > Extras > API keys. From there, either grab an existing key or generate a new one for your WooCommerce store. </p>
5
 
6
  <!-- remove some meta and generators from the <head> -->
7
  <fieldset>
8
  <legend class="screen-reader-text">
9
- <span>Mailchimp API Key</span>
10
  </legend>
11
  <label for="<?php echo $this->plugin_name; ?>-mailchimp-api-key">
12
  <input style="width: 30%;" type="password" id="<?php echo $this->plugin_name; ?>-mailchimp-api-key" name="<?php echo $this->plugin_name; ?>[mailchimp_api_key]" value="<?php echo isset($options['mailchimp_api_key']) ? $options['mailchimp_api_key'] : '' ?>" />
13
- <span><?php esc_attr_e('Enter your Mailchimp API key.', $this->plugin_name); ?></span>
14
  </label>
15
  </fieldset>
1
  <input type="hidden" name="mailchimp_active_settings_tab" value="api_key"/>
2
 
3
+ <h2 style="padding-top: 1em;"><?php esc_html_e('API Information', $this->plugin_name);?></h2>
4
+ <p><?php esc_html_e('To find your Mailchimp API key, log into your account settings > Extras > API keys. From there, either grab an existing key or generate a new one for your WooCommerce store.', $this->plugin_name);?></p>
5
 
6
  <!-- remove some meta and generators from the <head> -->
7
  <fieldset>
8
  <legend class="screen-reader-text">
9
+ <span><?php esc_html_e('Mailchimp API Key', $this->plugin_name);?></span>
10
  </legend>
11
  <label for="<?php echo $this->plugin_name; ?>-mailchimp-api-key">
12
  <input style="width: 30%;" type="password" id="<?php echo $this->plugin_name; ?>-mailchimp-api-key" name="<?php echo $this->plugin_name; ?>[mailchimp_api_key]" value="<?php echo isset($options['mailchimp_api_key']) ? $options['mailchimp_api_key'] : '' ?>" />
13
+ <span><?php esc_html_e('Enter your Mailchimp API key.', $this->plugin_name); ?></span>
14
  </label>
15
  </fieldset>
admin/partials/tabs/campaign_defaults.php CHANGED
@@ -13,17 +13,17 @@ if (!$handler->hasValidStoreInfo()) {
13
 
14
  <input type="hidden" name="mailchimp_active_settings_tab" value="campaign_defaults"/>
15
 
16
- <h2 style="padding-top: 1em;">List Defaults</h2>
17
- <p>Please fill out the default campaign information.</p>
18
 
19
  <fieldset>
20
  <legend class="screen-reader-text">
21
- <span>Contact Name</span>
22
  </legend>
23
  <label for="<?php echo $this->plugin_name; ?>-campaign-from-name-label">
24
  <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-campaign-from-name-label" name="<?php echo $this->plugin_name; ?>[campaign_from_name]" value="<?php echo isset($options['campaign_from_name']) ? $options['campaign_from_name'] : '' ?>" required/>
25
  <?php
26
- esc_attr_e('Default from name', $this->plugin_name);
27
  if (empty($options['campaign_from_name']) ) {
28
  echo '<span style="color:red;">*</span>';
29
  }
@@ -33,12 +33,12 @@ if (!$handler->hasValidStoreInfo()) {
33
 
34
  <fieldset>
35
  <legend class="screen-reader-text">
36
- <span>From Email</span>
37
  </legend>
38
  <label for="<?php echo $this->plugin_name; ?>-campaign-from-email-label">
39
  <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-campaign-from-email-label" name="<?php echo $this->plugin_name; ?>[campaign_from_email]" value="<?php echo isset($options['campaign_from_email']) ? $options['campaign_from_email'] : get_option('admin_email') ?>" required/>
40
  <?php
41
- esc_attr_e('Default from email', $this->plugin_name);
42
  if (empty($options['campaign_from_email']) ) {
43
  echo '<span style="color:red;">*</span>';
44
  }
@@ -48,12 +48,12 @@ if (!$handler->hasValidStoreInfo()) {
48
 
49
  <fieldset>
50
  <legend class="screen-reader-text">
51
- <span>Default Subject</span>
52
  </legend>
53
  <label for="<?php echo $this->plugin_name; ?>-campaign-subject-label">
54
  <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-campaign-subject-label" name="<?php echo $this->plugin_name; ?>[campaign_subject]" value="<?php echo isset($options['campaign_subject']) ? $options['campaign_subject'] : get_option('blogname') ?>" required/>
55
  <?php
56
- esc_attr_e('Default subject', $this->plugin_name);
57
  if (empty($options['campaign_subject']) ) {
58
  echo '<span style="color:red;">*</span>';
59
  }
@@ -63,7 +63,7 @@ if (!$handler->hasValidStoreInfo()) {
63
 
64
  <fieldset>
65
  <legend class="screen-reader-text">
66
- <span>Default Language</span>
67
  </legend>
68
  <label for="<?php echo $this->plugin_name; ?>-campaign-language-label">
69
  <select id="<?php echo $this->plugin_name; ?>-campaign-language-label" name="<?php echo $this->plugin_name; ?>[campaign_language]" style="width:30%" required>
@@ -75,7 +75,7 @@ if (!$handler->hasValidStoreInfo()) {
75
  ?>
76
  </select>
77
  <?php
78
- esc_attr_e('Default language', $this->plugin_name);
79
  if (empty($options['campaign_language']) ) {
80
  echo '<span style="color:red;">*</span>';
81
  }
@@ -85,12 +85,16 @@ if (!$handler->hasValidStoreInfo()) {
85
 
86
  <fieldset>
87
  <legend class="screen-reader-text">
88
- <span>Permission Reminder</span>
89
  </legend>
90
  <label for="<?php echo $this->plugin_name; ?>-campaign-permission-reminder-label">
91
- <textarea style="width: 30%;" id="<?php echo $this->plugin_name; ?>-campaign-permission-reminder-label" name="<?php echo $this->plugin_name; ?>[campaign_permission_reminder]" required><?php echo isset($options['campaign_permission_reminder']) ? $options['campaign_permission_reminder'] : 'You were subscribed to the newsletter from '.get_option('blogname') ?></textarea>
 
 
 
 
92
  <?php
93
- esc_attr_e('Permission reminder message', $this->plugin_name);
94
  if (empty($options['campaign_permission_reminder']) ) {
95
  echo '<span style="color:red;">*</span>';
96
  }
13
 
14
  <input type="hidden" name="mailchimp_active_settings_tab" value="campaign_defaults"/>
15
 
16
+ <h2 style="padding-top: 1em;"><?php _e('Audience Defaults', $this->plugin_name);?></h2>
17
+ <p><?php esc_html_e('Please fill out the default campaign information.', $this->plugin_name);?></p>
18
 
19
  <fieldset>
20
  <legend class="screen-reader-text">
21
+ <span><?php esc_html_e('Contact Name', $this->plugin_name)?></span>
22
  </legend>
23
  <label for="<?php echo $this->plugin_name; ?>-campaign-from-name-label">
24
  <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-campaign-from-name-label" name="<?php echo $this->plugin_name; ?>[campaign_from_name]" value="<?php echo isset($options['campaign_from_name']) ? $options['campaign_from_name'] : '' ?>" required/>
25
  <?php
26
+ esc_html_e('Default from name', $this->plugin_name);
27
  if (empty($options['campaign_from_name']) ) {
28
  echo '<span style="color:red;">*</span>';
29
  }
33
 
34
  <fieldset>
35
  <legend class="screen-reader-text">
36
+ <span><?php esc_html_e('From Email', $this->plugin_name)?></span>
37
  </legend>
38
  <label for="<?php echo $this->plugin_name; ?>-campaign-from-email-label">
39
  <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-campaign-from-email-label" name="<?php echo $this->plugin_name; ?>[campaign_from_email]" value="<?php echo isset($options['campaign_from_email']) ? $options['campaign_from_email'] : get_option('admin_email') ?>" required/>
40
  <?php
41
+ esc_html_e('Default from email', $this->plugin_name);
42
  if (empty($options['campaign_from_email']) ) {
43
  echo '<span style="color:red;">*</span>';
44
  }
48
 
49
  <fieldset>
50
  <legend class="screen-reader-text">
51
+ <span><?php esc_html_e('Default subject', $this->plugin_name)?></span>
52
  </legend>
53
  <label for="<?php echo $this->plugin_name; ?>-campaign-subject-label">
54
  <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-campaign-subject-label" name="<?php echo $this->plugin_name; ?>[campaign_subject]" value="<?php echo isset($options['campaign_subject']) ? $options['campaign_subject'] : get_option('blogname') ?>" required/>
55
  <?php
56
+ esc_html_e('Default subject', $this->plugin_name);
57
  if (empty($options['campaign_subject']) ) {
58
  echo '<span style="color:red;">*</span>';
59
  }
63
 
64
  <fieldset>
65
  <legend class="screen-reader-text">
66
+ <span><?php esc_html_e('Default language', $this->plugin_name)?></span>
67
  </legend>
68
  <label for="<?php echo $this->plugin_name; ?>-campaign-language-label">
69
  <select id="<?php echo $this->plugin_name; ?>-campaign-language-label" name="<?php echo $this->plugin_name; ?>[campaign_language]" style="width:30%" required>
75
  ?>
76
  </select>
77
  <?php
78
+ esc_html_e('Default language', $this->plugin_name);
79
  if (empty($options['campaign_language']) ) {
80
  echo '<span style="color:red;">*</span>';
81
  }
85
 
86
  <fieldset>
87
  <legend class="screen-reader-text">
88
+ <span><?php esc_html_e('Permission Reminder', $this->plugin_name)?></span>
89
  </legend>
90
  <label for="<?php echo $this->plugin_name; ?>-campaign-permission-reminder-label">
91
+ <textarea
92
+ style="width: 30%;"
93
+ id="<?php echo $this->plugin_name; ?>-campaign-permission-reminder-label"
94
+ name="<?php echo $this->plugin_name; ?>[campaign_permission_reminder]"
95
+ required><?php echo isset($options['campaign_permission_reminder']) ? $options['campaign_permission_reminder'] : sprintf(/* translators: %s - plugin name. */esc_html__( 'You were subscribed to the newsletter from %s', $this->plugin_name ),get_option('blogname'));?></textarea>
96
  <?php
97
+ esc_html_e('Permission reminder message', $this->plugin_name);
98
  if (empty($options['campaign_permission_reminder']) ) {
99
  echo '<span style="color:red;">*</span>';
100
  }
admin/partials/tabs/logs.php CHANGED
@@ -32,22 +32,23 @@ if (!empty($requested_log_file) && isset($logs[sanitize_title($requested_log_fil
32
  $handle = !empty($viewed_log) ? substr($viewed_log, 0, strlen($viewed_log) > 37 ? strlen($viewed_log) - 37 : strlen($viewed_log) - 4) : '';
33
  ?>
34
 
35
- <h2 style="padding-top: 1em;">Logging Preference</h2>
36
  <p>
37
- Advanced troubleshooting can be conducted with the logging capability turned on.
38
- By default, it’s set to “none” and you may toggle to either “standard” or “debug” as needed.
39
- With standard logging, you can see basic information about the data submission to Mailchimp including any errors.
40
- “Debug” gives a much deeper insight that is useful to share with support if problems arise.
 
41
  </p>
42
  <fieldset>
43
  <legend class="screen-reader-text">
44
- <span>Logging Preference</span>
45
  </legend>
46
  <label for="<?php echo $this->plugin_name; ?>-logging">
47
  <select name="<?php echo $this->plugin_name; ?>[mailchimp_logging]" style="width:30%" required>
48
  <?php $logging_preference = mailchimp_environment_variables()->logging; ?>
49
  <?php
50
- foreach(array('none' => 'None', 'debug' => 'Debug', 'standard' => 'Standard',) as $log_value => $log_label) {
51
  echo '<option value="'.esc_attr($log_value).'" '.selected($log_value === $logging_preference, true, false ) . '>' . esc_html($log_label) . '</option>';
52
  }
53
  ?>
@@ -55,7 +56,7 @@ $handle = !empty($viewed_log) ? substr($viewed_log, 0, strlen($viewed_log) > 37
55
  </label>
56
  </fieldset>
57
 
58
- <?php submit_button('Save all changes', 'primary','submit', TRUE);?>
59
 
60
  <?php if (isset($logs) && isset($viewed_log)) : ?>
61
  <div id="log-viewer-select">
32
  $handle = !empty($viewed_log) ? substr($viewed_log, 0, strlen($viewed_log) > 37 ? strlen($viewed_log) - 37 : strlen($viewed_log) - 4) : '';
33
  ?>
34
 
35
+ <h2 style="padding-top: 1em;"><?php esc_html_e('Logging Preference', 'mailchimp-woocommerce');?></h2>
36
  <p>
37
+ <?php esc_html_e('Advanced troubleshooting can be conducted with the logging capability turned on.
38
+ By default, it’s set to “none” and you may toggle to either “standard” or “debug” as needed.
39
+ With standard logging, you can see basic information about the data submission to Mailchimp including any errors.
40
+ “Debug” gives a much deeper insight that is useful to share with support if problems arise.', 'mailchimp-woocommerce');
41
+ ?>
42
  </p>
43
  <fieldset>
44
  <legend class="screen-reader-text">
45
+ <span><?php esc_html_e('Logging Preference', 'mailchimp-woocommerce');?></span>
46
  </legend>
47
  <label for="<?php echo $this->plugin_name; ?>-logging">
48
  <select name="<?php echo $this->plugin_name; ?>[mailchimp_logging]" style="width:30%" required>
49
  <?php $logging_preference = mailchimp_environment_variables()->logging; ?>
50
  <?php
51
+ foreach(array('none' => esc_html__('None', 'mailchimp-woocommerce'), 'debug' => esc_html__('Debug', 'mailchimp-woocommerce'), 'standard' => esc_html__('Standard', 'mailchimp-woocommerce')) as $log_value => $log_label) {
52
  echo '<option value="'.esc_attr($log_value).'" '.selected($log_value === $logging_preference, true, false ) . '>' . esc_html($log_label) . '</option>';
53
  }
54
  ?>
56
  </label>
57
  </fieldset>
58
 
59
+ <?php submit_button(__('Save all changes'), 'primary','submit', TRUE);?>
60
 
61
  <?php if (isset($logs) && isset($viewed_log)) : ?>
62
  <div id="log-viewer-select">
admin/partials/tabs/newsletter_settings.php CHANGED
@@ -26,28 +26,28 @@ $list_is_configured = isset($options['mailchimp_list']) && (!empty($options['mai
26
 
27
  <?php if(($newsletter_settings_error = $this->getData('errors.mailchimp_list', false))) : ?>
28
  <div class="error notice is-dismissable">
29
- <p><?php _e($newsletter_settings_error, 'mailchimp-woocommerce'); ?></p>
30
  </div>
31
  <?php endif; ?>
32
 
33
  <input type="hidden" name="mailchimp_active_settings_tab" value="newsletter_settings"/>
34
 
35
- <h2 style="padding-top: 1em;">List Settings</h2>
36
- <p>Please apply your list settings. If you don't have a list, you can choose to create one.</p>
37
 
38
  <fieldset>
39
  <legend class="screen-reader-text">
40
- <span>List Name</span>
41
  </legend>
42
  <label for="<?php echo $this->plugin_name; ?>-mailchimp-list-label">
43
  <select name="<?php echo $this->plugin_name; ?>[mailchimp_list]" style="width:30%" required <?php if($list_is_configured): ?> disabled <?php endif; ?>>
44
 
45
  <?php if(!isset($allow_new_list) || $allow_new_list === true): ?>
46
- <option value="create_new">Create New List</option>
47
  <?php endif ?>
48
 
49
  <?php if(isset($allow_new_list) && $allow_new_list === false): ?>
50
- <option value="">-- Select List --</option>
51
  <?php endif; ?>
52
 
53
  <?php
@@ -59,13 +59,13 @@ $list_is_configured = isset($options['mailchimp_list']) && (!empty($options['mai
59
  }
60
  ?>
61
  </select>
62
- <span><?php esc_attr_e('Choose a list to sync with your store.', $this->plugin_name); ?></span>
63
  </label>
64
  </fieldset>
65
 
66
  <fieldset>
67
  <legend class="screen-reader-text">
68
- <span>Auto Subscribe On Initial Sync</span>
69
  </legend>
70
  <label for="<?php echo $this->plugin_name; ?>-mailchimp-auto-subscribe">
71
  <select name="<?php echo $this->plugin_name; ?>[mailchimp_auto_subscribe]" style="width:30%" required <?php if($list_is_configured): ?> disabled <?php endif; ?>>
@@ -73,67 +73,81 @@ $list_is_configured = isset($options['mailchimp_list']) && (!empty($options['mai
73
  <?php
74
  $enable_auto_subscribe = (array_key_exists('mailchimp_auto_subscribe', $options) && !is_null($options['mailchimp_auto_subscribe'])) ? $options['mailchimp_auto_subscribe'] : '1';
75
 
76
- foreach (array('0' => 'No', '1' => 'Yes') as $key => $value ) {
77
  echo '<option value="' . esc_attr( $key ) . '" ' . selected($key == $enable_auto_subscribe, true, false ) . '>' . esc_html( $value ) . '</option>';
78
  }
79
  ?>
80
 
81
  </select>
82
- <span><?php esc_attr_e('During initial sync, auto subscribe the existing customers.', $this->plugin_name); ?></span>
83
  </label>
84
  </fieldset>
85
 
86
- <h2 style="padding-top: 1em;">Opt-in Settings</h2>
87
- <p>Add text to go along with the opt-in checkbox, and choose a default display option. Customers can click a box at checkout to opt in to your newsletter. Write a signup message and choose how you want this checkbox to appear. </p>
88
 
89
  <fieldset>
90
  <legend class="screen-reader-text">
91
- <span>Newsletter Label</span>
92
  </legend>
93
  <label for="<?php echo $this->plugin_name; ?>-newsletter-checkbox-label">
94
- <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-newsletter-checkbox-label" name="<?php echo $this->plugin_name; ?>[newsletter_label]" value="<?php echo isset($options['newsletter_label']) ? $options['newsletter_label'] : 'Subscribe to our newsletter' ?>" />
95
- <span><?php esc_attr_e('Enter text for the opt-in checkbox', $this->plugin_name); ?></span>
96
  </label>
 
97
  </fieldset>
98
 
99
- <h4 style="padding-top: 1em;font-weight:normal;">Checkbox Display Options</h4>
100
 
101
  <fieldset>
102
  <legend class="screen-reader-text">
103
- <span>Checkbox Display Options</span>
104
  </legend>
105
- <label for="<?php echo $this->plugin_name; ?>-newsletter-checkbox-defaults">
106
- <?php $checkbox_default_settings = (array_key_exists('mailchimp_checkbox_defaults', $options) && !is_null($options['mailchimp_checkbox_defaults'])) ? $options['mailchimp_checkbox_defaults'] : 'check'; ?>
107
- <input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="check"<?php if($checkbox_default_settings === 'check') echo ' checked="checked" '; ?>>Visible, checked by default<br>
108
- <input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="uncheck"<?php if($checkbox_default_settings === 'uncheck') echo ' checked="checked" '; ?>>Visible, unchecked by default<br/>
109
- <input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="hide"<?php if($checkbox_default_settings === 'hide') echo ' checked="checked" '; ?>>Hidden, unchecked by default<br/>
 
 
 
 
 
 
110
  </label>
111
  </fieldset>
112
 
113
- <h4 style="padding-top: 1em;font-weight:normal;">Advanced Checkbox Settings</h4>
114
- <p>
115
- To change the location of the opt-in checkbox at checkout, input one of the
116
- <a href="https://docs.woocommerce.com/wc-apidocs/hook-docs.html" target="_blank">
117
- available WooCommerce form actions.
118
- </a>
119
- </p>
120
 
121
  <fieldset>
122
  <legend class="screen-reader-text">
123
- <span>Newsletter Checkbox Action</span>
124
  </legend>
125
  <label for="<?php echo $this->plugin_name; ?>-newsletter-checkbox-action">
126
  <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-newsletter-checkbox-action" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_action]" value="<?php echo isset($options['mailchimp_checkbox_action']) ? $options['mailchimp_checkbox_action'] : 'woocommerce_after_checkout_billing_form' ?>" />
127
- <span><?php esc_attr_e('Enter a WooCommerce form action', $this->plugin_name); ?></span>
 
 
 
 
 
 
 
 
 
 
 
 
128
  </label>
129
  </fieldset>
130
 
131
- <h2 style="padding-top: 1em;">Product Image Size</h2>
132
- <p>Define the product image size used by abandoned carts, order notifications, and product recommendations.</p>
133
 
134
  <fieldset>
135
  <legend class="screen-reader-text">
136
- <span>Product Image Size</span>
137
  </legend>
138
  <label for="<?php echo $this->plugin_name; ?>-mailchimp-product_image_key">
139
  <select name="<?php echo $this->plugin_name; ?>[mailchimp_product_image_key]" style="width:30%">
@@ -144,6 +158,6 @@ $list_is_configured = isset($options['mailchimp_list']) && (!empty($options['mai
144
  }
145
  ?>
146
  </select>
147
- <span><?php esc_attr_e('Select an image size', $this->plugin_name); ?></span>
148
  </label>
149
  </fieldset>
26
 
27
  <?php if(($newsletter_settings_error = $this->getData('errors.mailchimp_list', false))) : ?>
28
  <div class="error notice is-dismissable">
29
+ <p><?php echo $newsletter_settings_error; ?></p>
30
  </div>
31
  <?php endif; ?>
32
 
33
  <input type="hidden" name="mailchimp_active_settings_tab" value="newsletter_settings"/>
34
 
35
+ <h2 style="padding-top: 1em;"><?php esc_html_e('Audience Settings', 'mailchimp-woocommerce');?></h2>
36
+ <p><?php esc_html_e('Please apply your audience settings. If you don\'t have an audience, you can choose to create one.', 'mailchimp-woocommerce');?></p>
37
 
38
  <fieldset>
39
  <legend class="screen-reader-text">
40
+ <span><?php esc_html_e('Audience Name', 'mailchimp-woocommerce');?></span>
41
  </legend>
42
  <label for="<?php echo $this->plugin_name; ?>-mailchimp-list-label">
43
  <select name="<?php echo $this->plugin_name; ?>[mailchimp_list]" style="width:30%" required <?php if($list_is_configured): ?> disabled <?php endif; ?>>
44
 
45
  <?php if(!isset($allow_new_list) || $allow_new_list === true): ?>
46
+ <option value="create_new"><?php esc_html_e('Create New Audience', 'mailchimp-woocommerce');?></option>
47
  <?php endif ?>
48
 
49
  <?php if(isset($allow_new_list) && $allow_new_list === false): ?>
50
+ <option value="">-- <?php esc_html_e('Select Audience', 'mailchimp-woocommerce');?> --</option>
51
  <?php endif; ?>
52
 
53
  <?php
59
  }
60
  ?>
61
  </select>
62
+ <span><?php esc_html_e('Choose an audience to sync with your store.', $this->plugin_name); ?></span>
63
  </label>
64
  </fieldset>
65
 
66
  <fieldset>
67
  <legend class="screen-reader-text">
68
+ <span><?php esc_html_e('Auto Subscribe On Initial Sync', 'mailchimp-woocommerce');?></span>
69
  </legend>
70
  <label for="<?php echo $this->plugin_name; ?>-mailchimp-auto-subscribe">
71
  <select name="<?php echo $this->plugin_name; ?>[mailchimp_auto_subscribe]" style="width:30%" required <?php if($list_is_configured): ?> disabled <?php endif; ?>>
73
  <?php
74
  $enable_auto_subscribe = (array_key_exists('mailchimp_auto_subscribe', $options) && !is_null($options['mailchimp_auto_subscribe'])) ? $options['mailchimp_auto_subscribe'] : '1';
75
 
76
+ foreach (array('0' => esc_html__('No', 'mailchimp-woocommerce'), '1' => esc_html__('Yes', 'mailchimp-woocommerce')) as $key => $value ) {
77
  echo '<option value="' . esc_attr( $key ) . '" ' . selected($key == $enable_auto_subscribe, true, false ) . '>' . esc_html( $value ) . '</option>';
78
  }
79
  ?>
80
 
81
  </select>
82
+ <span><?php esc_html_e('During initial sync, auto subscribe the existing customers.', $this->plugin_name); ?></span>
83
  </label>
84
  </fieldset>
85
 
86
+ <h2 style="padding-top: 1em;"><?php esc_html_e('Opt-in Settings', 'mailchimp-woocommerce');?></h2>
87
+ <p><?php esc_html_e('Add text to go along with the opt-in checkbox, and choose a default display option. Customers can click a box at checkout to opt in to your newsletter. Write a signup message and choose how you want this checkbox to appear.', 'mailchimp-woocommerce');?> </p>
88
 
89
  <fieldset>
90
  <legend class="screen-reader-text">
91
+ <span><?php esc_html_e('Newsletter Label', 'mailchimp-woocommerce');?></span>
92
  </legend>
93
  <label for="<?php echo $this->plugin_name; ?>-newsletter-checkbox-label">
94
+ <textarea style="width: 30%;" rows="3" id="<?php echo $this->plugin_name; ?>-newsletter-checkbox-label" name="<?php echo $this->plugin_name; ?>[newsletter_label]"><?php echo isset($options['newsletter_label']) ? esc_html($options['newsletter_label']) : esc_html__('Subscribe to our newsletter', 'mailchimp-woocommerce'); ?></textarea>
95
+ <span><?php esc_html_e('Enter text for the opt-in checkbox', $this->plugin_name); ?></span>
96
  </label>
97
+ <p class="description"><?= esc_html(__('HTML tags allowed: <a href="" target="" title=""></a> and <br>', 'mailchimp-woocommerce')); ?></p>
98
  </fieldset>
99
 
100
+ <h4 style="padding-top: 1em;"><?php esc_html_e('Checkbox Display Options', 'mailchimp-woocommerce');?></h4>
101
 
102
  <fieldset>
103
  <legend class="screen-reader-text">
104
+ <span><?php esc_html_e('Checkbox Display Options', 'mailchimp-woocommerce');?></span>
105
  </legend>
106
+ <?php $checkbox_default_settings = (array_key_exists('mailchimp_checkbox_defaults', $options) && !is_null($options['mailchimp_checkbox_defaults'])) ? $options['mailchimp_checkbox_defaults'] : 'check'; ?>
107
+ <label>
108
+ <input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="check"<?php if($checkbox_default_settings === 'check') echo ' checked="checked" '; ?>><?php esc_html_e('Visible, checked by default', 'mailchimp-woocommerce');?><br>
109
+ </label>
110
+ <br/>
111
+ <label>
112
+ <input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="uncheck"<?php if($checkbox_default_settings === 'uncheck') echo ' checked="checked" '; ?>><?php esc_html_e('Visible, unchecked by default', 'mailchimp-woocommerce');?><br/>
113
+ </label>
114
+ <br/>
115
+ <label>
116
+ <input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="hide"<?php if($checkbox_default_settings === 'hide') echo ' checked="checked" '; ?>><?php esc_html_e('Hidden, unchecked by default', 'mailchimp-woocommerce');?><br/>
117
  </label>
118
  </fieldset>
119
 
120
+ <h4 style="padding-top: 1em;"><?php esc_html_e('Advanced Checkbox Settings', 'mailchimp-woocommerce');?></h4>
121
+ <p><?= sprintf(/* translators: %s - Woocommerce Actions documentation URL. */wp_kses( __( 'To change the location of the opt-in checkbox at checkout, input one of the <a href=%s target=_blank>available WooCommerce form actions.</a>.', 'mailchimp-woocommerce' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( 'https://docs.woocommerce.com/wc-apidocs/hook-docs.html' ) ); ?></p>
 
 
 
 
 
122
 
123
  <fieldset>
124
  <legend class="screen-reader-text">
125
+ <span><?php esc_html_e('Newsletter Checkbox Action', 'mailchimp-woocommerce');?></span>
126
  </legend>
127
  <label for="<?php echo $this->plugin_name; ?>-newsletter-checkbox-action">
128
  <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-newsletter-checkbox-action" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_action]" value="<?php echo isset($options['mailchimp_checkbox_action']) ? $options['mailchimp_checkbox_action'] : 'woocommerce_after_checkout_billing_form' ?>" />
129
+ <span><?php esc_html_e('Enter a WooCommerce form action', $this->plugin_name); ?></span>
130
+ </label>
131
+ </fieldset>
132
+
133
+ <h2 style="padding-top: 1em;"><?php esc_html_e('Audience Member Tags', 'mailchimp-woocommerce');?></h2>
134
+ <p><?= __( 'Add a comma separated list of tags to add to the user at Mailchimp', 'mailchimp-woocommerce' ); ?></p>
135
+
136
+ <fieldset>
137
+ <legend class="screen-reader-text">
138
+ <span><?php esc_html_e('Audience Member Tags', 'mailchimp-woocommerce');?></span>
139
+ </legend>
140
+ <label for="<?php echo $this->plugin_name; ?>-user-tags">
141
+ <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-user-tags" name="<?php echo $this->plugin_name; ?>[mailchimp_user_tags]" value="<?php echo isset($options['mailchimp_user_tags']) ? str_replace(',',', ',$options['mailchimp_user_tags']) : '' ?>" />
142
  </label>
143
  </fieldset>
144
 
145
+ <h2 style="padding-top: 1em;"><?php esc_html_e('Product Image Size', 'mailchimp-woocommerce');?></h2>
146
+ <p><?php esc_html_e('Define the product image size used by abandoned carts, order notifications, and product recommendations.', 'mailchimp-woocommerce');?></p>
147
 
148
  <fieldset>
149
  <legend class="screen-reader-text">
150
+ <span><?php esc_html_e('Product Image Size', 'mailchimp-woocommerce');?></span>
151
  </legend>
152
  <label for="<?php echo $this->plugin_name; ?>-mailchimp-product_image_key">
153
  <select name="<?php echo $this->plugin_name; ?>[mailchimp_product_image_key]" style="width:30%">
158
  }
159
  ?>
160
  </select>
161
+ <span><?php esc_html_e('Select an image size', $this->plugin_name); ?></span>
162
  </label>
163
  </fieldset>
admin/partials/tabs/notices.php CHANGED
@@ -3,19 +3,19 @@
3
  <?php
4
  switch($_GET['error_notice']) {
5
  case 'missing_api_key':
6
- _e('Mailchimp says: You must enter in a valid API key.', 'mailchimp-woocommerce');
7
  break;
8
  case 'missing_campaign_defaults':
9
- _e('Mailchimp says: Sorry you must set up your campaign defaults before you proceed!', 'mailchimp-woocommerce');
10
  break;
11
  case 'missing_list':
12
- _e('Mailchimp says: You must select a marketing list.', 'mailchimp-woocommerce');
13
  break;
14
  case 'missing_store':
15
- _e('Mailchimp says: Sorry you must set up your store before you proceed!', 'mailchimp-woocommerce');
16
  break;
17
  case 'not_ready_for_sync':
18
- _e('Mailchimp says: You are not fully ready to run the Store Sync, please verify your settings before proceeding.', 'mailchimp-woocommerce');
19
  break;
20
  default:
21
 
@@ -29,7 +29,7 @@
29
  <?php
30
  switch($_GET['error_notice']) {
31
  case 're-sync-started':
32
- _e('Mailchimp says: Your re-sync has been started!', 'mailchimp-woocommerce');
33
  break;
34
  default:
35
  }
3
  <?php
4
  switch($_GET['error_notice']) {
5
  case 'missing_api_key':
6
+ esc_html_e('Mailchimp says: You must enter in a valid API key.', 'mailchimp-woocommerce');
7
  break;
8
  case 'missing_campaign_defaults':
9
+ esc_html_e('Mailchimp says: Sorry you must set up your campaign defaults before you proceed!', 'mailchimp-woocommerce');
10
  break;
11
  case 'missing_list':
12
+ esc_html_e('Mailchimp says: You must select a marketing audience.', 'mailchimp-woocommerce');
13
  break;
14
  case 'missing_store':
15
+ esc_html_e('Mailchimp says: Sorry you must set up your store before you proceed!', 'mailchimp-woocommerce');
16
  break;
17
  case 'not_ready_for_sync':
18
+ esc_html_e('Mailchimp says: You are not fully ready to run the Store Sync, please verify your settings before proceeding.', 'mailchimp-woocommerce');
19
  break;
20
  default:
21
 
29
  <?php
30
  switch($_GET['error_notice']) {
31
  case 're-sync-started':
32
+ esc_html_e('Mailchimp says: Your re-sync has been started!', 'mailchimp-woocommerce');
33
  break;
34
  default:
35
  }
admin/partials/tabs/store_info.php CHANGED
@@ -10,21 +10,21 @@ if (!$handler->hasValidApiKey()) {
10
  ?>
11
  <input type="hidden" name="mailchimp_active_settings_tab" value="store_info"/>
12
 
13
- <h2 style="padding-top: 1em;">Store Settings</h2>
14
- <p>Please provide the following information about your WooCommerce store.</p>
15
 
16
  <fieldset>
17
  <legend class="screen-reader-text">
18
- <span>Store Name</span>
19
  </legend>
20
  <label for="<?php echo $this->plugin_name; ?>-store-name-label">
21
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-name-label" name="<?php echo $this->plugin_name; ?>[store_name]" value="<?php echo isset($options['store_name']) ? $options['store_name'] : get_option('blogname') ?>" />
22
  <span>
23
  <?php
24
  if (!empty($options['store_name']) ) {
25
- esc_attr_e('Name', $this->plugin_name);
26
  } else {
27
- esc_attr_e('Name', $this->plugin_name); echo '<span style="color:red;">*</span>';
28
  }
29
  ?>
30
  </span>
@@ -33,16 +33,16 @@ if (!$handler->hasValidApiKey()) {
33
 
34
  <fieldset>
35
  <legend class="screen-reader-text">
36
- <span>Email</span>
37
  </legend>
38
  <label for="<?php echo $this->plugin_name; ?>-admin-email-label">
39
  <input required style="width: 30%;" type="email" id="<?php echo $this->plugin_name; ?>-admin-email-label" name="<?php echo $this->plugin_name; ?>[admin_email]" value="<?php echo isset($options['admin_email']) ? $options['admin_email'] : get_option('admin_email') ?>" />
40
  <span>
41
  <?php
42
  if (!empty($options['admin_email']) ) {
43
- esc_attr_e('Email', $this->plugin_name);
44
  } else {
45
- esc_attr_e('Email', $this->plugin_name); echo '<span style="color:red;">*</span>';
46
  }
47
  ?>
48
  </span>
@@ -51,16 +51,16 @@ if (!$handler->hasValidApiKey()) {
51
 
52
  <fieldset>
53
  <legend class="screen-reader-text">
54
- <span>Street Address</span>
55
  </legend>
56
  <label for="<?php echo $this->plugin_name; ?>-store-address-label">
57
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-address-label" name="<?php echo $this->plugin_name; ?>[store_street]" value="<?php echo isset($options['store_street']) ? $options['store_street'] : '' ?>" />
58
  <span>
59
  <?php
60
  if (!empty($options['store_street']) ) {
61
- esc_attr_e('Street address', $this->plugin_name);
62
  } else {
63
- esc_attr_e('Street address', $this->plugin_name); echo '<span style="color:red;">*</span>';
64
  }
65
  ?>
66
  </span>
@@ -69,16 +69,16 @@ if (!$handler->hasValidApiKey()) {
69
 
70
  <fieldset>
71
  <legend class="screen-reader-text">
72
- <span>City</span>
73
  </legend>
74
  <label for="<?php echo $this->plugin_name; ?>-store-city-label">
75
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-city-label" name="<?php echo $this->plugin_name; ?>[store_city]" value="<?php echo isset($options['store_city']) ? $options['store_city'] : '' ?>" />
76
  <span>
77
  <?php
78
  if (!empty($options['store_city']) ) {
79
- esc_attr_e('City', $this->plugin_name);
80
  } else {
81
- esc_attr_e('City', $this->plugin_name); echo '<span style="color:red;">*</span>';
82
  }
83
  ?>
84
  </span>
@@ -87,16 +87,16 @@ if (!$handler->hasValidApiKey()) {
87
 
88
  <fieldset>
89
  <legend class="screen-reader-text">
90
- <span>State</span>
91
  </legend>
92
  <label for="<?php echo $this->plugin_name; ?>-store-state-label">
93
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-state-label" name="<?php echo $this->plugin_name; ?>[store_state]" value="<?php echo isset($options['store_state']) ? $options['store_state'] : '' ?>" />
94
  <span>
95
  <?php
96
  if (!empty($options['store_state']) ) {
97
- esc_attr_e('State', $this->plugin_name);
98
  } else {
99
- esc_attr_e('State', $this->plugin_name); echo '<span style="color:red;">*</span>';
100
  }
101
  ?>
102
  </span>
@@ -105,16 +105,16 @@ if (!$handler->hasValidApiKey()) {
105
 
106
  <fieldset>
107
  <legend class="screen-reader-text">
108
- <span>Postal Code</span>
109
  </legend>
110
  <label for="<?php echo $this->plugin_name; ?>-store-postal-code-label">
111
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-postal-code-label" name="<?php echo $this->plugin_name; ?>[store_postal_code]" value="<?php echo isset($options['store_postal_code']) ? $options['store_postal_code'] : '' ?>" />
112
  <span>
113
  <?php
114
  if (!empty($options['store_postal_code']) ) {
115
- esc_attr_e('Postal Code', $this->plugin_name);
116
  } else {
117
- esc_attr_e('Postal Code', $this->plugin_name); echo '<span style="color:red;">*</span>';
118
  }
119
  ?>
120
  </span>
@@ -123,16 +123,16 @@ if (!$handler->hasValidApiKey()) {
123
 
124
  <fieldset>
125
  <legend class="screen-reader-text">
126
- <span>Country</span>
127
  </legend>
128
  <label for="<?php echo $this->plugin_name; ?>-store-country-label">
129
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-country-label" name="<?php echo $this->plugin_name; ?>[store_country]" value="<?php echo isset($options['store_country']) ? $options['store_country'] : 'US' ?>" />
130
  <span>
131
  <?php
132
  if (!empty($options['store_country'])) {
133
- esc_attr_e('Country', $this->plugin_name);
134
  } else {
135
- esc_attr_e('Country', $this->plugin_name); echo '<span style="color:red;">*</span>';
136
  }
137
  ?>
138
  </span>
@@ -141,29 +141,29 @@ if (!$handler->hasValidApiKey()) {
141
 
142
  <fieldset>
143
  <legend class="screen-reader-text">
144
- <span>Phone</span>
145
  </legend>
146
  <label for="<?php echo $this->plugin_name; ?>-store-phone-label">
147
- <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-phone-label" name="<?php echo $this->plugin_name; ?>[store_phone]" value="<?php echo isset($options['store_phone']) ? $options['store_phone'] : '' ?>" />
148
  <span>
149
  <?php
150
  if (!empty($options['store_phone']) ) {
151
- esc_attr_e('Phone Number', $this->plugin_name);
152
  } else {
153
- esc_attr_e('Phone Number', $this->plugin_name); echo '<span style="color:red;">*</span>';
154
  }
155
  ?>
156
  </span>
157
  </label>
158
  </fieldset>
159
 
160
- <h2 style="padding-top: 1em;">Locale Settings</h2>
161
 
162
- <p>Please apply your locale settings. If you're unsure about these, use the defaults.</p>
163
 
164
  <fieldset>
165
  <legend class="screen-reader-text">
166
- <span>Locale</span>
167
  </legend>
168
  <label for="<?php echo $this->plugin_name; ?>-store-locale-label">
169
  <select name="<?php echo $this->plugin_name; ?>[store_locale]" style="width:30%" required>
@@ -174,30 +174,35 @@ if (!$handler->hasValidApiKey()) {
174
  }
175
  ?>
176
  </select>
177
- <span><?php esc_attr_e('Locale', $this->plugin_name); ?></span>
178
  </label>
179
  </fieldset>
180
 
181
  <fieldset>
182
  <legend class="screen-reader-text">
183
- <span>Currency Code</span>
184
  </legend>
185
  <label for="<?php echo $this->plugin_name; ?>-store-currency-code-label">
186
- <select name="<?php echo $this->plugin_name; ?>[store_currency_code]" style="width:30%" required>
 
187
  <?php
188
- $selected_currency_code = isset($options['store_currency_code']) && !empty($options['store_currency_code']) ? $options['store_currency_code'] : 'USD';
189
- foreach (MailChimp_WooCommerce_CurrencyCodes::lists() as $key => $value ) {
190
- echo '<option value="' . esc_attr( $key ) . '" ' . selected($key === $selected_currency_code, true, false ) . '>' . esc_html( $value ) . '</option>';
 
 
 
 
191
  }
192
  ?>
193
  </select>
194
- <span><?php esc_attr_e('Currency', $this->plugin_name); ?></span>
195
  </label>
196
  </fieldset>
197
 
198
  <fieldset>
199
  <legend class="screen-reader-text">
200
- <span>Timezone</span>
201
  </legend>
202
  <label for="<?php echo $this->plugin_name; ?>-store-timezone-label">
203
  <select name="<?php echo $this->plugin_name; ?>[store_timezone]" style="width:30%" required>
@@ -208,7 +213,7 @@ if (!$handler->hasValidApiKey()) {
208
  }
209
  ?>
210
  </select>
211
- <span><?php esc_attr_e('Timezone', $this->plugin_name); ?></span>
212
  </label>
213
  </fieldset>
214
 
10
  ?>
11
  <input type="hidden" name="mailchimp_active_settings_tab" value="store_info"/>
12
 
13
+ <h2 style="padding-top: 1em;"><?php _e('Store Settings', $this->plugin_name);?></h2>
14
+ <p><?= __('Please provide the following information about your WooCommerce store.', $this->plugin_name); ?></p>
15
 
16
  <fieldset>
17
  <legend class="screen-reader-text">
18
+ <span><?php esc_html_e('Store Name', 'mailchimp-woocommerce');?></span>
19
  </legend>
20
  <label for="<?php echo $this->plugin_name; ?>-store-name-label">
21
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-name-label" name="<?php echo $this->plugin_name; ?>[store_name]" value="<?php echo isset($options['store_name']) ? $options['store_name'] : get_option('blogname') ?>" />
22
  <span>
23
  <?php
24
  if (!empty($options['store_name']) ) {
25
+ esc_html_e('Name', $this->plugin_name);
26
  } else {
27
+ esc_html_e('Name', $this->plugin_name); echo '<span style="color:red;">*</span>';
28
  }
29
  ?>
30
  </span>
33
 
34
  <fieldset>
35
  <legend class="screen-reader-text">
36
+ <span><?php esc_html_e('Email', 'mailchimp-woocommerce');?></span>
37
  </legend>
38
  <label for="<?php echo $this->plugin_name; ?>-admin-email-label">
39
  <input required style="width: 30%;" type="email" id="<?php echo $this->plugin_name; ?>-admin-email-label" name="<?php echo $this->plugin_name; ?>[admin_email]" value="<?php echo isset($options['admin_email']) ? $options['admin_email'] : get_option('admin_email') ?>" />
40
  <span>
41
  <?php
42
  if (!empty($options['admin_email']) ) {
43
+ esc_html_e('Email', $this->plugin_name);
44
  } else {
45
+ esc_html_e('Email', $this->plugin_name); echo '<span style="color:red;">*</span>';
46
  }
47
  ?>
48
  </span>
51
 
52
  <fieldset>
53
  <legend class="screen-reader-text">
54
+ <span><?php esc_html_e('Street Address', 'mailchimp-woocommerce');?></span>
55
  </legend>
56
  <label for="<?php echo $this->plugin_name; ?>-store-address-label">
57
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-address-label" name="<?php echo $this->plugin_name; ?>[store_street]" value="<?php echo isset($options['store_street']) ? $options['store_street'] : '' ?>" />
58
  <span>
59
  <?php
60
  if (!empty($options['store_street']) ) {
61
+ esc_html_e('Street address', $this->plugin_name);
62
  } else {
63
+ esc_html_e('Street address', $this->plugin_name); echo '<span style="color:red;">*</span>';
64
  }
65
  ?>
66
  </span>
69
 
70
  <fieldset>
71
  <legend class="screen-reader-text">
72
+ <span><?php esc_html_e('City', 'mailchimp-woocommerce');?></span>
73
  </legend>
74
  <label for="<?php echo $this->plugin_name; ?>-store-city-label">
75
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-city-label" name="<?php echo $this->plugin_name; ?>[store_city]" value="<?php echo isset($options['store_city']) ? $options['store_city'] : '' ?>" />
76
  <span>
77
  <?php
78
  if (!empty($options['store_city']) ) {
79
+ esc_html_e('City', $this->plugin_name);
80
  } else {
81
+ esc_html_e('City', $this->plugin_name); echo '<span style="color:red;">*</span>';
82
  }
83
  ?>
84
  </span>
87
 
88
  <fieldset>
89
  <legend class="screen-reader-text">
90
+ <span><?php esc_html_e('State', 'mailchimp-woocommerce');?></span>
91
  </legend>
92
  <label for="<?php echo $this->plugin_name; ?>-store-state-label">
93
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-state-label" name="<?php echo $this->plugin_name; ?>[store_state]" value="<?php echo isset($options['store_state']) ? $options['store_state'] : '' ?>" />
94
  <span>
95
  <?php
96
  if (!empty($options['store_state']) ) {
97
+ esc_html_e('State', $this->plugin_name);
98
  } else {
99
+ esc_html_e('State', $this->plugin_name); echo '<span style="color:red;">*</span>';
100
  }
101
  ?>
102
  </span>
105
 
106
  <fieldset>
107
  <legend class="screen-reader-text">
108
+ <span><?php esc_html_e('Postal Code', 'mailchimp-woocommerce');?></span>
109
  </legend>
110
  <label for="<?php echo $this->plugin_name; ?>-store-postal-code-label">
111
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-postal-code-label" name="<?php echo $this->plugin_name; ?>[store_postal_code]" value="<?php echo isset($options['store_postal_code']) ? $options['store_postal_code'] : '' ?>" />
112
  <span>
113
  <?php
114
  if (!empty($options['store_postal_code']) ) {
115
+ esc_html_e('Postal Code', $this->plugin_name);
116
  } else {
117
+ esc_html_e('Postal Code', $this->plugin_name); echo '<span style="color:red;">*</span>';
118
  }
119
  ?>
120
  </span>
123
 
124
  <fieldset>
125
  <legend class="screen-reader-text">
126
+ <span><?php esc_html_e('Country', 'mailchimp-woocommerce');?></span>
127
  </legend>
128
  <label for="<?php echo $this->plugin_name; ?>-store-country-label">
129
  <input required style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-country-label" name="<?php echo $this->plugin_name; ?>[store_country]" value="<?php echo isset($options['store_country']) ? $options['store_country'] : 'US' ?>" />
130
  <span>
131
  <?php
132
  if (!empty($options['store_country'])) {
133
+ esc_html_e('Country', $this->plugin_name);
134
  } else {
135
+ esc_html_e('Country', $this->plugin_name); echo '<span style="color:red;">*</span>';
136
  }
137
  ?>
138
  </span>
141
 
142
  <fieldset>
143
  <legend class="screen-reader-text">
144
+ <span><?php esc_html_e('Phone Number', 'mailchimp-woocommerce');?></span>
145
  </legend>
146
  <label for="<?php echo $this->plugin_name; ?>-store-phone-label">
147
+ <input style="width: 30%;" type="text" id="<?php echo $this->plugin_name; ?>-store-phone-label" name="<?php echo $this->plugin_name; ?>[store_phone]" value="<?php echo isset($options['store_phone']) ? $options['store_phone'] : '' ?>" />
148
  <span>
149
  <?php
150
  if (!empty($options['store_phone']) ) {
151
+ esc_html_e('Phone Number', $this->plugin_name);
152
  } else {
153
+ esc_html_e('Phone Number', $this->plugin_name); echo '<span style="color:red;">*</span>';
154
  }
155
  ?>
156
  </span>
157
  </label>
158
  </fieldset>
159
 
160
+ <h2 style="padding-top: 1em;"><?= __('Locale Settings', $this->plugin_name);?></h2>
161
 
162
+ <p><?= __('Please apply your locale settings. If you\'re unsure about these, use the defaults.', $this->plugin_name);?></p>
163
 
164
  <fieldset>
165
  <legend class="screen-reader-text">
166
+ <span><?php esc_html_e('Locale', 'mailchimp-woocommerce');?></span>
167
  </legend>
168
  <label for="<?php echo $this->plugin_name; ?>-store-locale-label">
169
  <select name="<?php echo $this->plugin_name; ?>[store_locale]" style="width:30%" required>
174
  }
175
  ?>
176
  </select>
177
+ <span><?php esc_html_e('Locale', $this->plugin_name); ?></span>
178
  </label>
179
  </fieldset>
180
 
181
  <fieldset>
182
  <legend class="screen-reader-text">
183
+ <span><?php esc_html_e('Currency Code', 'mailchimp-woocommerce');?></span>
184
  </legend>
185
  <label for="<?php echo $this->plugin_name; ?>-store-currency-code-label">
186
+ <select name="<?php echo $this->plugin_name; ?>[store_currency_code]" style="width:30%" required oninvalid="this.setCustomValidity('<?php esc_attr_e('Currency is currently deprecated. Please select one from the list above', 'mailchimp-woocommerce'); ?>')"
187
+ oninput="this.setCustomValidity('')">
188
  <?php
189
+ $all_currencies = MailChimp_WooCommerce_CurrencyCodes::lists();
190
+ $selected_currency_code = isset($options['store_currency_code']) && !empty($options['store_currency_code']) ? $options['store_currency_code'] : 'USD';
191
+ if (! in_array($selected_currency_code, array_keys($all_currencies))) {
192
+ echo '<option value="" selected>' . $selected_currency_code . ' ['.esc_html__('deprecated', 'mailchimp-woocommerce').']</option>';
193
+ }
194
+ foreach ($all_currencies as $key => $value ) {
195
+ echo '<option value="' . esc_attr( $key ) . '" ' . selected($key === $selected_currency_code, true, false ) . '>' . $key .' | '. $value . '</option>';
196
  }
197
  ?>
198
  </select>
199
+ <span><?php esc_html_e('Currency', $this->plugin_name); ?></span>
200
  </label>
201
  </fieldset>
202
 
203
  <fieldset>
204
  <legend class="screen-reader-text">
205
+ <span><?php esc_html_e('Timezone', 'mailchimp-woocommerce');?></span>
206
  </legend>
207
  <label for="<?php echo $this->plugin_name; ?>-store-timezone-label">
208
  <select name="<?php echo $this->plugin_name; ?>[store_timezone]" style="width:30%" required>
213
  }
214
  ?>
215
  </select>
216
+ <span><?php esc_html_e('Timezone', $this->plugin_name); ?></span>
217
  </label>
218
  </fieldset>
219
 
admin/partials/tabs/store_sync.php CHANGED
@@ -51,25 +51,25 @@ if (($mailchimp_api = mailchimp_get_api()) && ($store = $mailchimp_api->getStore
51
 
52
  <input type="hidden" name="mailchimp_active_settings_tab" value="store_sync"/>
53
 
54
- <h2 style="padding-top: 1em;">Sync Information</h2>
55
 
56
  <?php if ($sync_started_at && !$sync_completed_at): ?>
57
- <p><strong>Initial Sync:</strong> <i>In Progress</i></p>
58
  <?php endif; ?>
59
 
60
  <?php if ($last_updated_time): ?>
61
- <p><strong>Last Updated:</strong> <i id="mailchimp_last_updated"><?php echo $last_updated_time->format('D, M j, Y g:i A'); ?></i></p>
62
  <?php endif; ?>
63
 
64
- <p><strong>Account Connected:</strong> <span id="mailchimp_account_connected"><?php echo $account_name; ?></span></p>
65
- <p><strong>List Connected:</strong> <span id="mailchimp_list_name"><?php echo $mailchimp_list_name; ?></span></p>
66
- <p><strong>Products Synced:</strong> <span id="mailchimp_product_count"><?php echo $mailchimp_total_products; ?></span></p>
67
- <p><strong>Orders Synced:</strong> <span id="mailchimp_order_count"><?php echo $mailchimp_total_orders; ?></span></p>
68
 
69
  <?php if($mailchimp_api && (!$store_syncing || isset($_GET['resync']) && $_GET['resync'] === '1')): ?>
70
- <h2 style="padding-top: 1em;">Advanced</h2>
71
  <p id="resync_data_help_text">
72
- You can resync your list at any time without losing any of your e-commerce data.
73
  </p>
74
- <?php submit_button('Resync', 'primary','submit', TRUE); ?>
75
  <?php endif; ?>
51
 
52
  <input type="hidden" name="mailchimp_active_settings_tab" value="store_sync"/>
53
 
54
+ <h2 style="padding-top: 1em;"><?php esc_html_e('Sync Information', 'mailchimp-woocommerce');?></h2>
55
 
56
  <?php if ($sync_started_at && !$sync_completed_at): ?>
57
+ <p><strong><?php esc_html_e('Initial Sync:', 'mailchimp-woocommerce');?></strong> <i><?php esc_html_e('In Progress', 'mailchimp-woocommerce');?></i></p>
58
  <?php endif; ?>
59
 
60
  <?php if ($last_updated_time): ?>
61
+ <p><strong><?php esc_html_e('Last Updated:', 'mailchimp-woocommerce');?></strong> <i id="mailchimp_last_updated"><?php echo date_i18n( __('D, M j, Y g:i A', 'mailchimp-woocommerce'), $last_updated_time->getTimestamp())?></i></p>
62
  <?php endif; ?>
63
 
64
+ <p><strong><?php esc_html_e('Account Connected:', 'mailchimp-woocommerce');?></strong> <span id="mailchimp_account_connected"><?php echo $account_name; ?></span></p>
65
+ <p><strong><?php esc_html_e('Audience Connected:', 'mailchimp-woocommerce');?></strong> <span id="mailchimp_list_name"><?php echo $mailchimp_list_name; ?></span></p>
66
+ <p><strong><?php esc_html_e('Products Synced:', 'mailchimp-woocommerce');?></strong> <span id="mailchimp_product_count"><?php echo $mailchimp_total_products; ?></span></p>
67
+ <p><strong><?php esc_html_e('Orders Synced:', 'mailchimp-woocommerce');?></strong> <span id="mailchimp_order_count"><?php echo $mailchimp_total_orders; ?></span></p>
68
 
69
  <?php if($mailchimp_api && (!$store_syncing || isset($_GET['resync']) && $_GET['resync'] === '1')): ?>
70
+ <h2 style="padding-top: 1em;"><?php esc_html_e('Advanced', 'mailchimp-woocommerce');?></h2>
71
  <p id="resync_data_help_text">
72
+ <?php esc_html_e('You can resync your audience at any time without losing any of your e-commerce data.', 'mailchimp-woocommerce');?>
73
  </p>
74
+ <?php submit_button(__('Resync', 'mailchimp-woocommerce'), 'primary','submit', TRUE); ?>
75
  <?php endif; ?>
bootstrap.php CHANGED
@@ -93,7 +93,7 @@ function mailchimp_environment_variables() {
93
  return (object) array(
94
  'repo' => 'master',
95
  'environment' => 'production', // staging or production
96
- 'version' => '2.1.15',
97
  'php_version' => phpversion(),
98
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
99
  'wc_version' => function_exists('WC') ? WC()->version : null,
@@ -291,6 +291,25 @@ function mailchimp_get_store_id() {
291
  return $store_id;
292
  }
293
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  /**
295
  * @return bool|MailChimp_WooCommerce_MailChimpApi
296
  */
@@ -462,6 +481,7 @@ function mailchimp_woocommerce_get_all_image_sizes_list() {
462
  $response = array();
463
  foreach (mailchimp_woocommerce_get_all_image_sizes() as $key => $data) {
464
  $label = ucwords(str_replace('_', ' ', $key));
 
465
  $response[$key] = "{$label} ({$data['width']} x {$data['height']})";
466
  }
467
  return $response;
@@ -804,6 +824,60 @@ function mailchimp_call_rest_api_test() {
804
  return MailChimp_WooCommerce_Rest_Api::test();
805
  }
806
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
807
  /**
808
  * @return bool|string
809
  */
@@ -816,10 +890,10 @@ function mailchimp_woocommerce_check_if_http_worker_fails() {
816
  }
817
 
818
  // if the function doesn't exist we can't do anything.
819
- if (!function_exists('wp_remote_post')) {
820
  mailchimp_set_data('test.can.remote_post', false);
821
  mailchimp_set_data('test.can.remote_post.error', 'function "wp_remote_post" does not exist');
822
- return 'function "wp_remote_post" does not exist';
823
  }
824
 
825
  // apply a blocking call to make sure we get the response back
@@ -833,7 +907,7 @@ function mailchimp_woocommerce_check_if_http_worker_fails() {
833
  } elseif (is_array($response) && isset($response['http_response']) && ($r = $response['http_response'])) {
834
  /** @var \WP_HTTP_Requests_Response $r */
835
  if ((int) $r->get_status() !== 200) {
836
- $message = 'The REST API seems to be disabled on this wordpress site. Please enable to sync data.';
837
  mailchimp_set_data('test.can.remote_post', false);
838
  mailchimp_set_data('test.can.remote_post.error', $message);
839
  return $message;
@@ -846,6 +920,147 @@ function mailchimp_woocommerce_check_if_http_worker_fails() {
846
  return false;
847
  }
848
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
849
  /**
850
  * @return string
851
  */
93
  return (object) array(
94
  'repo' => 'master',
95
  'environment' => 'production', // staging or production
96
+ 'version' => '2.1.16',
97
  'php_version' => phpversion(),
98
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
99
  'wc_version' => function_exists('WC') ? WC()->version : null,
291
  return $store_id;
292
  }
293
 
294
+ /**
295
+ * @return array
296
+ */
297
+ function mailchimp_get_user_tags_to_update() {
298
+ $tags = mailchimp_get_option('mailchimp_user_tags');
299
+
300
+ if (empty($tags)) {
301
+ return false;
302
+ }
303
+
304
+ $tags = explode(',', $tags);
305
+
306
+ foreach ($tags as $tag) {
307
+ $formatted_tags[] = array("name" => $tag, "status" => 'active');
308
+ }
309
+
310
+ return $formatted_tags;
311
+ }
312
+
313
  /**
314
  * @return bool|MailChimp_WooCommerce_MailChimpApi
315
  */
481
  $response = array();
482
  foreach (mailchimp_woocommerce_get_all_image_sizes() as $key => $data) {
483
  $label = ucwords(str_replace('_', ' ', $key));
484
+ $label = __($label);
485
  $response[$key] = "{$label} ({$data['width']} x {$data['height']})";
486
  }
487
  return $response;
824
  return MailChimp_WooCommerce_Rest_Api::test();
825
  }
826
 
827
+ /**
828
+ * @return bool
829
+ */
830
+ function mailchimp_should_use_local_curl_for_rest_api() {
831
+ return defined('MAILCHIMP_USE_CURL') && MAILCHIMP_USE_CURL;
832
+ }
833
+
834
+ /**
835
+ * @return int
836
+ */
837
+ function mailchimp_get_local_curl_http_version() {
838
+ return defined('MAILCHIMP_USE_LOCAL_CURL_VERSION') ? MAILCHIMP_USE_LOCAL_CURL_VERSION : CURL_HTTP_VERSION_1_1;
839
+ }
840
+
841
+ /**
842
+ * @return bool|string
843
+ */
844
+ function mailchimp_get_curlopt_interface_ip() {
845
+ return defined('MAILCHIMP_USE_OUTBOUND_IP') ? MAILCHIMP_USE_OUTBOUND_IP : false;
846
+ }
847
+
848
+ /**
849
+ * @return bool|string domain name
850
+ */
851
+ function mailchimp_get_local_rest_domain_or_ip() {
852
+ if (defined('MAILCHIMP_REST_IP')) {
853
+ return MAILCHIMP_REST_IP;
854
+ } else if (defined('MAILCHIMP_REST_LOCALHOST')) {
855
+ return 'localhost';
856
+ } else {
857
+ return false;
858
+ }
859
+ }
860
+
861
+ /**
862
+ * @return string url
863
+ */
864
+ function mailchimp_apply_local_rest_api_override($url, $alternate_host) {
865
+ $parsed_url = parse_url($url);
866
+ $p = array();
867
+ $p['scheme'] = isset( $parsed_url['scheme'] ) ? $parsed_url['scheme'] . '://' : '';
868
+ $p['host'] = $alternate_host;
869
+ $p['port'] = isset( $parsed_url['port'] ) ? ':' . $parsed_url['port'] : '';
870
+ $p['user'] = isset( $parsed_url['user'] ) ? $parsed_url['user'] : '';
871
+ $p['pass'] = isset( $parsed_url['pass'] ) ? ':' . $parsed_url['pass'] : '';
872
+ $p['pass'] = ( $p['user'] || $p['pass'] ) ? $p['pass']."@" : '';
873
+ $p['path'] = isset( $parsed_url['path'] ) ? $parsed_url['path'] : '';
874
+ $p['query'] = isset( $parsed_url['query'] ) ? '?' . $parsed_url['query'] : '';
875
+ $p['fragment'] = isset( $parsed_url['fragment'] ) ? '#' . $parsed_url['fragment'] : '';
876
+
877
+ return $url = $p['scheme'].$p['user'].$p['pass'].$p['host'].$p['port'].$p['path'].$p['query'].$p['fragment'];
878
+ }
879
+
880
+
881
  /**
882
  * @return bool|string
883
  */
890
  }
891
 
892
  // if the function doesn't exist we can't do anything.
893
+ if (!mailchimp_should_use_local_curl_for_rest_api() && !function_exists('wp_remote_post')) {
894
  mailchimp_set_data('test.can.remote_post', false);
895
  mailchimp_set_data('test.can.remote_post.error', 'function "wp_remote_post" does not exist');
896
+ return __('function "wp_remote_post" does not exist', 'mailchimp-woocommerce');
897
  }
898
 
899
  // apply a blocking call to make sure we get the response back
907
  } elseif (is_array($response) && isset($response['http_response']) && ($r = $response['http_response'])) {
908
  /** @var \WP_HTTP_Requests_Response $r */
909
  if ((int) $r->get_status() !== 200) {
910
+ $message = __('The REST API seems to be disabled on this wordpress site. Please enable to sync data.', 'mailchimp-woocommerce');
911
  mailchimp_set_data('test.can.remote_post', false);
912
  mailchimp_set_data('test.can.remote_post.error', $message);
913
  return $message;
920
  return false;
921
  }
922
 
923
+ /**
924
+ * @param $url
925
+ * @param array $params
926
+ * @param array $headers
927
+ * @return array|mixed|object|WP_Error|null
928
+ */
929
+ function mailchimp_woocommerce_rest_api_get($url, $params = array(), $headers = array()) {
930
+ $alternate_host = mailchimp_get_local_rest_domain_or_ip();
931
+ if ($alternate_host) {
932
+ $url = mailchimp_apply_local_rest_api_override($url, $alternate_host);
933
+ }
934
+
935
+ if (mailchimp_should_use_local_curl_for_rest_api()) {
936
+ try {
937
+ $curl = curl_init();
938
+ curl_setopt_array($curl, mailchimp_apply_local_curl_options('GET', $url, $params, $headers));
939
+ return mailchimp_process_local_curl_response($curl);
940
+ } catch (\Exception $e) {
941
+ mailchimp_error("mailchimp_woocommerce_rest_api_get", $e->getMessage());
942
+ return new WP_Error( 'http_request_failed', $e->getMessage());
943
+ }
944
+ }
945
+
946
+ $params['headers'] = $headers;
947
+
948
+ return wp_remote_get($url, $params);
949
+ }
950
+
951
+ /**
952
+ * @param $method
953
+ * @param $url
954
+ * @param array $params
955
+ * @param array $headers
956
+ * @return array
957
+ */
958
+ function mailchimp_apply_local_curl_options($method, $url, $params = array(), $headers = array()) {
959
+
960
+ $headers = (array) $headers;
961
+
962
+ $curl_options = array(
963
+ CURLOPT_CUSTOMREQUEST => strtoupper($method),
964
+ CURLOPT_URL => mailchimp_rest_api_url($url, '', $params),
965
+ CURLOPT_RETURNTRANSFER => true,
966
+ CURLOPT_ENCODING => "",
967
+ CURLOPT_MAXREDIRS => 10,
968
+ CURLOPT_TIMEOUT => $params['timeout'],
969
+ CURLOPT_HTTP_VERSION => mailchimp_get_local_curl_http_version(),
970
+ CURLINFO_HEADER_OUT => true,
971
+ CURLOPT_HTTPHEADER => array_merge(mailchimp_get_http_local_json_header(), $headers)
972
+ );
973
+
974
+ // if we have a dedicated IP address, and have set a configuration for it, we'll use it here.
975
+ if (($interface = mailchimp_get_curlopt_interface_ip())) {
976
+ $curl_options[CURLOPT_INTERFACE] = $interface;
977
+ }
978
+
979
+ return $curl_options;
980
+ }
981
+
982
+ /**
983
+ * @param $curl
984
+ * @return array|mixed|object|null
985
+ * @throws MailChimp_WooCommerce_Error
986
+ * @throws MailChimp_WooCommerce_ServerError
987
+ */
988
+ function mailchimp_process_local_curl_response($curl)
989
+ {
990
+ $response = curl_exec($curl);
991
+ $err = curl_error($curl);
992
+ $info = curl_getinfo($curl);
993
+ curl_close($curl);
994
+ if ($err) {
995
+ throw new MailChimp_WooCommerce_Error('CURL error :: '.$err, 500);
996
+ }
997
+ $data = json_decode($response, true);
998
+ if (empty($info) || ($info['http_code'] >= 200 && $info['http_code'] <= 400)) {
999
+ if (is_array($data)) {
1000
+ mailchimp_rest_check_for_errors($data);
1001
+ }
1002
+ return $data;
1003
+ }
1004
+ if ($info['http_code'] >= 400 && $info['http_code'] < 500) {
1005
+ throw new MailChimp_WooCommerce_Error($data['title'] .' :: '.$data['detail'], $data['status']);
1006
+ } else if ($info['http_code'] >= 500) {
1007
+ throw new MailChimp_WooCommerce_ServerError($data['detail'], $data['status']);
1008
+ }
1009
+ return json_encode(array('info' => $info, 'response' => $response));
1010
+ }
1011
+
1012
+ /**
1013
+ * @param array $data
1014
+ * @return bool
1015
+ * @throws MailChimp_WooCommerce_Error
1016
+ */
1017
+ function mailchimp_rest_check_for_errors(array $data)
1018
+ {
1019
+ // if we have an array of error data push it into a message
1020
+ if (isset($data['errors'])) {
1021
+ $message = '';
1022
+ foreach ($data['errors'] as $error) {
1023
+ $message .= '<p>'.$error['field'].': '.$error['message'].'</p>';
1024
+ }
1025
+ throw new MailChimp_WooCommerce_Error($message, $data['status']);
1026
+ }
1027
+ // make sure the response is correct from the data in the response array
1028
+ if (isset($data['status']) && $data['status'] >= 400) {
1029
+ throw new MailChimp_WooCommerce_Error($data['detail'], $data['status']);
1030
+ }
1031
+ return false;
1032
+ }
1033
+
1034
+ /**
1035
+ * @param $url
1036
+ * @param string $extra
1037
+ * @param null $params
1038
+ * @return string
1039
+ */
1040
+ function mailchimp_rest_api_url($url, $extra = '', $params = null)
1041
+ {
1042
+ if (!empty($extra)) {
1043
+ $url .= $extra;
1044
+ }
1045
+ if (!empty($params)) {
1046
+ $url .= '?'.(is_array($params) ? http_build_query($params) : $params);
1047
+ }
1048
+ return $url;
1049
+ }
1050
+
1051
+ /**
1052
+ * @return array
1053
+ */
1054
+ function mailchimp_get_http_local_json_header() {
1055
+ $env = mailchimp_environment_variables();
1056
+ $server_user_agent = "MailChimp for WooCommerce/{$env->version} PHP/{$env->php_version} WordPress/{$env->wp_version} Woo/{$env->wc_version}";
1057
+ return array(
1058
+ 'Content-Type' => 'application/json; charset=' . get_option( 'blog_charset' ),
1059
+ 'Accept' => 'application/json',
1060
+ 'User-Agent' => $server_user_agent
1061
+ );
1062
+ }
1063
+
1064
  /**
1065
  * @return string
1066
  */
includes/api/assets/class-mailchimp-cart.php CHANGED
@@ -90,9 +90,11 @@ class MailChimp_WooCommerce_Cart
90
  * @return $this
91
  */
92
  public function setCampaignID($id)
93
- {
94
- $this->campaign_id = $id;
95
-
 
 
96
  return $this;
97
  }
98
 
90
  * @return $this
91
  */
92
  public function setCampaignID($id)
93
+ {
94
+ $api = MailChimp_WooCommerce_MailChimpApi::getInstance();
95
+ $cid = trim($id);
96
+ $campaign = $api->getCampaign($cid);
97
+ $this->campaign_id = $campaign['id'];
98
  return $this;
99
  }
100
 
includes/api/assets/class-mailchimp-order.php CHANGED
@@ -99,7 +99,7 @@ class MailChimp_WooCommerce_Order
99
  */
100
  public function setId($id)
101
  {
102
- $this->id = $id;
103
 
104
  return $this;
105
  }
@@ -208,10 +208,12 @@ class MailChimp_WooCommerce_Order
208
  * @param null $campaign_id
209
  * @return MailChimp_WooCommerce_Order
210
  */
211
- public function setCampaignId($campaign_id)
212
  {
213
- $this->campaign_id = $campaign_id;
214
-
 
 
215
  return $this;
216
  }
217
 
99
  */
100
  public function setId($id)
101
  {
102
+ $this->id = preg_replace('/[^0-9]/i','', $id);
103
 
104
  return $this;
105
  }
208
  * @param null $campaign_id
209
  * @return MailChimp_WooCommerce_Order
210
  */
211
+ public function setCampaignId($id)
212
  {
213
+ $api = MailChimp_WooCommerce_MailChimpApi::getInstance();
214
+ $cid = trim($id);
215
+ $campaign = $api->getCampaign($cid);
216
+ $this->campaign_id = $campaign['id'];
217
  return $this;
218
  }
219
 
includes/api/class-mailchimp-api.php CHANGED
@@ -264,6 +264,29 @@ class MailChimp_WooCommerce_MailChimpApi
264
  return $this->patch("lists/$list_id/members/$hash", $data);
265
  }
266
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  /**
268
  * @param $list_id
269
  * @param $email
@@ -503,6 +526,26 @@ class MailChimp_WooCommerce_MailChimpApi
503
  }
504
  }
505
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
506
  /**
507
  * @param $store_id
508
  * @return array|bool
@@ -848,6 +891,11 @@ class MailChimp_WooCommerce_MailChimpApi
848
  // submit the first one
849
  $data = $this->post("ecommerce/stores/$store_id/orders", $order->toArray());
850
 
 
 
 
 
 
851
  // if the order is in pending status, we need to submit the order again with a paid status.
852
  if ($order->shouldConfirmAndPay() && $order->getFinancialStatus() !== 'paid') {
853
  $order->setFinancialStatus('paid');
@@ -880,6 +928,11 @@ class MailChimp_WooCommerce_MailChimpApi
880
  $order_id = $order->getId();
881
  $data = $this->patch("ecommerce/stores/{$store_id}/orders/{$order_id}", $order->toArray());
882
 
 
 
 
 
 
883
  // if products list differs, we should remove the old products and add new ones
884
  $data_lines = $data['lines'];
885
  $order_lines = $order->getLinesIds();
264
  return $this->patch("lists/$list_id/members/$hash", $data);
265
  }
266
 
267
+ /**
268
+ * @param $list_id
269
+ * @param $email
270
+ * @return array|mixed|null|object
271
+ * @throws Exception
272
+ * @throws MailChimp_WooCommerce_Error
273
+ */
274
+ public function updateMemberTags($list_id, $email)
275
+ {
276
+ $hash = md5(strtolower(trim($email)));
277
+ $tags = mailchimp_get_user_tags_to_update();
278
+
279
+ if (empty($tags)) return false;
280
+
281
+ $data = array(
282
+ 'tags' => $tags
283
+ );
284
+
285
+ mailchimp_debug('api.update_member_tags', "Updating {$email}", $data);
286
+
287
+ return $this->post("lists/$list_id/members/$hash/tags", $data);
288
+ }
289
+
290
  /**
291
  * @param $list_id
292
  * @param $email
526
  }
527
  }
528
 
529
+ /**
530
+ * @param $campaign_id
531
+ * @return array|bool
532
+ */
533
+ public function getCampaign($campaign_id)
534
+ {
535
+ if (get_site_transient('mailchimp-woocommerce-no-campaign-id-'.$campaign_id)) {
536
+ return false;
537
+ }
538
+ try {
539
+ $data = $this->get("campaigns/$campaign_id");
540
+ delete_site_transient('mailchimp-woocommerce-no-campaign-id-'.$campaign_id);
541
+ return $data;
542
+ } catch (\Exception $e) {
543
+ mailchimp_log('campaign_get.error', 'No campaign with provided ID: '. $campaign_id. ' :: '. $e->getMessage(). ' :: in '.$e->getFile().' :: on '.$e->getLine());
544
+ set_site_transient('mailchimp-woocommerce-no-campaign-id-'.$campaign_id, true, 60 * 30);
545
+ throw $e;
546
+ }
547
+ }
548
+
549
  /**
550
  * @param $store_id
551
  * @return array|bool
891
  // submit the first one
892
  $data = $this->post("ecommerce/stores/$store_id/orders", $order->toArray());
893
 
894
+ //update user tags
895
+ $customer = $order->getCustomer();
896
+ $list_id = mailchimp_get_list_id();
897
+ $user = $this->updateMemberTags($list_id, $customer->getEmailAddress());
898
+
899
  // if the order is in pending status, we need to submit the order again with a paid status.
900
  if ($order->shouldConfirmAndPay() && $order->getFinancialStatus() !== 'paid') {
901
  $order->setFinancialStatus('paid');
928
  $order_id = $order->getId();
929
  $data = $this->patch("ecommerce/stores/{$store_id}/orders/{$order_id}", $order->toArray());
930
 
931
+ //update user tags
932
+ $customer = $order->getCustomer();
933
+ $list_id = mailchimp_get_list_id();
934
+ $user = $this->updateMemberTags($list_id, $customer->getEmailAddress());
935
+
936
  // if products list differs, we should remove the old products and add new ones
937
  $data_lines = $data['lines'];
938
  $order_lines = $order->getLinesIds();
includes/api/class-mailchimp-woocommerce-transform-orders-wc3.php CHANGED
@@ -75,7 +75,11 @@ class MailChimp_WooCommerce_Transform_Orders
75
 
76
  // if we have a campaign id let's set it now.
77
  if (!empty($this->campaign_id)) {
78
- $order->setCampaignId($this->campaign_id);
 
 
 
 
79
  }
80
 
81
  $order->setProcessedAt($woo->get_date_created()->setTimezone(new \DateTimeZone('UTC')));
75
 
76
  // if we have a campaign id let's set it now.
77
  if (!empty($this->campaign_id)) {
78
+ try {
79
+ $order->setCampaignId($this->campaign_id);
80
+ } catch (\Exception $e) {
81
+ mailchimp_log('transform_order_set_campaign_id.error', 'No campaign added to order, with provided ID: '. $this->campaign_id. ' :: '. $e->getMessage(). ' :: in '.$e->getFile().' :: on '.$e->getLine());
82
+ }
83
  }
84
 
85
  $order->setProcessedAt($woo->get_date_created()->setTimezone(new \DateTimeZone('UTC')));
includes/api/class-mailchimp-woocommerce-transform-orders.php DELETED
@@ -1,536 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Created by Vextras.
5
- *
6
- * Name: Ryan Hungate
7
- * Email: ryan@mailchimp.com
8
- * Date: 7/13/16
9
- * Time: 8:29 AM
10
- */
11
- class MailChimp_WooCommerce_Transform_Orders
12
- {
13
- public $campaign_id = null;
14
- protected $use_user_address = false;
15
-
16
- /**
17
- * @param int $page
18
- * @param int $limit
19
- * @return \stdClass
20
- */
21
- public function compile($page = 1, $limit = 5)
22
- {
23
- $response = (object) array(
24
- 'endpoint' => 'orders',
25
- 'page' => $page ? $page : 1,
26
- 'limit' => (int) $limit,
27
- 'count' => 0,
28
- 'valid' => 0,
29
- 'drafts' => 0,
30
- 'stuffed' => false,
31
- 'items' => array(),
32
- );
33
-
34
- if ((($orders = $this->getOrderPosts($page, $limit)) && !empty($orders))) {
35
- foreach ($orders as $post) {
36
- $response->count++;
37
- if ($post->post_status === 'auto-draft') {
38
- $response->drafts++;
39
- continue;
40
- }
41
-
42
- $order = $this->transform($post);
43
- if (!$order->isFlaggedAsAmazonOrder()) {
44
- $response->valid++;
45
- $response->items[] = $order;
46
- }
47
- }
48
- }
49
-
50
- $response->stuffed = ($response->count > 0 && (int) $response->count === (int) $limit) ? true : false;
51
-
52
- return $response;
53
- }
54
-
55
- /**
56
- * @param WC_Order $woo
57
- * @return array
58
- */
59
- protected function dates(WC_Order $woo)
60
- {
61
- if (method_exists($woo, 'get_date_modified')) {
62
- $created_at = $woo->get_date_modified();
63
- $updated_at = $woo->get_date_modified();
64
- } elseif (property_exists($woo, 'order_date') && property_exists($woo, 'modified_date')) {
65
- $created_at = $woo->order_date ? new \DateTime($woo->order_date) : null;
66
- $updated_at = $woo->modified_date ? new \DateTime($woo->modified_date) : null;
67
- } else {
68
- $created_at = $updated_at = new \DateTime();
69
- }
70
-
71
- return array($created_at, $updated_at);
72
- }
73
-
74
- /**
75
- * @param WP_Post $post
76
- * @return MailChimp_WooCommerce_Order
77
- */
78
- public function transform(WP_Post $post)
79
- {
80
- $woo = new WC_Order($post);
81
-
82
- $order = new MailChimp_WooCommerce_Order();
83
-
84
- $order->setId($woo->get_order_number());
85
-
86
- // just skip these altogether because we can't submit any amazon orders anyway.
87
- if (mailchimp_string_contains($woo->billing_email, '@marketplace.amazon.com')) {
88
- return $order->flagAsAmazonOrder(true);
89
- }
90
-
91
- // if we have a campaign id let's set it now.
92
- if (!empty($this->campaign_id)) {
93
- $order->setCampaignId($this->campaign_id);
94
- }
95
-
96
- $order->setProcessedAt($woo->get_date_created()->setTimezone(new \DateTimeZone('UTC')));
97
-
98
- $order->setCurrencyCode($woo->get_currency());
99
-
100
- // grab the current statuses - this will end up being custom at some point.
101
- $statuses = $this->getOrderStatuses();
102
-
103
- // grab the order status
104
- $status = $woo->get_status();
105
-
106
- // map the fulfillment and financial statuses based on the map above.
107
- $fulfillment_status = array_key_exists($status, $statuses) ? $statuses[$status]->fulfillment : null;
108
- $financial_status = array_key_exists($status, $statuses) ? $statuses[$status]->financial : $status;
109
-
110
- // set the fulfillment_status
111
- $order->setFulfillmentStatus($fulfillment_status);
112
-
113
- // set the financial status
114
- $order->setFinancialStatus($financial_status);
115
-
116
- // if the status is processing, we need to send this one first, then send a 'paid' status right after.
117
- if ($status === 'processing') {
118
- $order->confirmAndPay(true);
119
- }
120
-
121
- // only set this if the order is cancelled.
122
- if ($status === 'cancelled') {
123
- $order->setCancelledAt($woo->get_date_modified()->setTimezone(new \DateTimeZone('UTC')));
124
- }
125
-
126
- // set the total
127
- $order->setOrderTotal($woo->get_total());
128
-
129
- // set the order URL
130
- $order->setOrderURL($woo->get_view_order_url());
131
-
132
- // if we have any tax
133
- $order->setTaxTotal($woo->get_total_tax());
134
-
135
- // if we have shipping.
136
- $order->setShippingTotal($woo->get_total_shipping());
137
-
138
- // set the order discount
139
- $order->setDiscountTotal($woo->get_total_discount());
140
-
141
- // set the customer
142
- $order->setCustomer($this->buildCustomerFromOrder($woo));
143
-
144
- // apply the addresses to the order
145
- $addresses = $this->getOrderAddresses($woo);
146
- $order->setShippingAddress($addresses->shipping);
147
- $order->setBillingAddress($addresses->billing);
148
-
149
- // loop through all the order items
150
- foreach ($woo->get_items() as $key => $order_detail) {
151
-
152
- // add it into the order item container.
153
- $item = $this->buildLineItem($key, $order_detail);
154
-
155
- // if we don't have a product post with this id, we need to add a deleted product to the MC side
156
- if (!($product_post = get_post($item->getProductId()))) {
157
-
158
- // check if it exists, otherwise create a new one.
159
- if (($deleted_product = MailChimp_WooCommerce_Transform_Products::deleted($item->getProductId()))) {
160
-
161
- $deleted_product_id = "deleted_{$item->getProductId()}";
162
-
163
- // swap out the old item id and product variant id with the deleted version.
164
- $item->setProductId($deleted_product_id);
165
- $item->setProductVariantId($deleted_product_id);
166
-
167
- // add the item and continue on the loop.
168
- $order->addItem($item);
169
- continue;
170
- }
171
-
172
- mailchimp_log('order.items.error', "Order #{$woo->get_order_number()} :: Product {$item->getProductId()} does not exist!");
173
- continue;
174
- }
175
-
176
- $order->addItem($item);
177
- }
178
-
179
- // apply the coupon discounts
180
- if (function_exists('wc_get_coupon_id_by_code') && ($used_coupons = $woo->get_used_coupons()) && is_array($used_coupons)) {
181
- foreach ($used_coupons as $coupon_code) {
182
- if (($coupon_id = wc_get_coupon_id_by_code($coupon_code))) {
183
- $coupon = new WC_Coupon($coupon_id);
184
- $is_percentage = $coupon->get_discount_type() === 'percent';
185
- $order->addDiscount($coupon_code, $coupon->get_amount('edit'), $is_percentage);
186
- }
187
- }
188
- }
189
-
190
- //if (($refund = $woo->get_total_refunded()) && $refund > 0){
191
- // this is where we would be altering the submission to tell us about the refund.
192
- //}
193
-
194
- return $order;
195
- }
196
-
197
- /**
198
- * @param WC_Order $order
199
- * @return MailChimp_WooCommerce_Customer
200
- */
201
- public function buildCustomerFromOrder(WC_Order $order)
202
- {
203
- $customer = new MailChimp_WooCommerce_Customer();
204
-
205
- $customer->setId(md5(trim(strtolower($order->billing_email))));
206
- $customer->setCompany($order->billing_company);
207
- $customer->setEmailAddress(trim($order->billing_email));
208
- $customer->setFirstName($order->billing_first_name);
209
- $customer->setLastName($order->billing_last_name);
210
- $customer->setOrdersCount(1);
211
- $customer->setTotalSpent($order->get_total());
212
-
213
- // we are saving the post meta for subscribers on each order... so if they have subscribed on checkout
214
- $subscriber_meta = get_post_meta($order->get_id(), 'mailchimp_woocommerce_is_subscribed', true);
215
- $subscribed_on_order = $subscriber_meta === '' ? false : (bool) $subscriber_meta;
216
-
217
- $customer->setOptInStatus($subscribed_on_order);
218
- // if they didn't subscribe on the order, we need to check to make sure they're not already a subscriber
219
- // if they are, we just need to make sure that we don't unsubscribe them just because they unchecked this box.
220
- if (!$subscribed_on_order) {
221
- try {
222
- $subscriber = mailchimp_get_api()->member(mailchimp_get_list_id(), $customer->getEmailAddress());
223
- $status = !in_array($subscriber['status'], array('unsubscribed', 'transactional'));
224
- $customer->setOptInStatus($status);
225
- } catch (\Exception $e) {}
226
- }
227
-
228
- // use the info from the order to compile an address.
229
- $address = new MailChimp_WooCommerce_Address();
230
- $address->setAddress1($order->billing_address_1);
231
- $address->setAddress2($order->billing_address_2);
232
- $address->setCity($order->billing_city);
233
- $address->setProvince($order->billing_state);
234
- $address->setPostalCode($order->billing_postcode);
235
- $address->setCountry($order->billing_country);
236
- $address->setPhone($order->billing_phone);
237
-
238
- // if we have billing names set it here
239
- if (!empty($order->billing_first_name) && !empty($order->billing_last_name)) {
240
- $address->setName($order->billing_first_name.' '.$order->billing_last_name);
241
- }
242
-
243
- $customer->setAddress($address);
244
-
245
- if (($user = get_userdata($order->customer_user))) {
246
- /**
247
- * IF we wanted to use the user data instead we would do it here.
248
- * but we discussed using the billing address instead.
249
- */
250
- if ($this->use_user_address) {
251
- $customer->setId($user->ID);
252
- $customer->setEmailAddress($user->user_email);
253
- $customer->setFirstName($user->first_name);
254
- $customer->setLastName($user->last_name);
255
-
256
- if (($address = $this->getUserAddress($user->ID))) {
257
- if (count($address->toArray()) > 3) {
258
- $customer->setAddress($address);
259
- }
260
- }
261
- }
262
-
263
- if (!($stats = $this->getCustomerOrderTotals($order->customer_user))) {
264
- $stats = (object) array('count' => 0, 'total' => 0);
265
- }
266
-
267
- $customer->setOrdersCount($stats->count);
268
- $customer->setTotalSpent($stats->total);
269
- }
270
-
271
- return $customer;
272
- }
273
-
274
- /**
275
- * @param $key
276
- * @param $order_detail
277
- * @return MailChimp_WooCommerce_LineItem
278
- */
279
- protected function buildLineItem($key, $order_detail)
280
- {
281
- // fire up a new MC line item
282
- $item = new MailChimp_WooCommerce_LineItem();
283
- $item->setId($key);
284
-
285
- if (isset($order_detail['item_meta']) && is_array($order_detail['item_meta'])) {
286
-
287
- foreach ($order_detail['item_meta'] as $meta_key => $meta_data_array) {
288
-
289
- if (!isset($meta_data_array[0])) {
290
- continue;
291
- }
292
-
293
- switch ($meta_key) {
294
-
295
- case '_line_subtotal':
296
- $item->setPrice($meta_data_array[0]);
297
- break;
298
-
299
- case '_product_id':
300
- $item->setProductId($meta_data_array[0]);
301
- break;
302
-
303
- case '_variation_id':
304
- $item->setProductVariantId($meta_data_array[0]);
305
- break;
306
-
307
- case '_qty':
308
- $item->setQuantity($meta_data_array[0]);
309
- break;
310
-
311
- }
312
- }
313
-
314
- if ($item->getProductVariantId() <= 0) {
315
- $item->setProductVariantId($item->getProductId());
316
- }
317
-
318
- } elseif (isset($order_detail['item_meta_array']) && is_array($order_detail['item_meta_array'])) {
319
-
320
- /// Some users have the newer version of the item meta.
321
-
322
- foreach ($order_detail['item_meta_array'] as $meta_id => $object) {
323
-
324
- if (!isset($object->key)) {
325
- continue;
326
- }
327
-
328
- switch ($object->key) {
329
-
330
- case '_line_subtotal':
331
- $item->setPrice($object->value);
332
- break;
333
-
334
- case '_product_id':
335
- $item->setProductId($object->value);
336
- break;
337
-
338
- case '_variation_id':
339
- $item->setProductVariantId($object->value);
340
- break;
341
-
342
- case '_qty':
343
- $item->setQuantity($object->value);
344
- break;
345
- }
346
- }
347
-
348
- if ($item->getProductVariantId() <= 0) {
349
- $item->setProductVariantId($item->getProductId());
350
- }
351
- }
352
-
353
- if ($item->getQuantity() > 1) {
354
- $current_price = $item->getPrice();
355
- $price = ($current_price/$item->getQuantity());
356
- $item->setPrice($price);
357
- }
358
-
359
- return $item;
360
- }
361
-
362
- /**
363
- * @param int $page
364
- * @param int $posts
365
- * @return array|bool
366
- */
367
- public function getOrderPosts($page = 1, $posts = 5)
368
- {
369
- $params = array(
370
- 'post_type' => 'shop_order',
371
- 'posts_per_page' => $posts,
372
- 'paged' => $page,
373
- 'orderby' => 'id',
374
- 'order' => 'ASC',
375
- );
376
-
377
- $orders = get_posts($params);
378
-
379
- if (empty($orders)) {
380
- sleep(2);
381
- $orders = get_posts($params);
382
- }
383
-
384
- return empty($orders) ? false : $orders;
385
- }
386
-
387
- /**
388
- * returns an object with a 'total' and a 'count'.
389
- *
390
- * @param $user_id
391
- * @return object
392
- */
393
- public function getCustomerOrderTotals($user_id)
394
- {
395
- $stats = (object) array('count' => 0, 'total' => 0);
396
-
397
- if (!empty($user_id)) {
398
- $orders = get_posts(apply_filters('woocommerce_my_account_my_orders_query', array(
399
- 'numberposts' => -1,
400
- 'meta_key' => '_customer_user',
401
- 'meta_value' => $user_id,
402
- 'post_type' => 'shop_order',
403
- 'post_status' => 'publish'
404
- )));
405
-
406
- foreach ($orders as $order) {
407
- $woo = new WC_Order($order);
408
- $stats->total += $woo->get_total();
409
- $stats->count++;
410
- }
411
- return $stats;
412
- }
413
-
414
- return false;
415
- }
416
-
417
- /**
418
- * @param WC_Order $order
419
- * @return object
420
- */
421
- public function getOrderAddresses(WC_Order $order)
422
- {
423
- // use the info from the order to compile an address.
424
- $billing = new MailChimp_WooCommerce_Address();
425
- $billing->setAddress1($order->billing_address_1);
426
- $billing->setAddress2($order->billing_address_2);
427
- $billing->setCity($order->billing_city);
428
- $billing->setProvince($order->billing_state);
429
- $billing->setPostalCode($order->billing_postcode);
430
- $billing->setCountry($order->billing_country);
431
- $billing->setPhone($order->billing_phone);
432
-
433
- // if we have billing names go ahead and apply them
434
- if (!empty($order->billing_first_name) && !empty($order->billing_last_name)) {
435
- $billing->setName($order->billing_first_name.' '.$order->billing_last_name);
436
- }
437
-
438
- $shipping = new MailChimp_WooCommerce_Address();
439
- $shipping->setAddress1($order->shipping_address_1);
440
- $shipping->setAddress2($order->shipping_address_2);
441
- $shipping->setCity($order->shipping_city);
442
- $shipping->setProvince($order->shipping_state);
443
- $shipping->setPostalCode($order->shipping_postcode);
444
- $shipping->setCountry($order->shipping_country);
445
- if (isset($order->shipping_phone)) {
446
- $shipping->setPhone($order->shipping_phone);
447
- }
448
-
449
- // if we have shipping names go ahead and apply them
450
- if (!empty($order->shipping_first_name) && !empty($order->shipping_last_name)) {
451
- $shipping->setName($order->shipping_first_name.' '.$order->shipping_last_name);
452
- }
453
-
454
- return (object) array('billing' => $billing, 'shipping' => $shipping);
455
- }
456
-
457
- /**
458
- * @param $user_id
459
- * @param string $type
460
- * @return MailChimp_WooCommerce_Address
461
- */
462
- public function getUserAddress($user_id, $type = 'billing')
463
- {
464
- $address = new MailChimp_WooCommerce_Address();
465
-
466
- // pull all the meta for this user.
467
- $meta = get_user_meta($user_id);
468
-
469
- // loop through all the possible address properties, and if we have on on the user, set the property
470
- // because it's more up to date.
471
- $address_props = array(
472
- $type.'_address_1' => 'setAddress1',
473
- $type.'_address_2' => 'setAddress2',
474
- $type.'_city' => 'setCity',
475
- $type.'_state' => 'setProvince',
476
- $type.'_postcode' => 'setPostalCode',
477
- $type.'_country' => 'setCountry',
478
- $type.'_phone' => 'setPhone',
479
- );
480
-
481
- // loop through all the address properties and set the values if we have one.
482
- foreach ($address_props as $address_key => $address_call) {
483
- if (isset($meta[$address_key]) && !empty($meta[$address_key]) && isset($meta[$address_key][0])) {
484
- $address->$address_call($meta[$address_key][0]);
485
- }
486
- }
487
-
488
- return $address;
489
- }
490
-
491
- /**
492
- * @return array
493
- */
494
- public function getOrderStatuses()
495
- {
496
- return array(
497
- // Order received (unpaid)
498
- 'pending' => (object) array(
499
- 'financial' => 'pending',
500
- 'fulfillment' => null
501
- ),
502
- // Payment received and stock has been reduced – the order is awaiting fulfillment.
503
- // All product orders require processing, except those for digital downloads
504
- 'processing' => (object) array(
505
- 'financial' => 'pending',
506
- 'fulfillment' => null
507
- ),
508
- // Awaiting payment – stock is reduced, but you need to confirm payment
509
- 'on-hold' => (object) array(
510
- 'financial' => 'on-hold',
511
- 'fulfillment' => null
512
- ),
513
- // Order fulfilled and complete – requires no further action
514
- 'completed' => (object) array(
515
- 'financial' => 'fulfilled',
516
- 'fulfillment' => 'fulfilled'
517
- ),
518
- // Cancelled by an admin or the customer – no further action required
519
- 'cancelled' => (object) array(
520
- 'financial' => 'cancelled',
521
- 'fulfillment' => null
522
- ),
523
- // Refunded by an admin – no further action required
524
- 'refunded' => (object) array(
525
- 'financial' => 'refunded',
526
- 'fulfillment' => null
527
- ),
528
- // Payment failed or was declined (unpaid). Note that this status may not show immediately and
529
- // instead show as Pending until verified (i.e., PayPal)
530
- 'failed' => (object) array(
531
- 'financial' => 'failed',
532
- 'fulfillment' => null
533
- ),
534
- );
535
- }
536
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/api/helpers/class-mailchimp-woocommerce-api-currency-codes.php CHANGED
@@ -7,118 +7,1087 @@
7
  * Email: ryan@vextras.com
8
  * Date: 7/12/16
9
  * Time: 1:38 PM
 
10
  */
11
  class MailChimp_WooCommerce_CurrencyCodes
12
  {
13
- /**
14
- * @return array
15
- */
16
- public static function all()
17
- {
18
- return array(
19
- 'AFA' => array('Afghan Afghani', '971'),
20
- 'AWG' => array('Aruban Florin', '533'),
21
- 'AUD' => array('Australian Dollars', '036'),
22
- 'ARS' => array('Argentine Pes', '032'),
23
- 'AZN' => array('Azerbaijanian Manat', '944'),
24
- 'BSD' => array('Bahamian Dollar', '044'),
25
- 'BDT' => array('Bangladeshi Taka', '050'),
26
- 'BBD' => array('Barbados Dollar', '052'),
27
- 'BYN' => array('Belarussian Rouble', '974'),
28
- 'BOB' => array('Bolivian Boliviano', '068'),
29
- 'BRL' => array('Brazilian Real', '986'),
30
- 'GBP' => array('British Pounds Sterling', '826'),
31
- 'BGN' => array('Bulgarian Lev', '975'),
32
- 'KHR' => array('Cambodia Riel', '116'),
33
- 'CAD' => array('Canadian Dollars', '124'),
34
- 'KYD' => array('Cayman Islands Dollar', '136'),
35
- 'CLP' => array('Chilean Peso', '152'),
36
- 'CNY' => array('Chinese Renminbi Yuan', '156'),
37
- 'COP' => array('Colombian Peso', '170'),
38
- 'CRC' => array('Costa Rican Colon', '188'),
39
- 'HRK' => array('Croatia Kuna', '191'),
40
- 'CPY' => array('Cypriot Pounds', '196'),
41
- 'CZK' => array('Czech Koruna', '203'),
42
- 'DKK' => array('Danish Krone', '208'),
43
- 'DOP' => array('Dominican Republic Peso', '214'),
44
- 'XCD' => array('East Caribbean Dollar', '951'),
45
- 'EGP' => array('Egyptian Pound', '818'),
46
- 'ERN' => array('Eritrean Nakfa', '232'),
47
- 'EEK' => array('Estonia Kroon', '233'),
48
- 'EUR' => array('Euro', '978'),
49
- 'GEL' => array('Georgian Lari', '981'),
50
- 'GHC' => array('Ghana Cedi', '288'),
51
- 'GIP' => array('Gibraltar Pound', '292'),
52
- 'GTQ' => array('Guatemala Quetzal', '320'),
53
- 'HNL' => array('Honduras Lempira', '340'),
54
- 'HKD' => array('Hong Kong Dollars', '344'),
55
- 'HUF' => array('Hungary Forint', '348'),
56
- 'ISK' => array('Icelandic Krona', '352'),
57
- 'INR' => array('Indian Rupee', '356'),
58
- 'IDR' => array('Indonesia Rupiah', '360'),
59
- 'ILS' => array('Israel Shekel', '376'),
60
- 'JMD' => array('Jamaican Dollar', '388'),
61
- 'JPY' => array('Japanese yen', '392'),
62
- 'KZT' => array('Kazakhstan Tenge', '368'),
63
- 'KES' => array('Kenyan Shilling', '404'),
64
- 'KWD' => array('Kuwaiti Dinar', '414'),
65
- 'LVL' => array('Latvia Lat', '428'),
66
- 'LBP' => array('Lebanese Pound', '422'),
67
- 'LTL' => array('Lithuania Litas', '440'),
68
- 'MDL' => array('Moldovan Leu', '498'),
69
- 'MOP' => array('Macau Pataca', '446'),
70
- 'MKD' => array('Macedonian Denar', '807'),
71
- 'MGA' => array('Malagascy Ariary', '969'),
72
- 'MYR' => array('Malaysian Ringgit', '458'),
73
- 'MTL' => array('Maltese Lira', '470'),
74
- 'BAM' => array('Marka', '977'),
75
- 'MUR' => array('Mauritius Rupee', '480'),
76
- 'MXN' => array('Mexican Pesos', '484'),
77
- 'MZM' => array('Mozambique Metical', '508'),
78
- 'NPR' => array('Nepalese Rupee', '524'),
79
- 'ANG' => array('Netherlands Antilles Guilder', '532'),
80
- 'TWD' => array('New Taiwanese Dollars', '901'),
81
- 'NZD' => array('New Zealand Dollars', '554'),
82
- 'NIO' => array('Nicaragua Cordoba', '558'),
83
- 'NGN' => array('Nigeria Naira', '566'),
84
- 'KPW' => array('North Korean Won', '408'),
85
- 'NOK' => array('Norwegian Krone', '578'),
86
- 'OMR' => array('Omani Riyal', '512'),
87
- 'PKR' => array('Pakistani Rupee', '586'),
88
- 'PYG' => array('Paraguay Guarani', '600'),
89
- 'PEN' => array('Peru New Sol', '604'),
90
- 'PHP' => array('Philippine Pesos', '608'),
91
- 'PLN' => array('Polish Zloty', '985'),
92
- 'QAR' => array('Qatari Riyal', '634'),
93
- 'RON' => array('Romanian New Leu', '946'),
94
- 'RUB' => array('Russian Federation Ruble', '643'),
95
- 'SAR' => array('Saudi Riyal', '682'),
96
- 'CSD' => array('Serbian Dinar', '891'),
97
- 'SCR' => array('Seychelles Rupee', '690'),
98
- 'SGD' => array('Singapore Dollars', '702'),
99
- 'SKK' => array('Slovak Koruna', '703'),
100
- 'SIT' => array('Slovenia Tolar', '705'),
101
- 'ZAR' => array('South African Rand', '710'),
102
- 'KRW' => array('South Korean Won', '410'),
103
- 'LKR' => array('Sri Lankan Rupee', '144'),
104
- 'SRD' => array('Surinam Dollar', '968'),
105
- 'SEK' => array('Swedish Krona', '752'),
106
- 'CHF' => array('Swiss Francs', '756'),
107
- 'TZS' => array('Tanzanian Shilling', '834'),
108
- 'THB' => array('Thai Baht', '764'),
109
- 'TTD' => array('Trinidad and Tobago Dollar', '780'),
110
- 'TRY' => array('Turkish New Lira', '949'),
111
- 'AED' => array('UAE Dirham', '784'),
112
- 'USD' => array('US Dollars', '840'),
113
- 'UGX' => array('Ugandian Shilling', '800'),
114
- 'UAH' => array('Ukraine Hryvna', '980'),
115
- 'UYU' => array('Uruguayan Peso', '858'),
116
- 'UZS' => array('Uzbekistani Som', '860'),
117
- 'VEB' => array('Venezuela Bolivar', '862'),
118
- 'VND' => array('Vietnam Dong', '704'),
119
- 'AMK' => array('Zambian Kwacha', '894'),
120
- 'ZWD' => array('Zimbabwe Dollar', '716'),
121
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
123
 
124
  /**
@@ -127,8 +1096,8 @@ class MailChimp_WooCommerce_CurrencyCodes
127
  public static function lists()
128
  {
129
  $response = array();
130
- foreach (static::all() as $key => $data) {
131
- $response[$key] = $data[0];
132
  }
133
  return $response;
134
  }
7
  * Email: ryan@vextras.com
8
  * Date: 7/12/16
9
  * Time: 1:38 PM
10
+ * Updated with last ISO 4217 version 2015 @ Mar 21st, 2019
11
  */
12
  class MailChimp_WooCommerce_CurrencyCodes
13
  {
14
+ static function currencies() {
15
+ return [
16
+ [
17
+ 'name' => 'UAE Dirham',
18
+ 'alpha3' => 'AED',
19
+ 'numeric' => '784',
20
+ 'country' => 'AE',
21
+ ],
22
+ [
23
+ 'name' => 'Afghan Afghani',
24
+ 'alpha3' => 'AFN',
25
+ 'numeric' => '971',
26
+ 'country' => 'AF',
27
+ ],
28
+ [
29
+ 'name' => 'Albanian Lek',
30
+ 'alpha3' => 'ALL',
31
+ 'numeric' => '008',
32
+ 'country' => 'AL',
33
+ ],
34
+ [
35
+ 'name' => 'Armenian Dram',
36
+ 'alpha3' => 'AMD',
37
+ 'numeric' => '051',
38
+ 'country' => 'AM',
39
+ ],
40
+ [
41
+ 'name' => 'Netherlands Antillean Guilder',
42
+ 'alpha3' => 'ANG',
43
+ 'numeric' => '532',
44
+ 'country' => [
45
+ 'CW',
46
+ 'SX',
47
+ ],
48
+ ],
49
+ [
50
+ 'name' => 'Angolan Kwanza',
51
+ 'alpha3' => 'AOA',
52
+ 'numeric' => '973',
53
+ 'country' => 'AO',
54
+ ],
55
+ [
56
+ 'name' => 'Argentine Peso',
57
+ 'alpha3' => 'ARS',
58
+ 'numeric' => '032',
59
+ 'country' => 'AR',
60
+ ],
61
+ [
62
+ 'name' => 'Australian Dollar',
63
+ 'alpha3' => 'AUD',
64
+ 'numeric' => '036',
65
+ 'country' => [
66
+ 'AU',
67
+ 'CC',
68
+ 'CX',
69
+ 'HM',
70
+ 'KI',
71
+ 'NF',
72
+ 'NR',
73
+ 'TV',
74
+ ],
75
+ ],
76
+ [
77
+ 'name' => 'Aruban Florin',
78
+ 'alpha3' => 'AWG',
79
+ 'numeric' => '533',
80
+ 'country' => 'AW',
81
+ ],
82
+ [
83
+ 'name' => 'Azerbaijani Manat',
84
+ 'alpha3' => 'AZN',
85
+ 'numeric' => '944',
86
+ 'country' => 'AZ',
87
+ ],
88
+ [
89
+ 'name' => 'Bosnia and Herzegovina Convertible Mark',
90
+ 'alpha3' => 'BAM',
91
+ 'numeric' => '977',
92
+ 'country' => 'BA',
93
+ ],
94
+ [
95
+ 'name' => 'Barbados Dollar',
96
+ 'alpha3' => 'BBD',
97
+ 'numeric' => '052',
98
+ 'country' => 'BB',
99
+ ],
100
+ [
101
+ 'name' => 'Bangladeshi Taka',
102
+ 'alpha3' => 'BDT',
103
+ 'numeric' => '050',
104
+ 'country' => 'BD',
105
+ ],
106
+ [
107
+ 'name' => 'Bulgarian Lev',
108
+ 'alpha3' => 'BGN',
109
+ 'numeric' => '975',
110
+ 'country' => 'BG',
111
+ ],
112
+ [
113
+ 'name' => 'Bahraini Dinar',
114
+ 'alpha3' => 'BHD',
115
+ 'numeric' => '048',
116
+ 'country' => 'BH',
117
+ ],
118
+ [
119
+ 'name' => 'Burundian Franc',
120
+ 'alpha3' => 'BIF',
121
+ 'numeric' => '108',
122
+ 'country' => 'BI',
123
+ ],
124
+ [
125
+ 'name' => 'Bermudian Dollar',
126
+ 'alpha3' => 'BMD',
127
+ 'numeric' => '060',
128
+ 'country' => 'BM',
129
+ ],
130
+ [
131
+ 'name' => 'Brunei Dollar',
132
+ 'alpha3' => 'BND',
133
+ 'numeric' => '096',
134
+ 'country' => 'BN',
135
+ ],
136
+ [
137
+ 'name' => 'Boliviano',
138
+ 'alpha3' => 'BOB',
139
+ 'numeric' => '068',
140
+ 'country' => 'BO',
141
+ ],
142
+ [
143
+ 'name' => 'Brazilian Real',
144
+ 'alpha3' => 'BRL',
145
+ 'numeric' => '986',
146
+ 'country' => 'BR',
147
+ ],
148
+ [
149
+ 'name' => 'Bahamian Dollar',
150
+ 'alpha3' => 'BSD',
151
+ 'numeric' => '044',
152
+ 'country' => 'BS',
153
+ ],
154
+ [
155
+ 'name' => 'Bhutanese Ngultrum',
156
+ 'alpha3' => 'BTN',
157
+ 'numeric' => '064',
158
+ 'country' => 'BT',
159
+ ],
160
+ [
161
+ 'name' => 'Botswana Pula',
162
+ 'alpha3' => 'BWP',
163
+ 'numeric' => '072',
164
+ 'country' => [
165
+ 'BW',
166
+ 'ZW',
167
+ ],
168
+ ],
169
+ [
170
+ 'name' => 'Belarussian Ruble',
171
+ 'alpha3' => 'BYN',
172
+ 'numeric' => '933',
173
+ 'country' => 'BY',
174
+ ],
175
+ [
176
+ 'name' => 'Belize Dollar',
177
+ 'alpha3' => 'BZD',
178
+ 'numeric' => '084',
179
+ 'country' => 'BZ',
180
+ ],
181
+ [
182
+ 'name' => 'Canadian Dollar',
183
+ 'alpha3' => 'CAD',
184
+ 'numeric' => '124',
185
+ 'country' => 'CA',
186
+ ],
187
+ [
188
+ 'name' => 'Congolese Franc',
189
+ 'alpha3' => 'CDF',
190
+ 'numeric' => '976',
191
+ 'country' => 'CD',
192
+ ],
193
+ [
194
+ 'name' => 'Swiss Franc',
195
+ 'alpha3' => 'CHF',
196
+ 'numeric' => '756',
197
+ 'country' => [
198
+ 'CH',
199
+ 'LI',
200
+ ],
201
+ ],
202
+ [
203
+ 'name' => 'Chilean Peso',
204
+ 'alpha3' => 'CLP',
205
+ 'numeric' => '152',
206
+ 'country' => 'CL',
207
+ ],
208
+ [
209
+ 'name' => 'Chinese Yuan',
210
+ 'alpha3' => 'CNY',
211
+ 'numeric' => '156',
212
+ 'country' => 'CN',
213
+ ],
214
+ [
215
+ 'name' => 'Colombian Peso',
216
+ 'alpha3' => 'COP',
217
+ 'numeric' => '170',
218
+ 'country' => 'CO',
219
+ ],
220
+ [
221
+ 'name' => 'Costa Rican Colon',
222
+ 'alpha3' => 'CRC',
223
+ 'numeric' => '188',
224
+ 'country' => 'CR',
225
+ ],
226
+ [
227
+ 'name' => 'Cuban Convertible Peso',
228
+ 'alpha3' => 'CUC',
229
+ 'numeric' => '931',
230
+ 'country' => 'CU',
231
+ ],
232
+ [
233
+ 'name' => 'Cuban Peso',
234
+ 'alpha3' => 'CUP',
235
+ 'numeric' => '192',
236
+ 'country' => 'CU',
237
+ ],
238
+ [
239
+ 'name' => 'Cape Verde Escudo',
240
+ 'alpha3' => 'CVE',
241
+ 'numeric' => '132',
242
+ 'country' => 'CV',
243
+ ],
244
+ [
245
+ 'name' => 'Czech Koruna',
246
+ 'alpha3' => 'CZK',
247
+ 'numeric' => '203',
248
+ 'country' => 'CZ',
249
+ ],
250
+ [
251
+ 'name' => 'Djiboutian Franc',
252
+ 'alpha3' => 'DJF',
253
+ 'numeric' => '262',
254
+ 'country' => 'DJ',
255
+ ],
256
+ [
257
+ 'name' => 'Danish Krone',
258
+ 'alpha3' => 'DKK',
259
+ 'numeric' => '208',
260
+ 'country' => [
261
+ 'DK',
262
+ 'FO',
263
+ 'GL',
264
+ ],
265
+ ],
266
+ [
267
+ 'name' => 'Dominican Peso',
268
+ 'alpha3' => 'DOP',
269
+ 'numeric' => '214',
270
+ 'country' => 'DO',
271
+ ],
272
+ [
273
+ 'name' => 'Algerian Dinar',
274
+ 'alpha3' => 'DZD',
275
+ 'numeric' => '012',
276
+ 'country' => 'DZ',
277
+ ],
278
+ [
279
+ 'name' => 'Egyptian Pound',
280
+ 'alpha3' => 'EGP',
281
+ 'numeric' => '818',
282
+ 'country' => 'EG',
283
+ ],
284
+ [
285
+ 'name' => 'Eritrean Nakfa',
286
+ 'alpha3' => 'ERN',
287
+ 'numeric' => '232',
288
+ 'country' => 'ER',
289
+ ],
290
+ [
291
+ 'name' => 'Ethiopian Birr',
292
+ 'alpha3' => 'ETB',
293
+ 'numeric' => '230',
294
+ 'country' => 'ET',
295
+ ],
296
+ [
297
+ 'name' => 'Euro',
298
+ 'alpha3' => 'EUR',
299
+ 'numeric' => '978',
300
+ 'country' => [
301
+ 'AD',
302
+ 'AT',
303
+ 'AX',
304
+ 'BE',
305
+ 'BL',
306
+ 'CY',
307
+ 'DE',
308
+ 'ES',
309
+ 'FI',
310
+ 'FR',
311
+ 'GF',
312
+ 'GP',
313
+ 'GR',
314
+ 'IE',
315
+ 'IT',
316
+ 'LT',
317
+ 'LU',
318
+ 'MC',
319
+ 'ME',
320
+ 'MF',
321
+ 'MQ',
322
+ 'MT',
323
+ 'NL',
324
+ 'PM',
325
+ 'PT',
326
+ 'RE',
327
+ 'SI',
328
+ 'SK',
329
+ 'SM',
330
+ 'TF',
331
+ 'VA',
332
+ 'YT',
333
+ 'ZW',
334
+ ],
335
+ ],
336
+ [
337
+ 'name' => 'Fiji Dollar',
338
+ 'alpha3' => 'FJD',
339
+ 'numeric' => '242',
340
+ 'country' => 'FJ',
341
+ ],
342
+ [
343
+ 'name' => 'Falkland Islands Pound',
344
+ 'alpha3' => 'FKP',
345
+ 'numeric' => '238',
346
+ 'country' => 'FK',
347
+ ],
348
+ [
349
+ 'name' => 'Pound Sterling',
350
+ 'alpha3' => 'GBP',
351
+ 'numeric' => '826',
352
+ 'country' => [
353
+ 'GB',
354
+ 'GG',
355
+ 'GS',
356
+ 'IM',
357
+ 'IO',
358
+ 'JE',
359
+ 'ZW',
360
+ ],
361
+ ],
362
+ [
363
+ 'name' => 'Georgian Lari',
364
+ 'alpha3' => 'GEL',
365
+ 'numeric' => '981',
366
+ 'country' => 'GE',
367
+ ],
368
+ [
369
+ 'name' => 'Ghanaian Cedi',
370
+ 'alpha3' => 'GHS',
371
+ 'numeric' => '936',
372
+ 'country' => 'GH',
373
+ ],
374
+ [
375
+ 'name' => 'Gibraltar Pound',
376
+ 'alpha3' => 'GIP',
377
+ 'numeric' => '292',
378
+ 'country' => 'GI',
379
+ ],
380
+ [
381
+ 'name' => 'Gambian Dalasi',
382
+ 'alpha3' => 'GMD',
383
+ 'numeric' => '270',
384
+ 'country' => 'GM',
385
+ ],
386
+ [
387
+ 'name' => 'Guinean Franc',
388
+ 'alpha3' => 'GNF',
389
+ 'numeric' => '324',
390
+ 'country' => 'GN',
391
+ ],
392
+ [
393
+ 'name' => 'Guatemalan Quetzal',
394
+ 'alpha3' => 'GTQ',
395
+ 'numeric' => '320',
396
+ 'country' => 'GT',
397
+ ],
398
+ [
399
+ 'name' => 'Guyanese Dollar',
400
+ 'alpha3' => 'GYD',
401
+ 'numeric' => '328',
402
+ 'country' => 'GY',
403
+ ],
404
+ [
405
+ 'name' => 'Hong Kong Dollar',
406
+ 'alpha3' => 'HKD',
407
+ 'numeric' => '344',
408
+ 'country' => 'HK',
409
+ ],
410
+ [
411
+ 'name' => 'Honduran Lempira',
412
+ 'alpha3' => 'HNL',
413
+ 'numeric' => '340',
414
+ 'country' => 'HN',
415
+ ],
416
+ [
417
+ 'name' => 'Kuna',
418
+ 'alpha3' => 'HRK',
419
+ 'numeric' => '191',
420
+ 'country' => 'HR',
421
+ ],
422
+ [
423
+ 'name' => 'Haitian Gourde',
424
+ 'alpha3' => 'HTG',
425
+ 'numeric' => '332',
426
+ 'country' => 'HT',
427
+ ],
428
+ [
429
+ 'name' => 'Hungarian Forint',
430
+ 'alpha3' => 'HUF',
431
+ 'numeric' => '348',
432
+ 'country' => 'HU',
433
+ ],
434
+ [
435
+ 'name' => 'Indonesian Rupiah',
436
+ 'alpha3' => 'IDR',
437
+ 'numeric' => '360',
438
+ 'country' => 'ID',
439
+ ],
440
+ [
441
+ 'name' => 'Israeli New Sheqel',
442
+ 'alpha3' => 'ILS',
443
+ 'numeric' => '376',
444
+ 'country' => [
445
+ 'IL',
446
+ 'PS',
447
+ ],
448
+ ],
449
+ [
450
+ 'name' => 'Indian Rupee',
451
+ 'alpha3' => 'INR',
452
+ 'numeric' => '356',
453
+ 'country' => 'IN',
454
+ ],
455
+ [
456
+ 'name' => 'Iraqi Dinar',
457
+ 'alpha3' => 'IQD',
458
+ 'numeric' => '368',
459
+ 'country' => 'IQ',
460
+ ],
461
+ [
462
+ 'name' => 'Iranian Rial',
463
+ 'alpha3' => 'IRR',
464
+ 'numeric' => '364',
465
+ 'country' => 'IR',
466
+ ],
467
+ [
468
+ 'name' => 'Icelandic Króna',
469
+ 'alpha3' => 'ISK',
470
+ 'numeric' => '352',
471
+ 'country' => 'IS',
472
+ ],
473
+ [
474
+ 'name' => 'Jamaican Dollar',
475
+ 'alpha3' => 'JMD',
476
+ 'numeric' => '388',
477
+ 'country' => 'JM',
478
+ ],
479
+ [
480
+ 'name' => 'Jordanian Dinar',
481
+ 'alpha3' => 'JOD',
482
+ 'numeric' => '400',
483
+ 'country' => 'JO',
484
+ ],
485
+ [
486
+ 'name' => 'Japanese Yen',
487
+ 'alpha3' => 'JPY',
488
+ 'numeric' => '392',
489
+ 'country' => 'JP',
490
+ ],
491
+ [
492
+ 'name' => 'Kenyan Shilling',
493
+ 'alpha3' => 'KES',
494
+ 'numeric' => '404',
495
+ 'country' => 'KE',
496
+ ],
497
+ [
498
+ 'name' => 'Kyrgyzstani Som',
499
+ 'alpha3' => 'KGS',
500
+ 'numeric' => '417',
501
+ 'country' => 'KG',
502
+ ],
503
+ [
504
+ 'name' => 'Cambodian Riel',
505
+ 'alpha3' => 'KHR',
506
+ 'numeric' => '116',
507
+ 'country' => 'KH',
508
+ ],
509
+ [
510
+ 'name' => 'Comoro Franc',
511
+ 'alpha3' => 'KMF',
512
+ 'numeric' => '174',
513
+ 'country' => 'KM',
514
+ ],
515
+ [
516
+ 'name' => 'North Korean Won',
517
+ 'alpha3' => 'KPW',
518
+ 'numeric' => '408',
519
+ 'country' => 'KP',
520
+ ],
521
+ [
522
+ 'name' => 'South Korean Won',
523
+ 'alpha3' => 'KRW',
524
+ 'numeric' => '410',
525
+ 'country' => 'KR',
526
+ ],
527
+ [
528
+ 'name' => 'Kuwaiti Dinar',
529
+ 'alpha3' => 'KWD',
530
+ 'numeric' => '414',
531
+ 'country' => 'KW',
532
+ ],
533
+ [
534
+ 'name' => 'Cayman Islands Dollar',
535
+ 'alpha3' => 'KYD',
536
+ 'numeric' => '136',
537
+ 'country' => 'KY',
538
+ ],
539
+ [
540
+ 'name' => 'Kazakhstani Tenge',
541
+ 'alpha3' => 'KZT',
542
+ 'numeric' => '398',
543
+ 'country' => 'KZ',
544
+ ],
545
+ [
546
+ 'name' => 'Lao Kip',
547
+ 'alpha3' => 'LAK',
548
+ 'numeric' => '418',
549
+ 'country' => 'LA',
550
+ ],
551
+ [
552
+ 'name' => 'Lebanese Pound',
553
+ 'alpha3' => 'LBP',
554
+ 'numeric' => '422',
555
+ 'country' => 'LB',
556
+ ],
557
+ [
558
+ 'name' => 'Sri Lankan Rupee',
559
+ 'alpha3' => 'LKR',
560
+ 'numeric' => '144',
561
+ 'country' => 'LK',
562
+ ],
563
+ [
564
+ 'name' => 'Liberian Dollar',
565
+ 'alpha3' => 'LRD',
566
+ 'numeric' => '430',
567
+ 'country' => 'LR',
568
+ ],
569
+ [
570
+ 'name' => 'Lesotho Loti',
571
+ 'alpha3' => 'LSL',
572
+ 'numeric' => '426',
573
+ 'country' => 'LS',
574
+ ],
575
+ [
576
+ 'name' => 'Latvian Lats',
577
+ 'alpha3' => 'LVL',
578
+ 'numeric' => '428',
579
+ 'country' => 'LV',
580
+ ],
581
+ [
582
+ 'name' => 'Libyan Dinar',
583
+ 'alpha3' => 'LYD',
584
+ 'numeric' => '434',
585
+ 'country' => 'LY',
586
+ ],
587
+ [
588
+ 'name' => 'Moroccan Dirham',
589
+ 'alpha3' => 'MAD',
590
+ 'numeric' => '504',
591
+ 'country' => [
592
+ 'EH',
593
+ 'MA',
594
+ ],
595
+ ],
596
+ [
597
+ 'name' => 'Moldovan Leu',
598
+ 'alpha3' => 'MDL',
599
+ 'numeric' => '498',
600
+ 'country' => 'MD',
601
+ ],
602
+ [
603
+ 'name' => 'Malagasy Ariary',
604
+ 'alpha3' => 'MGA',
605
+ 'numeric' => '969',
606
+ 'country' => 'MG',
607
+ ],
608
+ [
609
+ 'name' => 'Macedonian Denar',
610
+ 'alpha3' => 'MKD',
611
+ 'numeric' => '807',
612
+ 'country' => 'MK',
613
+ ],
614
+ [
615
+ 'name' => 'Myanmar Kyat',
616
+ 'alpha3' => 'MMK',
617
+ 'numeric' => '104',
618
+ 'country' => 'MM',
619
+ ],
620
+ [
621
+ 'name' => 'Mongolian Tugrik',
622
+ 'alpha3' => 'MNT',
623
+ 'numeric' => '496',
624
+ 'country' => 'MN',
625
+ ],
626
+ [
627
+ 'name' => 'Macanese Pataca',
628
+ 'alpha3' => 'MOP',
629
+ 'numeric' => '446',
630
+ 'country' => 'MO',
631
+ ],
632
+ [
633
+ 'name' => 'Mauritanian Ouguiya',
634
+ 'alpha3' => 'MRO',
635
+ 'numeric' => '478',
636
+ 'country' => 'MR',
637
+ ],
638
+ [
639
+ 'name' => 'Mauritian Rupee',
640
+ 'alpha3' => 'MUR',
641
+ 'numeric' => '480',
642
+ 'country' => 'MU',
643
+ ],
644
+ [
645
+ 'name' => 'Maldivian Rufiyaa',
646
+ 'alpha3' => 'MVR',
647
+ 'numeric' => '462',
648
+ 'country' => 'MV',
649
+ ],
650
+ [
651
+ 'name' => 'Malawian Kwacha',
652
+ 'alpha3' => 'MWK',
653
+ 'numeric' => '454',
654
+ 'country' => 'MW',
655
+ ],
656
+ [
657
+ 'name' => 'Mexican Peso',
658
+ 'alpha3' => 'MXN',
659
+ 'numeric' => '484',
660
+ 'country' => 'MX',
661
+ ],
662
+ [
663
+ 'name' => 'Malaysian Ringgit',
664
+ 'alpha3' => 'MYR',
665
+ 'numeric' => '458',
666
+ 'country' => 'MY',
667
+ ],
668
+ [
669
+ 'name' => 'Mozambican Metical',
670
+ 'alpha3' => 'MZN',
671
+ 'numeric' => '943',
672
+ 'country' => 'MZ',
673
+ ],
674
+ [
675
+ 'name' => 'Namibian Dollar',
676
+ 'alpha3' => 'NAD',
677
+ 'numeric' => '516',
678
+ 'country' => 'NA',
679
+ ],
680
+ [
681
+ 'name' => 'Nigerian Naira',
682
+ 'alpha3' => 'NGN',
683
+ 'numeric' => '566',
684
+ 'country' => 'NG',
685
+ ],
686
+ [
687
+ 'name' => 'Nicaraguan Córdoba',
688
+ 'alpha3' => 'NIO',
689
+ 'numeric' => '558',
690
+ 'country' => 'NI',
691
+ ],
692
+ [
693
+ 'name' => 'Norwegian Krone',
694
+ 'alpha3' => 'NOK',
695
+ 'numeric' => '578',
696
+ 'country' => [
697
+ 'AQ',
698
+ 'BV',
699
+ 'NO',
700
+ 'SJ',
701
+ ],
702
+ ],
703
+ [
704
+ 'name' => 'Nepalese Rupee',
705
+ 'alpha3' => 'NPR',
706
+ 'numeric' => '524',
707
+ 'country' => 'NP',
708
+ ],
709
+ [
710
+ 'name' => 'New Zealand Dollar',
711
+ 'alpha3' => 'NZD',
712
+ 'numeric' => '554',
713
+ 'country' => [
714
+ 'CK',
715
+ 'NU',
716
+ 'NZ',
717
+ 'PN',
718
+ 'TK',
719
+ ],
720
+ ],
721
+ [
722
+ 'name' => 'Omani Rial',
723
+ 'alpha3' => 'OMR',
724
+ 'numeric' => '512',
725
+ 'country' => 'OM',
726
+ ],
727
+ [
728
+ 'name' => 'Panamanian Balboa',
729
+ 'alpha3' => 'PAB',
730
+ 'numeric' => '590',
731
+ 'country' => 'PA',
732
+ ],
733
+ [
734
+ 'name' => 'Peruvian Nuevo Sol',
735
+ 'alpha3' => 'PEN',
736
+ 'numeric' => '604',
737
+ 'country' => 'PE',
738
+ ],
739
+ [
740
+ 'name' => 'Papua New Guinean Kina',
741
+ 'alpha3' => 'PGK',
742
+ 'numeric' => '598',
743
+ 'country' => 'PG',
744
+ ],
745
+ [
746
+ 'name' => 'Philippine Peso',
747
+ 'alpha3' => 'PHP',
748
+ 'numeric' => '608',
749
+ 'country' => 'PH',
750
+ ],
751
+ [
752
+ 'name' => 'Pakistani Rupee',
753
+ 'alpha3' => 'PKR',
754
+ 'numeric' => '586',
755
+ 'country' => 'PK',
756
+ ],
757
+ [
758
+ 'name' => 'Polish Zloty',
759
+ 'alpha3' => 'PLN',
760
+ 'numeric' => '985',
761
+ 'country' => 'PL',
762
+ ],
763
+ [
764
+ 'name' => 'Paraguayan Guarani',
765
+ 'alpha3' => 'PYG',
766
+ 'numeric' => '600',
767
+ 'country' => 'PY',
768
+ ],
769
+ [
770
+ 'name' => 'Qatari Rial',
771
+ 'alpha3' => 'QAR',
772
+ 'numeric' => '634',
773
+ 'country' => 'QA',
774
+ ],
775
+ [
776
+ 'name' => 'Romanian Leu',
777
+ 'alpha3' => 'RON',
778
+ 'numeric' => '946',
779
+ 'country' => 'RO',
780
+ ],
781
+ [
782
+ 'name' => 'Serbian Dinar',
783
+ 'alpha3' => 'RSD',
784
+ 'numeric' => '941',
785
+ 'country' => 'RS',
786
+ ],
787
+ [
788
+ 'name' => 'Russian Ruble',
789
+ 'alpha3' => 'RUB',
790
+ 'numeric' => '643',
791
+ 'country' => 'RU',
792
+ ],
793
+ [
794
+ 'name' => 'Rwandan Franc',
795
+ 'alpha3' => 'RWF',
796
+ 'numeric' => '646',
797
+ 'country' => 'RW',
798
+ ],
799
+ [
800
+ 'name' => 'Saudi Riyal',
801
+ 'alpha3' => 'SAR',
802
+ 'numeric' => '682',
803
+ 'country' => 'SA',
804
+ ],
805
+ [
806
+ 'name' => 'Solomon Islands Dollar',
807
+ 'alpha3' => 'SBD',
808
+ 'numeric' => '090',
809
+ 'country' => 'SB',
810
+ ],
811
+ [
812
+ 'name' => 'Seychelles Rupee',
813
+ 'alpha3' => 'SCR',
814
+ 'numeric' => '690',
815
+ 'country' => 'SC',
816
+ ],
817
+ [
818
+ 'name' => 'Sudanese Pound',
819
+ 'alpha3' => 'SDG',
820
+ 'numeric' => '938',
821
+ 'country' => 'SD',
822
+ ],
823
+ [
824
+ 'name' => 'Swedish Krona',
825
+ 'alpha3' => 'SEK',
826
+ 'numeric' => '752',
827
+ 'country' => 'SE',
828
+ ],
829
+ [
830
+ 'name' => 'Singapore Dollar',
831
+ 'alpha3' => 'SGD',
832
+ 'numeric' => '702',
833
+ 'country' => [
834
+ 'BN',
835
+ 'SG',
836
+ ],
837
+ ],
838
+ [
839
+ 'name' => 'Saint Helena Pound',
840
+ 'alpha3' => 'SHP',
841
+ 'numeric' => '654',
842
+ 'country' => 'SH',
843
+ ],
844
+ [
845
+ 'name' => 'Sierra Leonean Leone',
846
+ 'alpha3' => 'SLL',
847
+ 'numeric' => '694',
848
+ 'country' => 'SL',
849
+ ],
850
+ [
851
+ 'name' => 'Somali Shilling',
852
+ 'alpha3' => 'SOS',
853
+ 'numeric' => '706',
854
+ 'country' => 'SO',
855
+ ],
856
+ [
857
+ 'name' => 'Surinamese Dollar',
858
+ 'alpha3' => 'SRD',
859
+ 'numeric' => '968',
860
+ 'country' => 'SR',
861
+ ],
862
+ [
863
+ 'name' => 'South Sudanese Pound',
864
+ 'alpha3' => 'SSP',
865
+ 'numeric' => '728',
866
+ 'country' => 'SS',
867
+ ],
868
+ [
869
+ 'name' => 'São Tomé and Principe Dobra',
870
+ 'alpha3' => 'STD',
871
+ 'numeric' => '678',
872
+ 'country' => 'ST',
873
+ ],
874
+ [
875
+ 'name' => 'Syrian Pound',
876
+ 'alpha3' => 'SYP',
877
+ 'numeric' => '760',
878
+ 'country' => 'SY',
879
+ ],
880
+ [
881
+ 'name' => 'Swazi Lilangeni',
882
+ 'alpha3' => 'SZL',
883
+ 'numeric' => '748',
884
+ 'country' => 'SZ',
885
+ ],
886
+ [
887
+ 'name' => 'Thai Baht',
888
+ 'alpha3' => 'THB',
889
+ 'numeric' => '764',
890
+ 'country' => 'TH',
891
+ ],
892
+ [
893
+ 'name' => 'Tajikistani Somoni',
894
+ 'alpha3' => 'TJS',
895
+ 'numeric' => '972',
896
+ 'country' => 'TJ',
897
+ ],
898
+ [
899
+ 'name' => 'Turkmenistani Manat',
900
+ 'alpha3' => 'TMT',
901
+ 'numeric' => '934',
902
+ 'country' => 'TM',
903
+ ],
904
+ [
905
+ 'name' => 'Tunisian Dinar',
906
+ 'alpha3' => 'TND',
907
+ 'numeric' => '788',
908
+ 'country' => 'TN',
909
+ ],
910
+ [
911
+ 'name' => 'Tongan Paʻanga',
912
+ 'alpha3' => 'TOP',
913
+ 'numeric' => '776',
914
+ 'country' => 'TO',
915
+ ],
916
+ [
917
+ 'name' => 'Turkish Lira',
918
+ 'alpha3' => 'TRY',
919
+ 'numeric' => '949',
920
+ 'country' => 'TR',
921
+ ],
922
+ [
923
+ 'name' => 'Trinidad and Tobago Dollar',
924
+ 'alpha3' => 'TTD',
925
+ 'numeric' => '780',
926
+ 'country' => 'TT',
927
+ ],
928
+ [
929
+ 'name' => 'New Taiwan Dollar',
930
+ 'alpha3' => 'TWD',
931
+ 'numeric' => '901',
932
+ 'country' => 'TW',
933
+ ],
934
+ [
935
+ 'name' => 'Tanzanian Shilling',
936
+ 'alpha3' => 'TZS',
937
+ 'numeric' => '834',
938
+ 'country' => 'TZ',
939
+ ],
940
+ [
941
+ 'name' => 'Ukrainian Hryvnia',
942
+ 'alpha3' => 'UAH',
943
+ 'numeric' => '980',
944
+ 'country' => 'UA',
945
+ ],
946
+ [
947
+ 'name' => 'Ugandan Shilling',
948
+ 'alpha3' => 'UGX',
949
+ 'numeric' => '800',
950
+ 'country' => 'UG',
951
+ ],
952
+ [
953
+ 'name' => 'US Dollar',
954
+ 'alpha3' => 'USD',
955
+ 'numeric' => '840',
956
+ 'country' => [
957
+ 'AS',
958
+ 'BQ',
959
+ 'EC',
960
+ 'FM',
961
+ 'GU',
962
+ 'MF',
963
+ 'MH',
964
+ 'MP',
965
+ 'PR',
966
+ 'PW',
967
+ 'SV',
968
+ 'TC',
969
+ 'TL',
970
+ 'UM',
971
+ 'US',
972
+ 'VG',
973
+ 'VI',
974
+ 'ZW',
975
+ ],
976
+ ],
977
+ [
978
+ 'name' => 'Uruguayan Peso',
979
+ 'alpha3' => 'UYU',
980
+ 'numeric' => '858',
981
+ 'country' => 'UY',
982
+ ],
983
+ [
984
+ 'name' => 'Uzbekistan Som',
985
+ 'alpha3' => 'UZS',
986
+ 'numeric' => '860',
987
+ 'country' => 'UZ',
988
+ ],
989
+ [
990
+ 'name' => 'Venezuelan Bolivar',
991
+ 'alpha3' => 'VEF',
992
+ 'numeric' => '937',
993
+ 'country' => 'VE',
994
+ ],
995
+ [
996
+ 'name' => 'Vietnamese Dong',
997
+ 'alpha3' => 'VND',
998
+ 'numeric' => '704',
999
+ 'country' => 'VN',
1000
+ ],
1001
+ [
1002
+ 'name' => 'Vanuatu Vatu',
1003
+ 'alpha3' => 'VUV',
1004
+ 'numeric' => '548',
1005
+ 'country' => 'VU',
1006
+ ],
1007
+ [
1008
+ 'name' => 'Samoan Tala',
1009
+ 'alpha3' => 'WST',
1010
+ 'numeric' => '882',
1011
+ 'country' => 'WS',
1012
+ ],
1013
+ [
1014
+ 'name' => 'CFA Franc BEAC',
1015
+ 'alpha3' => 'XAF',
1016
+ 'numeric' => '950',
1017
+ 'country' => [
1018
+ 'CF',
1019
+ 'CG',
1020
+ 'CM',
1021
+ 'GA',
1022
+ 'GQ',
1023
+ 'TD',
1024
+ ],
1025
+ ],
1026
+ [
1027
+ 'name' => 'East Caribbean Dollar',
1028
+ 'alpha3' => 'XCD',
1029
+ 'numeric' => '951',
1030
+ 'country' => [
1031
+ 'AG',
1032
+ 'AI',
1033
+ 'DM',
1034
+ 'GD',
1035
+ 'KN',
1036
+ 'LC',
1037
+ 'MS',
1038
+ 'VC',
1039
+ ],
1040
+ ],
1041
+ [
1042
+ 'name' => 'CFA Franc BCEAO',
1043
+ 'alpha3' => 'XOF',
1044
+ 'numeric' => '952',
1045
+ 'country' => [
1046
+ 'BJ',
1047
+ 'BF',
1048
+ 'CI',
1049
+ 'GW',
1050
+ 'ML',
1051
+ 'NE',
1052
+ 'SN',
1053
+ 'TG',
1054
+ ],
1055
+ ],
1056
+ [
1057
+ 'name' => 'CFP Franc',
1058
+ 'alpha3' => 'XPF',
1059
+ 'numeric' => '953',
1060
+ 'country' => [
1061
+ 'NC',
1062
+ 'PF',
1063
+ 'WF',
1064
+ ],
1065
+ ],
1066
+ [
1067
+ 'name' => 'Yemeni Rial',
1068
+ 'alpha3' => 'YER',
1069
+ 'numeric' => '886',
1070
+ 'country' => 'YE',
1071
+ ],
1072
+ [
1073
+ 'name' => 'South African Rand',
1074
+ 'alpha3' => 'ZAR',
1075
+ 'numeric' => '710',
1076
+ 'country' => [
1077
+ 'NA',
1078
+ 'LS',
1079
+ 'SZ',
1080
+ 'ZA',
1081
+ 'ZW',
1082
+ ],
1083
+ ],
1084
+ [
1085
+ 'name' => 'Zambian Kwacha',
1086
+ 'alpha3' => 'ZMW',
1087
+ 'numeric' => '967',
1088
+ 'country' => 'ZM',
1089
+ ],
1090
+ ];
1091
  }
1092
 
1093
  /**
1096
  public static function lists()
1097
  {
1098
  $response = array();
1099
+ foreach (static::currencies() as $key => $data) {
1100
+ $response[$data['alpha3']] = $data['name'];
1101
  }
1102
  return $response;
1103
  }
includes/class-mailchimp-woocommerce-deactivation-survey.php CHANGED
@@ -179,9 +179,7 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
179
  $form.find('.mailchimp-woocommerce-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'mailchimp-woocommerce' ) ); ?></span>');
180
  return;
181
  }
182
-
183
- $form.find('.mailchimp-woocommerce-deactivate-survey-submit').html("Sending feedback...").attr("disabled", true).removeClass('button-primary');
184
-
185
  var submitSurvey = $.ajax(
186
  {
187
  url: "<?php echo $this->endpoint; ?>",
@@ -191,7 +189,7 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
191
  url: '<?php echo esc_url( home_url() ); ?>',
192
  data: {
193
  code: $form.find('.selected input[type=radio]').val(),
194
- reason: $form.find('.selected .mailchimp-woocommerce-deactivate-survey-option-reason').text(),
195
  details: $form.find('.selected input[type=text]').val(),
196
  plugin: '<?php echo sanitize_key( $this->name ); ?>'
197
  }
@@ -204,6 +202,7 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
204
  }
205
  )
206
  });
 
207
  // Exit key closes survey when open.
208
  $(document).keyup(function(event) {
209
  if (27 === event.keyCode && formOpen) {
@@ -325,31 +324,40 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
325
 
326
  $options = array(
327
  1 => array(
328
- 'title' => esc_html__( 'I want to change the list associated with this integration.', 'mailchimp-woocommerce' ),
 
329
  ),
330
  2 => array(
331
  'title' => esc_html__( 'I want to change the site or store connected through this integration.', 'mailchimp-woocommerce' ),
 
332
  ),
333
  3 => array(
334
  'title' => esc_html__( 'The order data isn\'t syncing.', 'mailchimp-woocommerce' ),
 
335
  ),
336
  4 => array(
337
  'title' => esc_html__( 'The promo codes aren\'t showing up.', 'mailchimp-woocommerce' ),
 
338
  ),
339
  5 => array(
340
  'title' => esc_html__( 'I\'m trying to troubleshoot the integration.', 'mailchimp-woocommerce' ),
 
341
  ),
342
  6 => array(
343
  'title' => esc_html__( 'I was instructed to disconnect by Mailchimp Support.', 'mailchimp-woocommerce' ),
 
344
  ),
345
  7 => array(
346
  'title' => esc_html__( 'I no longer use this integration.', 'mailchimp-woocommerce' ),
 
347
  ),
348
  8 => array(
349
  'title' => esc_html__( 'It\'s a temporary deactivation.', 'mailchimp-woocommerce' ),
 
350
  ),
351
  9 => array(
352
  'title' => esc_html__( 'Other', 'mailchimp-woocommerce' ),
 
353
  'details' => esc_html__( 'Please share the reason', 'mailchimp-woocommerce' ),
354
  ),
355
  );
@@ -360,7 +368,7 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
360
  <span class="mailchimp-woocommerce-deactivate-survey-header">
361
  <span class="dashicons dashicons-testimonial"></span>
362
  <?php echo ' ' . esc_html__( 'Quick Feedback', 'mailchimp-woocommerce' ); ?>
363
- <span title="<?php _e( 'Close', 'mailchimp-woocommerce' );?> " class="mailchimp-woocommerce-deactivate-survey-close">✕</span>
364
  </span>
365
 
366
  <span class="mailchimp-woocommerce-deactivate-survey-desc">
@@ -368,7 +376,7 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
368
  printf(
369
  /* translators: %s - plugin name. */
370
  esc_html__( 'If you have a moment, please share why you are deactivating %s:', 'mailchimp-woocommerce' ),
371
- 'Mailchimp for Woocommerce'
372
  );
373
  ?>
374
  </span>
@@ -377,10 +385,11 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
377
  <div class="mailchimp-woocommerce-deactivate-survey-option">
378
  <label for="mailchimp-woocommerce-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="mailchimp-woocommerce-deactivate-survey-option-label">
379
  <input id="mailchimp-woocommerce-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="mailchimp-woocommerce-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" />
380
- <span class="mailchimp-woocommerce-deactivate-survey-option-reason"><?php echo $option['title']; ?></span>
 
381
  </label>
382
  <?php if ( ! empty( $option['details'] ) ) : ?>
383
- <input class="mailchimp-woocommerce-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>" />
384
  <?php endif; ?>
385
  </div>
386
  <?php endforeach; ?>
179
  $form.find('.mailchimp-woocommerce-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'mailchimp-woocommerce' ) ); ?></span>');
180
  return;
181
  }
182
+ $form.find('.mailchimp-woocommerce-deactivate-survey-submit').html('<?php echo esc_js( __( 'Sending Feedback', 'mailchimp-woocommerce' ) ); ?>').attr("disabled", true).removeClass('button-primary');
 
 
183
  var submitSurvey = $.ajax(
184
  {
185
  url: "<?php echo $this->endpoint; ?>",
189
  url: '<?php echo esc_url( home_url() ); ?>',
190
  data: {
191
  code: $form.find('.selected input[type=radio]').val(),
192
+ reason: $form.find('.selected .mailchimp-woocommerce-deactivate-survey-option-reason').val(),
193
  details: $form.find('.selected input[type=text]').val(),
194
  plugin: '<?php echo sanitize_key( $this->name ); ?>'
195
  }
202
  }
203
  )
204
  });
205
+
206
  // Exit key closes survey when open.
207
  $(document).keyup(function(event) {
208
  if (27 === event.keyCode && formOpen) {
324
 
325
  $options = array(
326
  1 => array(
327
+ 'title' => esc_html__( 'I want to change the audience associated with this integration.', 'mailchimp-woocommerce' ),
328
+ 'reason' => 'I want to change the audience associated with this integration.'
329
  ),
330
  2 => array(
331
  'title' => esc_html__( 'I want to change the site or store connected through this integration.', 'mailchimp-woocommerce' ),
332
+ 'reason' => 'I want to change the site or store connected through this integration.'
333
  ),
334
  3 => array(
335
  'title' => esc_html__( 'The order data isn\'t syncing.', 'mailchimp-woocommerce' ),
336
+ 'reason' => 'The order data isn\'t syncing.'
337
  ),
338
  4 => array(
339
  'title' => esc_html__( 'The promo codes aren\'t showing up.', 'mailchimp-woocommerce' ),
340
+ 'reason' => 'The promo codes aren\'t showing up.'
341
  ),
342
  5 => array(
343
  'title' => esc_html__( 'I\'m trying to troubleshoot the integration.', 'mailchimp-woocommerce' ),
344
+ 'reason' => 'I\'m trying to troubleshoot the integration.'
345
  ),
346
  6 => array(
347
  'title' => esc_html__( 'I was instructed to disconnect by Mailchimp Support.', 'mailchimp-woocommerce' ),
348
+ 'reason' => 'I was instructed to disconnect by Mailchimp Support.'
349
  ),
350
  7 => array(
351
  'title' => esc_html__( 'I no longer use this integration.', 'mailchimp-woocommerce' ),
352
+ 'reason' => 'I no longer use this integration.'
353
  ),
354
  8 => array(
355
  'title' => esc_html__( 'It\'s a temporary deactivation.', 'mailchimp-woocommerce' ),
356
+ 'reason' => 'It\'s a temporary deactivation.'
357
  ),
358
  9 => array(
359
  'title' => esc_html__( 'Other', 'mailchimp-woocommerce' ),
360
+ 'reason' => 'Other',
361
  'details' => esc_html__( 'Please share the reason', 'mailchimp-woocommerce' ),
362
  ),
363
  );
368
  <span class="mailchimp-woocommerce-deactivate-survey-header">
369
  <span class="dashicons dashicons-testimonial"></span>
370
  <?php echo ' ' . esc_html__( 'Quick Feedback', 'mailchimp-woocommerce' ); ?>
371
+ <span title="<?php esc_attr_e( 'Close', 'mailchimp-woocommerce' );?> " class="mailchimp-woocommerce-deactivate-survey-close">✕</span>
372
  </span>
373
 
374
  <span class="mailchimp-woocommerce-deactivate-survey-desc">
376
  printf(
377
  /* translators: %s - plugin name. */
378
  esc_html__( 'If you have a moment, please share why you are deactivating %s:', 'mailchimp-woocommerce' ),
379
+ esc_html__( 'Mailchimp for Woocommerce', 'mailchimp-woocommerce')
380
  );
381
  ?>
382
  </span>
385
  <div class="mailchimp-woocommerce-deactivate-survey-option">
386
  <label for="mailchimp-woocommerce-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="mailchimp-woocommerce-deactivate-survey-option-label">
387
  <input id="mailchimp-woocommerce-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="mailchimp-woocommerce-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" />
388
+ <span class="mailchimp-woocommerce-deactivate-survey-option-title"><?php echo $option['title']; ?></span>
389
+ <input class="mailchimp-woocommerce-deactivate-survey-option-reason" type="hidden" value="<?php echo $option['reason']; ?>" />
390
  </label>
391
  <?php if ( ! empty( $option['details'] ) ) : ?>
392
+ <input class="mailchimp-woocommerce-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>" />
393
  <?php endif; ?>
394
  </div>
395
  <?php endforeach; ?>
includes/class-mailchimp-woocommerce-newsletter.php CHANGED
@@ -40,7 +40,7 @@ class MailChimp_Newsletter extends MailChimp_WooCommerce_Options
40
  }
41
 
42
  // allow the user to specify the text in the newsletter label.
43
- $label = $this->getOption('newsletter_label', 'Subscribe to our newsletter');
44
 
45
  // if the user chose 'check' or nothing at all, we default to true.
46
  $default_checked = $default_setting === 'check';
40
  }
41
 
42
  // allow the user to specify the text in the newsletter label.
43
+ $label = $this->getOption('newsletter_label', __('Subscribe to our newsletter', 'mailchimp-woocommerce'));
44
 
45
  // if the user chose 'check' or nothing at all, we default to true.
46
  $default_checked = $default_setting === 'check';
includes/class-mailchimp-woocommerce-privacy.php CHANGED
@@ -8,9 +8,10 @@ class MailChimp_WooCommerce_Privacy
8
  public function privacy_policy()
9
  {
10
  if (function_exists( 'wp_add_privacy_policy_content')) {
11
- $content = sprintf(
12
  __( 'When shopping, we keep a record of your email and the cart contents for up to 30 days on our server. This record is kept to repopulate the contents of your cart if you switch devices or needed to come back another day. Read our privacy policy <a href="%s">here</a>.', 'mailchimp-woocommerce' ),
13
  'https://mailchimp.com/legal/privacy/'
 
14
  );
15
  wp_add_privacy_policy_content('MailChimp for WooCommerce', wp_kses_post(wpautop($content, false)));
16
  }
8
  public function privacy_policy()
9
  {
10
  if (function_exists( 'wp_add_privacy_policy_content')) {
11
+ $content = sprintf(/* translators: %s - Mailchimp Privacy Policy URL. */
12
  __( 'When shopping, we keep a record of your email and the cart contents for up to 30 days on our server. This record is kept to repopulate the contents of your cart if you switch devices or needed to come back another day. Read our privacy policy <a href="%s">here</a>.', 'mailchimp-woocommerce' ),
13
  'https://mailchimp.com/legal/privacy/'
14
+
15
  );
16
  wp_add_privacy_policy_content('MailChimp for WooCommerce', wp_kses_post(wpautop($content, false)));
17
  }
includes/class-mailchimp-woocommerce-rest-api.php CHANGED
@@ -15,34 +15,44 @@ class MailChimp_WooCommerce_Rest_Api
15
  }
16
 
17
  /**
18
- * @return mixed
 
 
 
19
  */
20
  public static function test()
21
  {
22
- return wp_remote_get(static::url('ping'), array(
23
- 'timeout' => 5,
24
- 'blocking' => true,
25
- 'cookies' => $_COOKIE,
26
- 'sslverify' => apply_filters('https_local_ssl_verify', false)
27
- ));
 
 
 
28
  }
29
 
30
  /**
31
- * Call the "work" command manually to initiate the queue.
32
- *
33
  * @param bool $force
34
- * @return mixed
 
 
 
35
  */
36
  public static function work($force = false)
37
  {
38
  $path = $force ? 'queue/work/force' : 'queue/work';
39
  // this is the new rest API version
40
- return wp_remote_get(static::url($path), array(
41
- 'timeout' => 0.01,
42
- 'blocking' => false,
43
- 'cookies' => $_COOKIE,
44
- 'sslverify' => apply_filters('https_local_ssl_verify', false)
45
- ));
 
 
 
46
  }
47
 
48
  /**
@@ -260,7 +270,7 @@ class MailChimp_WooCommerce_Rest_Api
260
  'products_in_mailchimp' => $mailchimp_total_products,
261
  'orders_in_store' => $order_count,
262
  'orders_in_mailchimp' => $mailchimp_total_orders,
263
- 'date' => $date->format('D, M j, Y g:i A'),
264
  'has_started' => mailchimp_has_started_syncing(),
265
  'has_finished' => mailchimp_is_done_syncing(),
266
  ));
15
  }
16
 
17
  /**
18
+ * @return array|mixed|object|WP_Error|null
19
+ * @throws MailChimp_WooCommerce_Error
20
+ * @throws MailChimp_WooCommerce_RateLimitError
21
+ * @throws MailChimp_WooCommerce_ServerError
22
  */
23
  public static function test()
24
  {
25
+ return mailchimp_woocommerce_rest_api_get(
26
+ static::url('ping'),
27
+ array(
28
+ 'timeout' => 5,
29
+ 'blocking' => true,
30
+ 'sslverify' => apply_filters('https_local_ssl_verify', false)
31
+ ),
32
+ mailchimp_get_http_local_json_header()
33
+ );
34
  }
35
 
36
  /**
 
 
37
  * @param bool $force
38
+ * @return array|mixed|object|WP_Error|null
39
+ * @throws MailChimp_WooCommerce_Error
40
+ * @throws MailChimp_WooCommerce_RateLimitError
41
+ * @throws MailChimp_WooCommerce_ServerError
42
  */
43
  public static function work($force = false)
44
  {
45
  $path = $force ? 'queue/work/force' : 'queue/work';
46
  // this is the new rest API version
47
+ return mailchimp_woocommerce_rest_api_get(
48
+ static::url($path),
49
+ array(
50
+ 'timeout' => 0.01,
51
+ 'blocking' => false,
52
+ 'sslverify' => apply_filters('https_local_ssl_verify', false),
53
+ ),
54
+ mailchimp_get_http_local_json_header()
55
+ );
56
  }
57
 
58
  /**
270
  'products_in_mailchimp' => $mailchimp_total_products,
271
  'orders_in_store' => $order_count,
272
  'orders_in_mailchimp' => $mailchimp_total_orders,
273
+ 'date' => date_i18n( __('D, M j, Y g:i A', 'mailchimp-woocommerce'), $date->getTimestamp()),
274
  'has_started' => mailchimp_has_started_syncing(),
275
  'has_finished' => mailchimp_is_done_syncing(),
276
  ));
includes/class-mailchimp-woocommerce-service.php CHANGED
@@ -480,6 +480,10 @@ class MailChimp_Service extends MailChimp_WooCommerce_Options
480
  {
481
  $cid = trim($id);
482
 
 
 
 
 
483
  @setcookie('mailchimp_campaign_id', $cid, $cookie_duration, '/' );
484
  $this->setWooSession('mailchimp_campaign_id', $cid);
485
 
480
  {
481
  $cid = trim($id);
482
 
483
+ if(!$this->api()->getCampaign($cid)) {
484
+ $cid = null;
485
+ }
486
+
487
  @setcookie('mailchimp_campaign_id', $cid, $cookie_duration, '/' );
488
  $this->setWooSession('mailchimp_campaign_id', $cid);
489
 
includes/class-mailchimp-woocommerce.php CHANGED
@@ -200,7 +200,7 @@ class MailChimp_WooCommerce
200
  private function set_locale()
201
  {
202
  $plugin_i18n = new MailChimp_WooCommerce_i18n();
203
- $this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
204
  }
205
 
206
  /**
200
  private function set_locale()
201
  {
202
  $plugin_i18n = new MailChimp_WooCommerce_i18n();
203
+ $this->loader->add_action('init', $plugin_i18n, 'load_plugin_textdomain');
204
  }
205
 
206
  /**
includes/processes/class-mailchimp-woocommerce-cart-update.php CHANGED
@@ -111,7 +111,17 @@ class MailChimp_WooCommerce_Cart_Update extends WP_Job
111
 
112
  $cart = new MailChimp_WooCommerce_Cart();
113
  $cart->setId($this->unique_id);
114
- $cart->setCampaignID($this->campaign_id);
 
 
 
 
 
 
 
 
 
 
115
  $cart->setCheckoutUrl($checkout_url);
116
  $cart->setCurrencyCode(isset($options['store_currency_code']) ? $options['store_currency_code'] : 'USD');
117
 
111
 
112
  $cart = new MailChimp_WooCommerce_Cart();
113
  $cart->setId($this->unique_id);
114
+
115
+ // if we have a campaign id let's set it now.
116
+ if (!empty($this->campaign_id)) {
117
+ try {
118
+ $cart->setCampaignID($this->campaign_id);
119
+ }
120
+ catch (\Exception $e) {
121
+ mailchimp_log('cart_set_campaign_id.error', 'No campaign added to abandoned cart, with provided ID: '. $this->campaign_id. ' :: '. $e->getMessage(). ' :: in '.$e->getFile().' :: on '.$e->getLine());
122
+ }
123
+ }
124
+
125
  $cart->setCheckoutUrl($checkout_url);
126
  $cart->setCurrencyCode(isset($options['store_currency_code']) ? $options['store_currency_code'] : 'USD');
127
 
includes/processes/class-mailchimp-woocommerce-rest-queue.php CHANGED
@@ -230,15 +230,18 @@ class MailChimp_WooCommerce_Rest_Queue
230
  }
231
 
232
  /**
233
- *
 
 
234
  */
235
  protected function again()
236
  {
237
- wp_remote_get(esc_url_raw(rest_url('mailchimp-for-woocommerce/v1/queue/work')), array(
 
238
  'timeout' => 0.01,
239
  'blocking' => false,
240
- 'cookies' => $_COOKIE,
241
- 'sslverify' => apply_filters('https_local_ssl_verify', false)
242
- ));
243
  }
244
  }
230
  }
231
 
232
  /**
233
+ * @throws MailChimp_WooCommerce_Error
234
+ * @throws MailChimp_WooCommerce_RateLimitError
235
+ * @throws MailChimp_WooCommerce_ServerError
236
  */
237
  protected function again()
238
  {
239
+ $url = esc_url_raw(rest_url('mailchimp-for-woocommerce/v1/queue/work'));
240
+ $params = array(
241
  'timeout' => 0.01,
242
  'blocking' => false,
243
+ 'sslverify' => apply_filters('https_local_ssl_verify', false),
244
+ );
245
+ mailchimp_woocommerce_rest_api_get($url, $params, mailchimp_get_http_local_json_header());
246
  }
247
  }
includes/processes/class-mailchimp-woocommerce-single-order.php CHANGED
@@ -140,8 +140,13 @@ class MailChimp_WooCommerce_Single_Order extends WP_Job
140
  if ($new_order) {
141
  // apply a campaign id if we have one.
142
  if (!empty($this->campaign_id)) {
143
- $log .= ' :: campaign id ' . $this->campaign_id;
144
- $order->setCampaignId($this->campaign_id);
 
 
 
 
 
145
  }
146
 
147
  // apply the landing site if we have one.
140
  if ($new_order) {
141
  // apply a campaign id if we have one.
142
  if (!empty($this->campaign_id)) {
143
+ try {
144
+ $order->setCampaignId($this->campaign_id);
145
+ $log .= ' :: campaign id ' . $this->campaign_id;
146
+ }
147
+ catch (\Exception $e) {
148
+ mailchimp_log('single_order_set_campaign_id.error', 'No campaign added to order, with provided ID: '. $this->campaign_id. ' :: '. $e->getMessage(). ' :: in '.$e->getFile().' :: on '.$e->getLine());
149
+ }
150
  }
151
 
152
  // apply the landing site if we have one.
includes/vendor/queue.php DELETED
@@ -1,103 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: WP Background Processing
4
- Plugin URI: https://github.com/A5hleyRich/wp-background-processing
5
- Description: Asynchronous requests and background processing in WordPress.
6
- Author: Delicious Brains Inc.
7
- Version: 1.0
8
- Author URI: https://deliciousbrains.com/
9
- */
10
-
11
- $queue_folder_path = plugin_dir_path( __FILE__ );
12
-
13
- require_once $queue_folder_path . 'queue/classes/wp-job.php';
14
- require_once $queue_folder_path . 'queue/classes/wp-queue.php';
15
- require_once $queue_folder_path . 'queue/classes/worker/wp-worker.php';
16
- require_once $queue_folder_path . 'queue/classes/worker/wp-http-worker.php';
17
-
18
- global $wp_queue;
19
- $wp_queue = new WP_Queue();
20
-
21
- // Add WP CLI commands
22
- if (defined( 'WP_CLI' ) && WP_CLI) {
23
- try {
24
- /**
25
- * Service push to MailChimp
26
- *
27
- * <type>
28
- * : product_sync order_sync order product
29
- */
30
- function mailchimp_cli_push_command( $args, $assoc_args ) {
31
- if (is_array($args) && isset($args[0])) {
32
- switch($args[0]) {
33
-
34
- case 'product_sync':
35
- mailchimp_handle_or_queue(new MailChimp_WooCommerce_Process_Products());
36
- WP_CLI::success("queued up the product sync!");
37
- break;
38
-
39
- case 'order_sync':
40
- mailchimp_handle_or_queue(new MailChimp_WooCommerce_Process_Orders());
41
- WP_CLI::success("queued up the order sync!");
42
- break;
43
-
44
- case 'order':
45
- if (!isset($args[1])) {
46
- wp_die('You must specify an order id as the 2nd parameter.');
47
- }
48
- mailchimp_handle_or_queue(new MailChimp_WooCommerce_Single_Order($args[1]));
49
- WP_CLI::success("queued up the order {$args[1]}!");
50
- break;
51
-
52
- case 'product':
53
- if (!isset($args[1])) {
54
- wp_die('You must specify a product id as the 2nd parameter.');
55
- }
56
- mailchimp_handle_or_queue(new MailChimp_WooCommerce_Single_Product($args[1]));
57
- WP_CLI::success("queued up the product {$args[1]}!");
58
- break;
59
- }
60
- }
61
- };
62
-
63
- WP_CLI::add_command( 'mailchimp_push', 'mailchimp_cli_push_command');
64
-
65
- require_once $queue_folder_path . 'queue/classes/cli/queue-command.php';
66
- WP_CLI::add_command( 'queue', 'Queue_Command' );
67
- } catch (\Exception $e) {}
68
- }
69
-
70
- if (!mailchimp_running_in_console() && mailchimp_is_configured()) {
71
- // fire up the http worker container
72
- new WP_Http_Worker($wp_queue);
73
- }
74
-
75
- // if we're not running in the console, and the http_worker is not running
76
- if (mailchimp_should_init_queue()) {
77
- try {
78
- // if we do not have a site transient for the queue listener
79
- if (!get_site_transient('http_worker_queue_listen')) {
80
- // set the site transient to expire in 50 seconds so this will not happen too many times
81
- // but still work for cron scripts on the minute mark.
82
- set_site_transient( 'http_worker_queue_listen', microtime(), 50);
83
- // if we have available jobs, call the http worker manually
84
- if ($wp_queue->available_jobs()) {
85
- mailchimp_call_http_worker_manually();
86
- }
87
- }
88
- } catch (\Exception $e) {}
89
- }
90
-
91
- if (!function_exists( 'wp_queue')) {
92
- /**
93
- * WP queue.
94
- *
95
- * @param WP_Job $job
96
- * @param int $delay
97
- */
98
- function wp_queue( WP_Job $job, $delay = 0 ) {
99
- global $wp_queue;
100
- $wp_queue->push( $job, $delay );
101
- do_action( 'wp_queue_job_pushed', $job );
102
- }
103
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/mailchimp-woocommerce-pt_BR.mo ADDED
Binary file
languages/mailchimp-woocommerce-pt_BR.po ADDED
@@ -0,0 +1,764 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mc-woocommerce-"
5
+ "pedro\n"
6
+ "POT-Creation-Date: 2019-05-02T19:05:35+00:00\n"
7
+ "PO-Revision-Date: 2019-05-02 21:07+0200\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: \n"
10
+ "Language: pt_BR\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Generator: Poedit 2.0.7\n"
15
+ "X-Poedit-Basepath: .\n"
16
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
17
+
18
+ #. Plugin Name of the plugin
19
+ msgid "Mailchimp for WooCommerce"
20
+ msgstr "Mailchimp para Woocommerce"
21
+
22
+ #. Description of the plugin
23
+ msgid ""
24
+ "Connects WooCommerce to Mailchimp to sync your store data, send targeted "
25
+ "campaigns to your customers, and sell more stuff."
26
+ msgstr ""
27
+ "Conecta o Woocommerce ao Mailchimp para sincronizar sua Loja, enviar "
28
+ "campanhas segmentadas para seus clientes, e vender mais."
29
+
30
+ #. Author of the plugin
31
+ msgid "Mailchimp"
32
+ msgstr "Mailchimp"
33
+
34
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:179
35
+ msgid "Please select an option"
36
+ msgstr "Por favor selecione uma opção"
37
+
38
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:182
39
+ msgid "Sending Feedback"
40
+ msgstr "Enviando Feedback"
41
+
42
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:327
43
+ msgid "I want to change the audience associated with this integration."
44
+ msgstr "Gostaria de trocar a audiência associada a esta integração."
45
+
46
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:331
47
+ msgid "I want to change the site or store connected through this integration."
48
+ msgstr "Gostaria de trocar o Site ou Loja conectado a esta integração."
49
+
50
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:335
51
+ msgid "The order data isn't syncing."
52
+ msgstr "Os dados de Pedidos não estão sincronizando."
53
+
54
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:339
55
+ msgid "The promo codes aren't showing up."
56
+ msgstr "Os Cupons não estão sincronizando."
57
+
58
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:343
59
+ msgid "I'm trying to troubleshoot the integration."
60
+ msgstr "Estou tentando resolver um problema com a integração."
61
+
62
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:347
63
+ msgid "I was instructed to disconnect by Mailchimp Support."
64
+ msgstr "Fui instruído pelo suporte do Mailchimp a desconectar."
65
+
66
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:351
67
+ msgid "I no longer use this integration."
68
+ msgstr "Não utilizo mais esta integração."
69
+
70
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:355
71
+ msgid "It's a temporary deactivation."
72
+ msgstr "É uma desativação temporária."
73
+
74
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:359
75
+ msgid "Other"
76
+ msgstr "Outros"
77
+
78
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:361
79
+ msgid "Please share the reason"
80
+ msgstr "Por favor, compartilhe o motivo"
81
+
82
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:370
83
+ msgid "Quick Feedback"
84
+ msgstr "Feedback rápido"
85
+
86
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:371
87
+ msgid "Close"
88
+ msgstr "Fechar"
89
+
90
+ #. translators: %s - plugin name.
91
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:378
92
+ msgid "If you have a moment, please share why you are deactivating %s:"
93
+ msgstr ""
94
+ "Se você tiver um momento, por favor nos diga porque você está desativando %s:"
95
+
96
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:379
97
+ msgid "Mailchimp for Woocommerce"
98
+ msgstr "Mailchimp para Woocommerce"
99
+
100
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:398
101
+ msgid "Submit & Deactivate"
102
+ msgstr "Enviar e Desativar"
103
+
104
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:399
105
+ msgid "Skip & Deactivate"
106
+ msgstr "Pular e Desativar"
107
+
108
+ #. translators: %s - Mailchimp Privacy Policy URL.
109
+ #: includes/class-mailchimp-woocommerce-privacy.php:12
110
+ msgid ""
111
+ "When shopping, we keep a record of your email and the cart contents for up "
112
+ "to 30 days on our server. This record is kept to repopulate the contents of "
113
+ "your cart if you switch devices or needed to come back another day. Read our "
114
+ "privacy policy <a href=\"%s\">here</a>."
115
+ msgstr ""
116
+ "Quando em compras, nós mantemos seu email e o conteúdo do carrinho de "
117
+ "compras por até 30 dias em nossos servidores. Este registro é armazenado "
118
+ "para popular o conteúdo do seu carrinho de compras se você trocar de "
119
+ "dispositivo ou precisa voltar em um outro dia. Leia nossa Política de "
120
+ "Privacidade <a href=“%s”>aqui</a>."
121
+
122
+ #: includes/class-mailchimp-woocommerce-privacy.php:27
123
+ #: includes/class-mailchimp-woocommerce-privacy.php:40
124
+ msgid "MailChimp for WooCommerce"
125
+ msgstr "Mailchimp para Woocommerce"
126
+
127
+ #: includes/class-mailchimp-woocommerce-privacy.php:65
128
+ msgid "Email Address"
129
+ msgstr "Email"
130
+
131
+ #: includes/class-mailchimp-woocommerce-privacy.php:78
132
+ msgid "MailChimp Shopping Cart Data"
133
+ msgstr "Dados de carrinho de compras do Mailchimp"
134
+
135
+ #: includes/class-mailchimp-woocommerce-privacy.php:82
136
+ msgid "User ID"
137
+ msgstr "ID do Usuário"
138
+
139
+ #: includes/class-mailchimp-woocommerce-newsletter.php:43
140
+ #: admin/class-mailchimp-woocommerce-admin.php:507
141
+ #: admin/partials/tabs/newsletter_settings.php:94
142
+ msgid "Subscribe to our newsletter"
143
+ msgstr "Inscreva-se em nossa newsletter"
144
+
145
+ #: includes/class-mailchimp-woocommerce-rest-api.php:273
146
+ #: admin/partials/tabs/store_sync.php:61
147
+ msgid "D, M j, Y g:i A"
148
+ msgstr "l, d\\/m\\/Y H:i"
149
+
150
+ #: admin/class-mailchimp-woocommerce-admin.php:78
151
+ msgid "Mailchimp - WooCommerce Setup"
152
+ msgstr "Mailchimp para Woocommerce"
153
+
154
+ #: admin/class-mailchimp-woocommerce-admin.php:117
155
+ msgid "Settings"
156
+ msgstr "Configurações"
157
+
158
+ #: admin/class-mailchimp-woocommerce-admin.php:427
159
+ msgid ""
160
+ "As part of the Mailchimp Terms of Use, we require a contact email and a "
161
+ "physical mailing address."
162
+ msgstr ""
163
+ "Como parte dos Termos de Uso do Mailchimp, são mandatórios um email de "
164
+ "contato e um endereço físico de correspondência."
165
+
166
+ #: admin/class-mailchimp-woocommerce-admin.php:435
167
+ msgid ""
168
+ "As part of the Mailchimp Terms of Use, we require a valid phone number for "
169
+ "your store."
170
+ msgstr ""
171
+ "Como parte dos Termos de Uso do Mailchimp, é mandatório um número de "
172
+ "telefone válido para sua Loja."
173
+
174
+ #: admin/class-mailchimp-woocommerce-admin.php:443
175
+ msgid "Mailchimp for WooCommerce requires a Store Name to connect your store."
176
+ msgstr ""
177
+ "Mailchimp para Woocommerce requer um Nome de Loja para conectar sua Loja."
178
+
179
+ #. translators: %s - plugin name.
180
+ #: admin/class-mailchimp-woocommerce-admin.php:461
181
+ #: admin/partials/tabs/campaign_defaults.php:95
182
+ msgid "You were subscribed to the newsletter from %s"
183
+ msgstr "Você foi inscrito na newsletter de %s"
184
+
185
+ #: admin/class-mailchimp-woocommerce-admin.php:616
186
+ msgid "You must supply your Mailchimp API key to pull the audiences."
187
+ msgstr ""
188
+ "É necessário fornecer a sua Mailchimp API Key para recuperar as audiências."
189
+
190
+ #: admin/class-mailchimp-woocommerce-admin.php:1003
191
+ msgid "Starting the sync process..."
192
+ msgstr "Iniciando a Sincronização…"
193
+
194
+ #: admin/class-mailchimp-woocommerce-admin.php:1005
195
+ msgid "Please hang tight while we work our mojo."
196
+ msgstr "Por favor aguarde."
197
+
198
+ #: admin/class-mailchimp-woocommerce-admin.php:1007
199
+ msgid ""
200
+ "Sometimes the sync can take a while, especially on sites with lots of orders "
201
+ "and/or products."
202
+ msgstr ""
203
+ "Em alguns casos a sincronização pode levar algum tempo, especialmente em "
204
+ "sites com muitos pedidos e/ou produtos."
205
+
206
+ #: admin/partials/tabs/newsletter_settings.php:35
207
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:112
208
+ msgid "Audience Settings"
209
+ msgstr "Configurações de Audiência"
210
+
211
+ #: admin/partials/tabs/newsletter_settings.php:36
212
+ msgid ""
213
+ "Please apply your audience settings. If you don't have an audience, you can "
214
+ "choose to create one."
215
+ msgstr ""
216
+ "Configure sua Audiência. Se você não tem nenhuma audiência, você pode "
217
+ "escolher criar uma."
218
+
219
+ #: admin/partials/tabs/newsletter_settings.php:40
220
+ msgid "Audience Name"
221
+ msgstr "Nome da Audiência"
222
+
223
+ #: admin/partials/tabs/newsletter_settings.php:46
224
+ msgid "Create New Audience"
225
+ msgstr "Criar nova Audiência"
226
+
227
+ #: admin/partials/tabs/newsletter_settings.php:50
228
+ msgid "Select Audience"
229
+ msgstr "Selecione a Audiência"
230
+
231
+ #: admin/partials/tabs/newsletter_settings.php:62
232
+ msgid "Choose an audience to sync with your store."
233
+ msgstr "Escolha uma Audiência para sincronizar com a sua Loja."
234
+
235
+ #: admin/partials/tabs/newsletter_settings.php:68
236
+ msgid "Auto Subscribe On Initial Sync"
237
+ msgstr "Inscrição automática na Sincronização inicial"
238
+
239
+ #: admin/partials/tabs/newsletter_settings.php:76
240
+ msgid "No"
241
+ msgstr "Não"
242
+
243
+ #: admin/partials/tabs/newsletter_settings.php:76
244
+ msgid "Yes"
245
+ msgstr "Sim"
246
+
247
+ #: admin/partials/tabs/newsletter_settings.php:82
248
+ msgid "During initial sync, auto subscribe the existing customers."
249
+ msgstr ""
250
+ "Durante a sincronização inicial, inscreva automaticamente os clientes "
251
+ "existentes."
252
+
253
+ #: admin/partials/tabs/newsletter_settings.php:86
254
+ msgid "Opt-in Settings"
255
+ msgstr "Configurações de inscrição"
256
+
257
+ #: admin/partials/tabs/newsletter_settings.php:87
258
+ msgid ""
259
+ "Add text to go along with the opt-in checkbox, and choose a default display "
260
+ "option. Customers can click a box at checkout to opt in to your newsletter. "
261
+ "Write a signup message and choose how you want this checkbox to appear."
262
+ msgstr ""
263
+ "Adicione um texto para exibir próximo à caixa de seleção de inscrição, e "
264
+ "escolha um modo de visualização padrão. Usuários podem clicar em uma caixa "
265
+ "de seleção na etapa de pagamento para se inscrever em sua newsletter. "
266
+ "Escreva uma mensagem de inscrição e escolha como você quer a exibição da "
267
+ "caixa de seleção."
268
+
269
+ #: admin/partials/tabs/newsletter_settings.php:91
270
+ msgid "Newsletter Label"
271
+ msgstr "Texto da Newsletter"
272
+
273
+ #: admin/partials/tabs/newsletter_settings.php:95
274
+ msgid "Enter text for the opt-in checkbox"
275
+ msgstr "Insira o texto para a caixa de seleção de inclusão"
276
+
277
+ #: admin/partials/tabs/newsletter_settings.php:97
278
+ msgid "HTML tags allowed: <a href=\"\" target=\"\" title=\"\"></a> and <br>"
279
+ msgstr "Tags HTML permitidas: <a href=“” target=“” title=“”></a> e <br>"
280
+
281
+ #: admin/partials/tabs/newsletter_settings.php:100
282
+ #: admin/partials/tabs/newsletter_settings.php:104
283
+ msgid "Checkbox Display Options"
284
+ msgstr "Opções de exibição da caixa de seleção"
285
+
286
+ #: admin/partials/tabs/newsletter_settings.php:108
287
+ msgid "Visible, checked by default"
288
+ msgstr "Visível, ativada por padrão"
289
+
290
+ #: admin/partials/tabs/newsletter_settings.php:112
291
+ msgid "Visible, unchecked by default"
292
+ msgstr "Visível, desativada por padrão"
293
+
294
+ #: admin/partials/tabs/newsletter_settings.php:116
295
+ msgid "Hidden, unchecked by default"
296
+ msgstr "Escondida, desativada por padrão"
297
+
298
+ #: admin/partials/tabs/newsletter_settings.php:120
299
+ msgid "Advanced Checkbox Settings"
300
+ msgstr "Configurações avançadas para a caixa de seleção"
301
+
302
+ #. translators: %s - Woocommerce Actions documentation URL.
303
+ #: admin/partials/tabs/newsletter_settings.php:121
304
+ msgid ""
305
+ "To change the location of the opt-in checkbox at checkout, input one of the "
306
+ "<a href=%s target=_blank>available WooCommerce form actions.</a>."
307
+ msgstr ""
308
+ "Para alterar a localização da caixa de seleção de inscrição na etapa de "
309
+ "pagamento, insira uma das <a href=%s target=_blank>Actions de formulário do "
310
+ "WooCommerce .</a>."
311
+
312
+ #: admin/partials/tabs/newsletter_settings.php:125
313
+ msgid "Newsletter Checkbox Action"
314
+ msgstr "Action para a caixa de seleção de inscrição"
315
+
316
+ #: admin/partials/tabs/newsletter_settings.php:129
317
+ msgid "Enter a WooCommerce form action"
318
+ msgstr "Insira uma action de formulário do Woocommerce"
319
+
320
+ #: admin/partials/tabs/newsletter_settings.php:133
321
+ #: admin/partials/tabs/newsletter_settings.php:138
322
+ msgid "Audience Member Tags"
323
+ msgstr "Etiquetas para Membros de Audiência"
324
+
325
+ #: admin/partials/tabs/newsletter_settings.php:134
326
+ msgid "Add a comma separated list of tags to add to the user at Mailchimp"
327
+ msgstr ""
328
+ "Adicione uma lista de etiquetas separadas por vírgulas para adicionar ao "
329
+ "usuário no Mailchimp"
330
+
331
+ #: admin/partials/tabs/newsletter_settings.php:145
332
+ #: admin/partials/tabs/newsletter_settings.php:150
333
+ msgid "Product Image Size"
334
+ msgstr "Tamanho da imagem de Produto"
335
+
336
+ #: admin/partials/tabs/newsletter_settings.php:146
337
+ msgid ""
338
+ "Define the product image size used by abandoned carts, order notifications, "
339
+ "and product recommendations."
340
+ msgstr ""
341
+ "Defina o tamanho das imagens utilizado em carrinhos de compra abandonados, "
342
+ "outras notificações, e recomendações de produtos."
343
+
344
+ #: admin/partials/tabs/newsletter_settings.php:161
345
+ msgid "Select an image size"
346
+ msgstr "Selecione um tamanho de imagem"
347
+
348
+ #: admin/partials/tabs/logs.php:35 admin/partials/tabs/logs.php:45
349
+ msgid "Logging Preference"
350
+ msgstr "Preferências de Log"
351
+
352
+ #: admin/partials/tabs/logs.php:37
353
+ msgid ""
354
+ "Advanced troubleshooting can be conducted with the logging capability turned "
355
+ "on.\n"
356
+ "By default, it’s set to “none” and you may toggle to either “standard” or "
357
+ "“debug” as needed.\n"
358
+ "With standard logging, you can see basic information about the data "
359
+ "submission to Mailchimp including any errors.\n"
360
+ "“Debug” gives a much deeper insight that is useful to share with support if "
361
+ "problems arise."
362
+ msgstr ""
363
+ "A resolução de problemas pode ser realizada com os Logs ativados.\n"
364
+ "Por padrão, está configurado para “nenhum” e pode ser trocado para “padrão” "
365
+ "ou “debug” de acordo com sua necessidade.\n"
366
+ "Com o Log padrão, são registradas informações básicas sobre o envio de dados "
367
+ "para o Mailchimp incluindo os erros.\n"
368
+ "A opção “Debug” exibe informações mais aprofundadas e é útil para "
369
+ "compartilhar com o suporte se surgirem problemas."
370
+
371
+ #: admin/partials/tabs/logs.php:51
372
+ msgid "None"
373
+ msgstr "Nenhum"
374
+
375
+ #: admin/partials/tabs/logs.php:51
376
+ msgid "Debug"
377
+ msgstr "Debug"
378
+
379
+ #: admin/partials/tabs/logs.php:51
380
+ msgid "Standard"
381
+ msgstr "Padrão"
382
+
383
+ #: admin/partials/tabs/logs.php:59
384
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:160
385
+ msgid "Save all changes"
386
+ msgstr "Salvar todas alterações"
387
+
388
+ #: admin/partials/tabs/logs.php:67
389
+ msgid "Delete log"
390
+ msgstr "Apagar Log"
391
+
392
+ #: admin/partials/tabs/logs.php:79
393
+ msgid "View"
394
+ msgstr "Ver"
395
+
396
+ #: admin/partials/tabs/logs.php:88
397
+ msgid "There are currently no logs to view."
398
+ msgstr "Não há nenhum Log para ser visualizado."
399
+
400
+ #: admin/partials/tabs/notices.php:6
401
+ msgid "Mailchimp says: You must enter in a valid API key."
402
+ msgstr "Maichimp diz: Insira uma API Key válida."
403
+
404
+ #: admin/partials/tabs/notices.php:9
405
+ msgid ""
406
+ "Mailchimp says: Sorry you must set up your campaign defaults before you "
407
+ "proceed!"
408
+ msgstr ""
409
+ "Maichimp diz: É necessário configurar os Padrões de Lista antes de continuar!"
410
+
411
+ #: admin/partials/tabs/notices.php:12
412
+ msgid "Mailchimp says: You must select a marketing audience."
413
+ msgstr "Maichimp diz: É Necessário selecionar uma Audiência."
414
+
415
+ #: admin/partials/tabs/notices.php:15
416
+ msgid "Mailchimp says: Sorry you must set up your store before you proceed!"
417
+ msgstr "Maichimp diz: É necessário configurar sua Loja antes de continuar!"
418
+
419
+ #: admin/partials/tabs/notices.php:18
420
+ msgid ""
421
+ "Mailchimp says: You are not fully ready to run the Store Sync, please verify "
422
+ "your settings before proceeding."
423
+ msgstr ""
424
+ "Maichimp diz: Ainda não está tudo pronto para iniciar a sincronização de sua "
425
+ "Loja, verifique as configurações antes de continuar."
426
+
427
+ #: admin/partials/tabs/notices.php:32
428
+ msgid "Mailchimp says: Your re-sync has been started!"
429
+ msgstr "Maichimp diz: A ressincronização foi iniciada!"
430
+
431
+ #: admin/partials/tabs/campaign_defaults.php:16
432
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:109
433
+ msgid "Audience Defaults"
434
+ msgstr "Padrões de Audiência"
435
+
436
+ #: admin/partials/tabs/campaign_defaults.php:17
437
+ msgid "Please fill out the default campaign information."
438
+ msgstr "Por favor preencha as informações padrão da Lista."
439
+
440
+ #: admin/partials/tabs/campaign_defaults.php:21
441
+ msgid "Contact Name"
442
+ msgstr "Nome de contato"
443
+
444
+ #: admin/partials/tabs/campaign_defaults.php:26
445
+ msgid "Default from name"
446
+ msgstr "Nome padrão do Remetente"
447
+
448
+ #: admin/partials/tabs/campaign_defaults.php:36
449
+ msgid "From Email"
450
+ msgstr "Email do Remetente"
451
+
452
+ #: admin/partials/tabs/campaign_defaults.php:41
453
+ msgid "Default from email"
454
+ msgstr "Email padrão do Remetente"
455
+
456
+ #: admin/partials/tabs/campaign_defaults.php:51
457
+ #: admin/partials/tabs/campaign_defaults.php:56
458
+ msgid "Default subject"
459
+ msgstr "Assunto padrão"
460
+
461
+ #: admin/partials/tabs/campaign_defaults.php:66
462
+ #: admin/partials/tabs/campaign_defaults.php:78
463
+ msgid "Default language"
464
+ msgstr "Lingua padrão"
465
+
466
+ #: admin/partials/tabs/campaign_defaults.php:88
467
+ msgid "Permission Reminder"
468
+ msgstr "Mensagem de lembrete de inclusão"
469
+
470
+ #: admin/partials/tabs/campaign_defaults.php:97
471
+ msgid "Permission reminder message"
472
+ msgstr "Mensagem de lembrete"
473
+
474
+ #: admin/partials/tabs/store_sync.php:54
475
+ msgid "Sync Information"
476
+ msgstr "Informações de sincronização"
477
+
478
+ #: admin/partials/tabs/store_sync.php:57
479
+ msgid "Initial Sync:"
480
+ msgstr "Sincronização inicial:"
481
+
482
+ #: admin/partials/tabs/store_sync.php:57
483
+ msgid "In Progress"
484
+ msgstr "Em progresso"
485
+
486
+ #: admin/partials/tabs/store_sync.php:61
487
+ msgid "Last Updated:"
488
+ msgstr "Última atualização:"
489
+
490
+ #: admin/partials/tabs/store_sync.php:64
491
+ msgid "Account Connected:"
492
+ msgstr "Conta conectada:"
493
+
494
+ #: admin/partials/tabs/store_sync.php:65
495
+ msgid "Audience Connected:"
496
+ msgstr "Audiência conectada:"
497
+
498
+ #: admin/partials/tabs/store_sync.php:66
499
+ msgid "Products Synced:"
500
+ msgstr "Produtos sincronizados:"
501
+
502
+ #: admin/partials/tabs/store_sync.php:67
503
+ msgid "Orders Synced:"
504
+ msgstr "Pedidos sincronizados:"
505
+
506
+ #: admin/partials/tabs/store_sync.php:70
507
+ msgid "Advanced"
508
+ msgstr "Avançado"
509
+
510
+ #: admin/partials/tabs/store_sync.php:72
511
+ msgid ""
512
+ "You can resync your audience at any time without losing any of your e-"
513
+ "commerce data."
514
+ msgstr ""
515
+ "Você pode ressincronizar sua Audiência a qualquer momento, sem perder nenhum "
516
+ "de seus dados."
517
+
518
+ #: admin/partials/tabs/store_sync.php:74
519
+ msgid "Resync"
520
+ msgstr "Ressincronizar"
521
+
522
+ #: admin/partials/tabs/api_key.php:3
523
+ msgid "API Information"
524
+ msgstr "Informações da API"
525
+
526
+ #: admin/partials/tabs/api_key.php:4
527
+ msgid ""
528
+ "To find your Mailchimp API key, log into your account settings > Extras > "
529
+ "API keys. From there, either grab an existing key or generate a new one for "
530
+ "your WooCommerce store."
531
+ msgstr ""
532
+ "Para localizar sua Mailchimp API key, entre em sua conta no Mailchimp, abra "
533
+ "“Account Settings > Extras > API Keys”. Copie a chave existente, ou crie uma "
534
+ "nova para sua Loja Woocommerce."
535
+
536
+ #: admin/partials/tabs/api_key.php:9
537
+ msgid "Mailchimp API Key"
538
+ msgstr "Insira sua API Key do Mailchimp"
539
+
540
+ #: admin/partials/tabs/api_key.php:13
541
+ msgid "Enter your Mailchimp API key."
542
+ msgstr "Insira sua API Key do Mailchimp."
543
+
544
+ #: admin/partials/tabs/store_info.php:13
545
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:106
546
+ msgid "Store Settings"
547
+ msgstr "Configurações de Loja"
548
+
549
+ #: admin/partials/tabs/store_info.php:14
550
+ msgid "Please provide the following information about your WooCommerce store."
551
+ msgstr "Insira as informações relativas à sua loja WooCommerce."
552
+
553
+ #: admin/partials/tabs/store_info.php:18
554
+ msgid "Store Name"
555
+ msgstr "Nome da Loja"
556
+
557
+ #: admin/partials/tabs/store_info.php:25 admin/partials/tabs/store_info.php:27
558
+ msgid "Name"
559
+ msgstr "Nome"
560
+
561
+ #: admin/partials/tabs/store_info.php:36 admin/partials/tabs/store_info.php:43
562
+ #: admin/partials/tabs/store_info.php:45
563
+ msgid "Email"
564
+ msgstr "Email"
565
+
566
+ #: admin/partials/tabs/store_info.php:54
567
+ msgid "Street Address"
568
+ msgstr "Endereço"
569
+
570
+ #: admin/partials/tabs/store_info.php:61 admin/partials/tabs/store_info.php:63
571
+ msgid "Street address"
572
+ msgstr "Endereço"
573
+
574
+ #: admin/partials/tabs/store_info.php:72 admin/partials/tabs/store_info.php:79
575
+ #: admin/partials/tabs/store_info.php:81
576
+ msgid "City"
577
+ msgstr "Cidade"
578
+
579
+ #: admin/partials/tabs/store_info.php:90 admin/partials/tabs/store_info.php:97
580
+ #: admin/partials/tabs/store_info.php:99
581
+ msgid "State"
582
+ msgstr "Estado"
583
+
584
+ #: admin/partials/tabs/store_info.php:108
585
+ #: admin/partials/tabs/store_info.php:115
586
+ #: admin/partials/tabs/store_info.php:117
587
+ msgid "Postal Code"
588
+ msgstr "CEP"
589
+
590
+ #: admin/partials/tabs/store_info.php:126
591
+ #: admin/partials/tabs/store_info.php:133
592
+ #: admin/partials/tabs/store_info.php:135
593
+ msgid "Country"
594
+ msgstr "País"
595
+
596
+ #: admin/partials/tabs/store_info.php:144
597
+ #: admin/partials/tabs/store_info.php:151
598
+ #: admin/partials/tabs/store_info.php:153
599
+ msgid "Phone Number"
600
+ msgstr "Telefone"
601
+
602
+ #: admin/partials/tabs/store_info.php:160
603
+ msgid "Locale Settings"
604
+ msgstr "Configurações de Local"
605
+
606
+ #: admin/partials/tabs/store_info.php:162
607
+ msgid ""
608
+ "Please apply your locale settings. If you're unsure about these, use the "
609
+ "defaults."
610
+ msgstr ""
611
+ "Configure seu local. Se estive inseguro com estas informações, deixe o "
612
+ "padrão."
613
+
614
+ #: admin/partials/tabs/store_info.php:166
615
+ #: admin/partials/tabs/store_info.php:177
616
+ msgid "Locale"
617
+ msgstr "Língua"
618
+
619
+ #: admin/partials/tabs/store_info.php:183
620
+ msgid "Currency Code"
621
+ msgstr "Código da Moeda"
622
+
623
+ #: admin/partials/tabs/store_info.php:186
624
+ msgid "Currency is currently deprecated. Please select one from the list above"
625
+ msgstr "Moeda obsoleta. Selecione uma da lista acima"
626
+
627
+ #: admin/partials/tabs/store_info.php:192
628
+ msgid "deprecated"
629
+ msgstr "obsoleta"
630
+
631
+ #: admin/partials/tabs/store_info.php:199
632
+ msgid "Currency"
633
+ msgstr "Moeda"
634
+
635
+ #: admin/partials/tabs/store_info.php:205
636
+ #: admin/partials/tabs/store_info.php:216
637
+ msgid "Timezone"
638
+ msgstr "Fuso Horário"
639
+
640
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:86
641
+ msgid "Mailchimp says: Please upgrade your PHP version to a minimum of 7.0"
642
+ msgstr "Mailchimp diz: Atualize a versão do PHP para no mínimo 7.0"
643
+
644
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:92
645
+ msgid "Mailchimp says: API Request Error - "
646
+ msgstr "Mailchimp diz: API Request Error - "
647
+
648
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:101
649
+ msgid "Mailchimp for Woocommerce Settings"
650
+ msgstr "Mailchimp para Woocommerce - Configurações"
651
+
652
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:104
653
+ msgid "Connect"
654
+ msgstr "Conectar"
655
+
656
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:115
657
+ msgid "Sync"
658
+ msgstr "Sincronização"
659
+
660
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:116
661
+ msgid "Logs"
662
+ msgstr "Logs"
663
+
664
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:165
665
+ msgid "More Information"
666
+ msgstr "Mais informações"
667
+
668
+ #. translators: %s - WP-CLI URL.
669
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:167
670
+ msgid ""
671
+ "Have a larger store or having issues syncing? Consider using <a href=%s "
672
+ "target=_blank>WP-CLI</a>."
673
+ msgstr ""
674
+ "Tem uma loja muito grande, ou está encontrando problemas ao sincronizar? "
675
+ "Considere usar o <a href=%s target=_blank>WP-CLI</a>."
676
+
677
+ #. translators: %s - WP-CLI URL.
678
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:168
679
+ msgid ""
680
+ "Order and customer information will not sync if they contain an Amazon or "
681
+ "generic email address."
682
+ msgstr ""
683
+ "Dados de Pedidos e Clientes não serão sincronizados se eles conterem um "
684
+ "email genérico ou da Amazon."
685
+
686
+ #. translators: %s - Mailchimp Support URL.
687
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:169
688
+ msgid ""
689
+ "Need help to connect your store? Visit the Mailchimp <a href=%s "
690
+ "target=_blank>Knowledge Base</a>."
691
+ msgstr ""
692
+ "Precisa de ajuda para conectar sua Loja? Visite a <a href=%s "
693
+ "target=_blank>Base de Conhecimento do Mailchimp</a>."
694
+
695
+ #. translators: %s - Plugin review URL.
696
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:170
697
+ msgid ""
698
+ "Want to tell us how we're doing? <a href=%s target=_blank>Leave a review on "
699
+ "Wordpress.org</a>."
700
+ msgstr ""
701
+ "Quer nos contar o que você acha deste plugin? <a href=%s target=_blank>Deixe "
702
+ "uma classificação no Wordpress.org</a>."
703
+
704
+ #. translators: %s - Mailchimp Privacy Policy URL.
705
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:171
706
+ msgid ""
707
+ "By using this plugin, Mailchimp will process customer information in "
708
+ "accordance with their <a href=%s target=_blank>Privacy Policy</a>."
709
+ msgstr ""
710
+ "Ao utilizar este plugin, o Mailchimp irá processar as informações de "
711
+ "clientes de acordo com sua <a href=%s target=_blank>Política de Privacidade</"
712
+ "a>."
713
+
714
+ #: bootstrap.php:499
715
+ msgid ""
716
+ "The MailChimp For WooCommerce plugin requires the <a href=\"http://wordpress."
717
+ "org/extend/plugins/woocommerce/\">WooCommerce</a> plugin to be active!"
718
+ msgstr ""
719
+ "O plugin Mailchimp para Woocommerce requer que o plugin <a href=“http://"
720
+ "wordpress.org/extend/plugins/woocommerce/“>WooCommerce</a> esteja ativo!"
721
+
722
+ #: bootstrap.php:896
723
+ msgid "function \"wp_remote_post\" does not exist"
724
+ msgstr "a funcão “wp_remote_post” não existe"
725
+
726
+ #: bootstrap.php:910
727
+ msgid ""
728
+ "The REST API seems to be disabled on this wordpress site. Please enable to "
729
+ "sync data."
730
+ msgstr ""
731
+ "A REST API aparenta ester desabilitada nest site WordPress. For favor, "
732
+ "habilite para sincronizar dados."
733
+
734
+ #~ msgid "User Tags"
735
+ #~ msgstr "Etiquetas de Usuário"
736
+
737
+ #~ msgid "List Settings"
738
+ #~ msgstr "Configurações de Lista"
739
+
740
+ #~ msgid "List Name"
741
+ #~ msgstr "Nome da Lista"
742
+
743
+ #, fuzzy
744
+ #~| msgid "List Defaults"
745
+ #~ msgid "List Defaults"
746
+ #~ msgstr "Padrões de Lista"
747
+
748
+ #~ msgid "List Connected:"
749
+ #~ msgstr "Lista conectada:"
750
+
751
+ #~ msgid "Phone"
752
+ #~ msgstr "Telefone"
753
+
754
+ #~ msgid "Default Subject"
755
+ #~ msgstr "Assunto padrão"
756
+
757
+ #~ msgid "Default Language"
758
+ #~ msgstr "Lingua padrão"
759
+
760
+ #~ msgid "Mailchimp Settings"
761
+ #~ msgstr "Configurações Mailchimp para Woocommerce"
762
+
763
+ #~ msgid "Every %d Minutes"
764
+ #~ msgstr "Cada %d minutos"
languages/mailchimp-woocommerce.pot CHANGED
@@ -0,0 +1,623 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2019 Mailchimp
2
+ # This file is distributed under the same license as the Mailchimp for WooCommerce plugin.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Mailchimp for WooCommerce 2.1.16\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mc-woocommerce-pedro\n"
7
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
+ "Language-Team: LANGUAGE <LL@li.org>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2019-05-02T19:05:35+00:00\n"
13
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
+ "X-Generator: WP-CLI 2.1.0\n"
15
+ "Description: desc\n"
16
+
17
+ #. Plugin Name of the plugin
18
+ msgid "Mailchimp for WooCommerce"
19
+ msgstr ""
20
+
21
+ #. Description of the plugin
22
+ msgid "Connects WooCommerce to Mailchimp to sync your store data, send targeted campaigns to your customers, and sell more stuff."
23
+ msgstr ""
24
+
25
+ #. Author of the plugin
26
+ msgid "Mailchimp"
27
+ msgstr ""
28
+
29
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:179
30
+ msgid "Please select an option"
31
+ msgstr ""
32
+
33
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:182
34
+ msgid "Sending Feedback"
35
+ msgstr ""
36
+
37
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:327
38
+ msgid "I want to change the audience associated with this integration."
39
+ msgstr ""
40
+
41
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:331
42
+ msgid "I want to change the site or store connected through this integration."
43
+ msgstr ""
44
+
45
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:335
46
+ msgid "The order data isn't syncing."
47
+ msgstr ""
48
+
49
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:339
50
+ msgid "The promo codes aren't showing up."
51
+ msgstr ""
52
+
53
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:343
54
+ msgid "I'm trying to troubleshoot the integration."
55
+ msgstr ""
56
+
57
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:347
58
+ msgid "I was instructed to disconnect by Mailchimp Support."
59
+ msgstr ""
60
+
61
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:351
62
+ msgid "I no longer use this integration."
63
+ msgstr ""
64
+
65
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:355
66
+ msgid "It's a temporary deactivation."
67
+ msgstr ""
68
+
69
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:359
70
+ msgid "Other"
71
+ msgstr ""
72
+
73
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:361
74
+ msgid "Please share the reason"
75
+ msgstr ""
76
+
77
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:370
78
+ msgid "Quick Feedback"
79
+ msgstr ""
80
+
81
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:371
82
+ msgid "Close"
83
+ msgstr ""
84
+
85
+ #. translators: %s - plugin name.
86
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:378
87
+ msgid "If you have a moment, please share why you are deactivating %s:"
88
+ msgstr ""
89
+
90
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:379
91
+ msgid "Mailchimp for Woocommerce"
92
+ msgstr ""
93
+
94
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:398
95
+ msgid "Submit & Deactivate"
96
+ msgstr ""
97
+
98
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:399
99
+ msgid "Skip & Deactivate"
100
+ msgstr ""
101
+
102
+ #. translators: %s - Mailchimp Privacy Policy URL.
103
+ #: includes/class-mailchimp-woocommerce-privacy.php:12
104
+ msgid "When shopping, we keep a record of your email and the cart contents for up to 30 days on our server. This record is kept to repopulate the contents of your cart if you switch devices or needed to come back another day. Read our privacy policy <a href=\"%s\">here</a>."
105
+ msgstr ""
106
+
107
+ #: includes/class-mailchimp-woocommerce-privacy.php:27
108
+ #: includes/class-mailchimp-woocommerce-privacy.php:40
109
+ msgid "MailChimp for WooCommerce"
110
+ msgstr ""
111
+
112
+ #: includes/class-mailchimp-woocommerce-privacy.php:65
113
+ msgid "Email Address"
114
+ msgstr ""
115
+
116
+ #: includes/class-mailchimp-woocommerce-privacy.php:78
117
+ msgid "MailChimp Shopping Cart Data"
118
+ msgstr ""
119
+
120
+ #: includes/class-mailchimp-woocommerce-privacy.php:82
121
+ msgid "User ID"
122
+ msgstr ""
123
+
124
+ #: includes/class-mailchimp-woocommerce-newsletter.php:43
125
+ #: admin/class-mailchimp-woocommerce-admin.php:507
126
+ #: admin/partials/tabs/newsletter_settings.php:94
127
+ msgid "Subscribe to our newsletter"
128
+ msgstr ""
129
+
130
+ #: includes/class-mailchimp-woocommerce-rest-api.php:273
131
+ #: admin/partials/tabs/store_sync.php:61
132
+ msgid "D, M j, Y g:i A"
133
+ msgstr ""
134
+
135
+ #: admin/class-mailchimp-woocommerce-admin.php:78
136
+ msgid "Mailchimp - WooCommerce Setup"
137
+ msgstr ""
138
+
139
+ #: admin/class-mailchimp-woocommerce-admin.php:117
140
+ msgid "Settings"
141
+ msgstr ""
142
+
143
+ #: admin/class-mailchimp-woocommerce-admin.php:427
144
+ msgid "As part of the Mailchimp Terms of Use, we require a contact email and a physical mailing address."
145
+ msgstr ""
146
+
147
+ #: admin/class-mailchimp-woocommerce-admin.php:435
148
+ msgid "As part of the Mailchimp Terms of Use, we require a valid phone number for your store."
149
+ msgstr ""
150
+
151
+ #: admin/class-mailchimp-woocommerce-admin.php:443
152
+ msgid "Mailchimp for WooCommerce requires a Store Name to connect your store."
153
+ msgstr ""
154
+
155
+ #. translators: %s - plugin name.
156
+ #: admin/class-mailchimp-woocommerce-admin.php:461
157
+ #: admin/partials/tabs/campaign_defaults.php:95
158
+ msgid "You were subscribed to the newsletter from %s"
159
+ msgstr ""
160
+
161
+ #: admin/class-mailchimp-woocommerce-admin.php:616
162
+ msgid "You must supply your Mailchimp API key to pull the audiences."
163
+ msgstr ""
164
+
165
+ #: admin/class-mailchimp-woocommerce-admin.php:1003
166
+ msgid "Starting the sync process..."
167
+ msgstr ""
168
+
169
+ #: admin/class-mailchimp-woocommerce-admin.php:1005
170
+ msgid "Please hang tight while we work our mojo."
171
+ msgstr ""
172
+
173
+ #: admin/class-mailchimp-woocommerce-admin.php:1007
174
+ msgid "Sometimes the sync can take a while, especially on sites with lots of orders and/or products."
175
+ msgstr ""
176
+
177
+ #: admin/partials/tabs/newsletter_settings.php:35
178
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:112
179
+ msgid "Audience Settings"
180
+ msgstr ""
181
+
182
+ #: admin/partials/tabs/newsletter_settings.php:36
183
+ msgid "Please apply your audience settings. If you don't have an audience, you can choose to create one."
184
+ msgstr ""
185
+
186
+ #: admin/partials/tabs/newsletter_settings.php:40
187
+ msgid "Audience Name"
188
+ msgstr ""
189
+
190
+ #: admin/partials/tabs/newsletter_settings.php:46
191
+ msgid "Create New Audience"
192
+ msgstr ""
193
+
194
+ #: admin/partials/tabs/newsletter_settings.php:50
195
+ msgid "Select Audience"
196
+ msgstr ""
197
+
198
+ #: admin/partials/tabs/newsletter_settings.php:62
199
+ msgid "Choose an audience to sync with your store."
200
+ msgstr ""
201
+
202
+ #: admin/partials/tabs/newsletter_settings.php:68
203
+ msgid "Auto Subscribe On Initial Sync"
204
+ msgstr ""
205
+
206
+ #: admin/partials/tabs/newsletter_settings.php:76
207
+ msgid "No"
208
+ msgstr ""
209
+
210
+ #: admin/partials/tabs/newsletter_settings.php:76
211
+ msgid "Yes"
212
+ msgstr ""
213
+
214
+ #: admin/partials/tabs/newsletter_settings.php:82
215
+ msgid "During initial sync, auto subscribe the existing customers."
216
+ msgstr ""
217
+
218
+ #: admin/partials/tabs/newsletter_settings.php:86
219
+ msgid "Opt-in Settings"
220
+ msgstr ""
221
+
222
+ #: admin/partials/tabs/newsletter_settings.php:87
223
+ msgid "Add text to go along with the opt-in checkbox, and choose a default display option. Customers can click a box at checkout to opt in to your newsletter. Write a signup message and choose how you want this checkbox to appear."
224
+ msgstr ""
225
+
226
+ #: admin/partials/tabs/newsletter_settings.php:91
227
+ msgid "Newsletter Label"
228
+ msgstr ""
229
+
230
+ #: admin/partials/tabs/newsletter_settings.php:95
231
+ msgid "Enter text for the opt-in checkbox"
232
+ msgstr ""
233
+
234
+ #: admin/partials/tabs/newsletter_settings.php:97
235
+ msgid "HTML tags allowed: <a href=\"\" target=\"\" title=\"\"></a> and <br>"
236
+ msgstr ""
237
+
238
+ #: admin/partials/tabs/newsletter_settings.php:100
239
+ #: admin/partials/tabs/newsletter_settings.php:104
240
+ msgid "Checkbox Display Options"
241
+ msgstr ""
242
+
243
+ #: admin/partials/tabs/newsletter_settings.php:108
244
+ msgid "Visible, checked by default"
245
+ msgstr ""
246
+
247
+ #: admin/partials/tabs/newsletter_settings.php:112
248
+ msgid "Visible, unchecked by default"
249
+ msgstr ""
250
+
251
+ #: admin/partials/tabs/newsletter_settings.php:116
252
+ msgid "Hidden, unchecked by default"
253
+ msgstr ""
254
+
255
+ #: admin/partials/tabs/newsletter_settings.php:120
256
+ msgid "Advanced Checkbox Settings"
257
+ msgstr ""
258
+
259
+ #. translators: %s - Woocommerce Actions documentation URL.
260
+ #: admin/partials/tabs/newsletter_settings.php:121
261
+ msgid "To change the location of the opt-in checkbox at checkout, input one of the <a href=%s target=_blank>available WooCommerce form actions.</a>."
262
+ msgstr ""
263
+
264
+ #: admin/partials/tabs/newsletter_settings.php:125
265
+ msgid "Newsletter Checkbox Action"
266
+ msgstr ""
267
+
268
+ #: admin/partials/tabs/newsletter_settings.php:129
269
+ msgid "Enter a WooCommerce form action"
270
+ msgstr ""
271
+
272
+ #: admin/partials/tabs/newsletter_settings.php:133
273
+ #: admin/partials/tabs/newsletter_settings.php:138
274
+ msgid "Audience Member Tags"
275
+ msgstr ""
276
+
277
+ #: admin/partials/tabs/newsletter_settings.php:134
278
+ msgid "Add a comma separated list of tags to add to the user at Mailchimp"
279
+ msgstr ""
280
+
281
+ #: admin/partials/tabs/newsletter_settings.php:145
282
+ #: admin/partials/tabs/newsletter_settings.php:150
283
+ msgid "Product Image Size"
284
+ msgstr ""
285
+
286
+ #: admin/partials/tabs/newsletter_settings.php:146
287
+ msgid "Define the product image size used by abandoned carts, order notifications, and product recommendations."
288
+ msgstr ""
289
+
290
+ #: admin/partials/tabs/newsletter_settings.php:161
291
+ msgid "Select an image size"
292
+ msgstr ""
293
+
294
+ #: admin/partials/tabs/logs.php:35
295
+ #: admin/partials/tabs/logs.php:45
296
+ msgid "Logging Preference"
297
+ msgstr ""
298
+
299
+ #: admin/partials/tabs/logs.php:37
300
+ msgid ""
301
+ "Advanced troubleshooting can be conducted with the logging capability turned on.\n"
302
+ "By default, it’s set to “none” and you may toggle to either “standard” or “debug” as needed.\n"
303
+ "With standard logging, you can see basic information about the data submission to Mailchimp including any errors.\n"
304
+ "“Debug” gives a much deeper insight that is useful to share with support if problems arise."
305
+ msgstr ""
306
+
307
+ #: admin/partials/tabs/logs.php:51
308
+ msgid "None"
309
+ msgstr ""
310
+
311
+ #: admin/partials/tabs/logs.php:51
312
+ msgid "Debug"
313
+ msgstr ""
314
+
315
+ #: admin/partials/tabs/logs.php:51
316
+ msgid "Standard"
317
+ msgstr ""
318
+
319
+ #: admin/partials/tabs/logs.php:59
320
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:160
321
+ msgid "Save all changes"
322
+ msgstr ""
323
+
324
+ #: admin/partials/tabs/logs.php:67
325
+ msgid "Delete log"
326
+ msgstr ""
327
+
328
+ #: admin/partials/tabs/logs.php:79
329
+ msgid "View"
330
+ msgstr ""
331
+
332
+ #: admin/partials/tabs/logs.php:88
333
+ msgid "There are currently no logs to view."
334
+ msgstr ""
335
+
336
+ #: admin/partials/tabs/notices.php:6
337
+ msgid "Mailchimp says: You must enter in a valid API key."
338
+ msgstr ""
339
+
340
+ #: admin/partials/tabs/notices.php:9
341
+ msgid "Mailchimp says: Sorry you must set up your campaign defaults before you proceed!"
342
+ msgstr ""
343
+
344
+ #: admin/partials/tabs/notices.php:12
345
+ msgid "Mailchimp says: You must select a marketing audience."
346
+ msgstr ""
347
+
348
+ #: admin/partials/tabs/notices.php:15
349
+ msgid "Mailchimp says: Sorry you must set up your store before you proceed!"
350
+ msgstr ""
351
+
352
+ #: admin/partials/tabs/notices.php:18
353
+ msgid "Mailchimp says: You are not fully ready to run the Store Sync, please verify your settings before proceeding."
354
+ msgstr ""
355
+
356
+ #: admin/partials/tabs/notices.php:32
357
+ msgid "Mailchimp says: Your re-sync has been started!"
358
+ msgstr ""
359
+
360
+ #: admin/partials/tabs/campaign_defaults.php:16
361
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:109
362
+ msgid "Audience Defaults"
363
+ msgstr ""
364
+
365
+ #: admin/partials/tabs/campaign_defaults.php:17
366
+ msgid "Please fill out the default campaign information."
367
+ msgstr ""
368
+
369
+ #: admin/partials/tabs/campaign_defaults.php:21
370
+ msgid "Contact Name"
371
+ msgstr ""
372
+
373
+ #: admin/partials/tabs/campaign_defaults.php:26
374
+ msgid "Default from name"
375
+ msgstr ""
376
+
377
+ #: admin/partials/tabs/campaign_defaults.php:36
378
+ msgid "From Email"
379
+ msgstr ""
380
+
381
+ #: admin/partials/tabs/campaign_defaults.php:41
382
+ msgid "Default from email"
383
+ msgstr ""
384
+
385
+ #: admin/partials/tabs/campaign_defaults.php:51
386
+ #: admin/partials/tabs/campaign_defaults.php:56
387
+ msgid "Default subject"
388
+ msgstr ""
389
+
390
+ #: admin/partials/tabs/campaign_defaults.php:66
391
+ #: admin/partials/tabs/campaign_defaults.php:78
392
+ msgid "Default language"
393
+ msgstr ""
394
+
395
+ #: admin/partials/tabs/campaign_defaults.php:88
396
+ msgid "Permission Reminder"
397
+ msgstr ""
398
+
399
+ #: admin/partials/tabs/campaign_defaults.php:97
400
+ msgid "Permission reminder message"
401
+ msgstr ""
402
+
403
+ #: admin/partials/tabs/store_sync.php:54
404
+ msgid "Sync Information"
405
+ msgstr ""
406
+
407
+ #: admin/partials/tabs/store_sync.php:57
408
+ msgid "Initial Sync:"
409
+ msgstr ""
410
+
411
+ #: admin/partials/tabs/store_sync.php:57
412
+ msgid "In Progress"
413
+ msgstr ""
414
+
415
+ #: admin/partials/tabs/store_sync.php:61
416
+ msgid "Last Updated:"
417
+ msgstr ""
418
+
419
+ #: admin/partials/tabs/store_sync.php:64
420
+ msgid "Account Connected:"
421
+ msgstr ""
422
+
423
+ #: admin/partials/tabs/store_sync.php:65
424
+ msgid "Audience Connected:"
425
+ msgstr ""
426
+
427
+ #: admin/partials/tabs/store_sync.php:66
428
+ msgid "Products Synced:"
429
+ msgstr ""
430
+
431
+ #: admin/partials/tabs/store_sync.php:67
432
+ msgid "Orders Synced:"
433
+ msgstr ""
434
+
435
+ #: admin/partials/tabs/store_sync.php:70
436
+ msgid "Advanced"
437
+ msgstr ""
438
+
439
+ #: admin/partials/tabs/store_sync.php:72
440
+ msgid "You can resync your audience at any time without losing any of your e-commerce data."
441
+ msgstr ""
442
+
443
+ #: admin/partials/tabs/store_sync.php:74
444
+ msgid "Resync"
445
+ msgstr ""
446
+
447
+ #: admin/partials/tabs/api_key.php:3
448
+ msgid "API Information"
449
+ msgstr ""
450
+
451
+ #: admin/partials/tabs/api_key.php:4
452
+ msgid "To find your Mailchimp API key, log into your account settings > Extras > API keys. From there, either grab an existing key or generate a new one for your WooCommerce store."
453
+ msgstr ""
454
+
455
+ #: admin/partials/tabs/api_key.php:9
456
+ msgid "Mailchimp API Key"
457
+ msgstr ""
458
+
459
+ #: admin/partials/tabs/api_key.php:13
460
+ msgid "Enter your Mailchimp API key."
461
+ msgstr ""
462
+
463
+ #: admin/partials/tabs/store_info.php:13
464
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:106
465
+ msgid "Store Settings"
466
+ msgstr ""
467
+
468
+ #: admin/partials/tabs/store_info.php:14
469
+ msgid "Please provide the following information about your WooCommerce store."
470
+ msgstr ""
471
+
472
+ #: admin/partials/tabs/store_info.php:18
473
+ msgid "Store Name"
474
+ msgstr ""
475
+
476
+ #: admin/partials/tabs/store_info.php:25
477
+ #: admin/partials/tabs/store_info.php:27
478
+ msgid "Name"
479
+ msgstr ""
480
+
481
+ #: admin/partials/tabs/store_info.php:36
482
+ #: admin/partials/tabs/store_info.php:43
483
+ #: admin/partials/tabs/store_info.php:45
484
+ msgid "Email"
485
+ msgstr ""
486
+
487
+ #: admin/partials/tabs/store_info.php:54
488
+ msgid "Street Address"
489
+ msgstr ""
490
+
491
+ #: admin/partials/tabs/store_info.php:61
492
+ #: admin/partials/tabs/store_info.php:63
493
+ msgid "Street address"
494
+ msgstr ""
495
+
496
+ #: admin/partials/tabs/store_info.php:72
497
+ #: admin/partials/tabs/store_info.php:79
498
+ #: admin/partials/tabs/store_info.php:81
499
+ msgid "City"
500
+ msgstr ""
501
+
502
+ #: admin/partials/tabs/store_info.php:90
503
+ #: admin/partials/tabs/store_info.php:97
504
+ #: admin/partials/tabs/store_info.php:99
505
+ msgid "State"
506
+ msgstr ""
507
+
508
+ #: admin/partials/tabs/store_info.php:108
509
+ #: admin/partials/tabs/store_info.php:115
510
+ #: admin/partials/tabs/store_info.php:117
511
+ msgid "Postal Code"
512
+ msgstr ""
513
+
514
+ #: admin/partials/tabs/store_info.php:126
515
+ #: admin/partials/tabs/store_info.php:133
516
+ #: admin/partials/tabs/store_info.php:135
517
+ msgid "Country"
518
+ msgstr ""
519
+
520
+ #: admin/partials/tabs/store_info.php:144
521
+ #: admin/partials/tabs/store_info.php:151
522
+ #: admin/partials/tabs/store_info.php:153
523
+ msgid "Phone Number"
524
+ msgstr ""
525
+
526
+ #: admin/partials/tabs/store_info.php:160
527
+ msgid "Locale Settings"
528
+ msgstr ""
529
+
530
+ #: admin/partials/tabs/store_info.php:162
531
+ msgid "Please apply your locale settings. If you're unsure about these, use the defaults."
532
+ msgstr ""
533
+
534
+ #: admin/partials/tabs/store_info.php:166
535
+ #: admin/partials/tabs/store_info.php:177
536
+ msgid "Locale"
537
+ msgstr ""
538
+
539
+ #: admin/partials/tabs/store_info.php:183
540
+ msgid "Currency Code"
541
+ msgstr ""
542
+
543
+ #: admin/partials/tabs/store_info.php:186
544
+ msgid "Currency is currently deprecated. Please select one from the list above"
545
+ msgstr ""
546
+
547
+ #: admin/partials/tabs/store_info.php:192
548
+ msgid "deprecated"
549
+ msgstr ""
550
+
551
+ #: admin/partials/tabs/store_info.php:199
552
+ msgid "Currency"
553
+ msgstr ""
554
+
555
+ #: admin/partials/tabs/store_info.php:205
556
+ #: admin/partials/tabs/store_info.php:216
557
+ msgid "Timezone"
558
+ msgstr ""
559
+
560
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:86
561
+ msgid "Mailchimp says: Please upgrade your PHP version to a minimum of 7.0"
562
+ msgstr ""
563
+
564
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:92
565
+ msgid "Mailchimp says: API Request Error - "
566
+ msgstr ""
567
+
568
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:101
569
+ msgid "Mailchimp for Woocommerce Settings"
570
+ msgstr ""
571
+
572
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:104
573
+ msgid "Connect"
574
+ msgstr ""
575
+
576
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:115
577
+ msgid "Sync"
578
+ msgstr ""
579
+
580
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:116
581
+ msgid "Logs"
582
+ msgstr ""
583
+
584
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:165
585
+ msgid "More Information"
586
+ msgstr ""
587
+
588
+ #. translators: %s - WP-CLI URL.
589
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:167
590
+ msgid "Have a larger store or having issues syncing? Consider using <a href=%s target=_blank>WP-CLI</a>."
591
+ msgstr ""
592
+
593
+ #. translators: %s - WP-CLI URL.
594
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:168
595
+ msgid "Order and customer information will not sync if they contain an Amazon or generic email address."
596
+ msgstr ""
597
+
598
+ #. translators: %s - Mailchimp Support URL.
599
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:169
600
+ msgid "Need help to connect your store? Visit the Mailchimp <a href=%s target=_blank>Knowledge Base</a>."
601
+ msgstr ""
602
+
603
+ #. translators: %s - Plugin review URL.
604
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:170
605
+ msgid "Want to tell us how we're doing? <a href=%s target=_blank>Leave a review on Wordpress.org</a>."
606
+ msgstr ""
607
+
608
+ #. translators: %s - Mailchimp Privacy Policy URL.
609
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:171
610
+ msgid "By using this plugin, Mailchimp will process customer information in accordance with their <a href=%s target=_blank>Privacy Policy</a>."
611
+ msgstr ""
612
+
613
+ #: bootstrap.php:499
614
+ msgid "The MailChimp For WooCommerce plugin requires the <a href=\"http://wordpress.org/extend/plugins/woocommerce/\">WooCommerce</a> plugin to be active!"
615
+ msgstr ""
616
+
617
+ #: bootstrap.php:896
618
+ msgid "function \"wp_remote_post\" does not exist"
619
+ msgstr ""
620
+
621
+ #: bootstrap.php:910
622
+ msgid "The REST API seems to be disabled on this wordpress site. Please enable to sync data."
623
+ msgstr ""
mailchimp-woocommerce.php CHANGED
@@ -15,8 +15,8 @@
15
  * @wordpress-plugin
16
  * Plugin Name: Mailchimp for WooCommerce
17
  * Plugin URI: https://mailchimp.com/connect-your-store/
18
- * Description: Mailchimp - WooCommerce plugin
19
- * Version: 2.1.15
20
  * Author: Mailchimp
21
  * Author URI: https://mailchimp.com
22
  * License: GPL-2.0+
15
  * @wordpress-plugin
16
  * Plugin Name: Mailchimp for WooCommerce
17
  * Plugin URI: https://mailchimp.com/connect-your-store/
18
+ * Description: Connects WooCommerce to Mailchimp to sync your store data, send targeted campaigns to your customers, and sell more stuff.
19
+ * Version: 2.1.16
20
  * Author: Mailchimp
21
  * Author URI: https://mailchimp.com
22
  * License: GPL-2.0+
plugin_overview.md CHANGED
@@ -79,7 +79,7 @@ After you activate the plugin, you’ll be taken to the **Settings** page, where
79
 
80
  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.
81
 
82
- If you have no lists 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.
83
 
84
  ![List Defaults tab](https://cloud.githubusercontent.com/assets/19805049/18956260/cffd3926-8628-11e6-9c68-9fe3c964c75c.png)
85
 
79
 
80
  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.
81
 
82
+ 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.
83
 
84
  ![List Defaults tab](https://cloud.githubusercontent.com/assets/19805049/18956260/cffd3926-8628-11e6-9c68-9fe3c964c75c.png)
85