MailChimp for WooCommerce - Version 2.4.6

Version Description

Download this release

Release Info

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

Code changes from version 2.4.5 to 2.4.6

CHANGELOG.txt CHANGED
@@ -1,4 +1,10 @@
1
  == Changelog ==
 
 
 
 
 
 
2
  = 2.4.5 =
3
  * fixed disconnect/reconnect list issue
4
  * fixed rest api doing it wrong alert
1
  == Changelog ==
2
+ = 2.4.6 =
3
+ * fix for errors on installs with RTL Site Languages
4
+ * adds GDPR fields for GDPR enabled audiences
5
+ * locale settings from WooCommerce or WP are now auto-selected
6
+ * support for notices in the wc-admin inbox
7
+ * moves Mailchimp plugin link to bottom of Woocommerce sub navigation
8
  = 2.4.5 =
9
  * fixed disconnect/reconnect list issue
10
  * fixed rest api doing it wrong alert
README.txt CHANGED
@@ -4,10 +4,10 @@ Tags: ecommerce,email,workflows,mailchimp
4
  Donate link: https://mailchimp.com
5
  Requires at least: 4.9
6
  Tested up to: 5.5
7
- Stable tag: 2.4.5
8
  Requires PHP: 7.0
9
  WC requires at least: 3.5
10
- WC tested up to: 4.4
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
  Connect your store to your Mailchimp audience to track sales, create targeted emails, send abandoned cart emails, and more.
@@ -77,9 +77,12 @@ At this time, the synchronization of product categories from WooCommerce to Mail
77
  If you are unable to sync or connect with Mailchimp, you can open a ticket on our [Github plugin page](https://github.com/mailchimp/mc-woocommerce/issues). Please provide the version of the plugin and PHP you're using, any fatal errors in the WooCommerce logs (WooCommerce -> Status -> Logs) you're seeing, along with relevant information to the problem you're experiencing.
78
 
79
  == Changelog ==
80
- = 2.4.5 =
81
- * fixed disconnect/reconnect list issue
82
- * fixed rest api doing it wrong alert
 
 
 
83
 
84
  [Historical Changelog](https://raw.githubusercontent.com/mailchimp/mc-woocommerce/master/CHANGELOG.txt)
85
 
4
  Donate link: https://mailchimp.com
5
  Requires at least: 4.9
6
  Tested up to: 5.5
7
+ Stable tag: 2.4.6
8
  Requires PHP: 7.0
9
  WC requires at least: 3.5
10
+ WC tested up to: 4.5
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
  Connect your store to your Mailchimp audience to track sales, create targeted emails, send abandoned cart emails, and more.
77
  If you are unable to sync or connect with Mailchimp, you can open a ticket on our [Github plugin page](https://github.com/mailchimp/mc-woocommerce/issues). Please provide the version of the plugin and PHP you're using, any fatal errors in the WooCommerce logs (WooCommerce -> Status -> Logs) you're seeing, along with relevant information to the problem you're experiencing.
78
 
79
  == Changelog ==
80
+ = 2.4.6 =
81
+ * fix for errors on installs with RTL Site Languages
82
+ * adds GDPR fields for GDPR enabled audiences
83
+ * locale settings from WooCommerce or WP are now auto-selected
84
+ * support for notices in the wc-admin inbox
85
+ * moves Mailchimp plugin link to bottom of Woocommerce sub navigation
86
 
87
  [Historical Changelog](https://raw.githubusercontent.com/mailchimp/mc-woocommerce/master/CHANGELOG.txt)
88
 
admin/class-mailchimp-woocommerce-admin.php CHANGED
@@ -110,11 +110,12 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
110
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin.css', array(), $this->version.'.21', 'all' );
111
  wp_enqueue_style( $this->plugin_name . 'checkbox', plugin_dir_url( __FILE__ ) . 'css/checkbox.min.css', array(), $this->version, 'all' );
112
 
113
- if ( $hook === 'woocommerce_page_mailchimp-woocommerce' ) {
114
  if ( get_bloginfo( 'version' ) < '5.3') {
115
  wp_enqueue_style( $this->plugin_name."-settings", plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings-5.2.css', array(), $this->version, 'all' );
116
  }
117
  wp_enqueue_style( $this->plugin_name."-settings", plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings.css', array(), $this->version, 'all' );
 
118
  }
119
  }
120
 
@@ -124,7 +125,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
124
  * @since 1.0.0
125
  */
126
  public function enqueue_scripts($hook) {
127
- if ( $hook === 'woocommerce_page_mailchimp-woocommerce' ) {
128
  wp_register_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/mailchimp-woocommerce-admin.js', array( 'jquery', 'swal' ), $this->version.'.21', false );
129
  wp_localize_script(
130
  $this->plugin_name,
@@ -257,23 +258,73 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
257
  */
258
  public function initial_notice() {
259
  if (!mailchimp_is_configured()) {
260
- $class = 'notice notice-warning is-dismissible';
261
- $message = sprintf(
262
- /* translators: Placeholders %1$s - opening strong HTML tag, %2$s - closing strong HTML tag, %3$s - opening link HTML tag, %4$s - closing link HTML tag */
263
- esc_html__(
264
- '%1$sMailchimp for Woocommerce%2$s is not yet connected to a Mailchimp account. To complete the connection, %3$svisit the plugin settings page%4$s.',
265
- 'facebook-for-woocommerce'
266
- ),
267
- '<strong>',
268
- '</strong>',
269
- '<a href="' . admin_url( 'admin.php?page=') . $this->plugin_name . '">',
270
- '</a>'
271
- );
272
- printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
  }
274
  }
275
 
276
-
277
  /**
278
  * Depending on the version we're on we may need to run some sort of migrations.
279
  */
@@ -882,7 +933,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
882
  'store_phone' => isset($input['store_phone']) ? $input['store_phone'] : false,
883
  // locale info
884
  'store_locale' => isset($input['store_locale']) ? $input['store_locale'] : false,
885
- 'store_timezone' => isset($input['store_timezone']) ? $input['store_timezone'] : false,
886
  'admin_email' => isset($input['admin_email']) && is_email($input['admin_email']) ? $input['admin_email'] : $this->getOption('admin_email', false),
887
  'mailchimp_permission_cap' => $checkbox,
888
  );
@@ -1096,7 +1147,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
1096
  return $this->validateOptions(array(
1097
  'store_name', 'store_street', 'store_city', 'store_state',
1098
  'store_postal_code', 'store_country', 'store_phone',
1099
- 'store_locale', 'store_timezone',
1100
  'store_phone','mailchimp_permission_cap',
1101
  ), $data);
1102
  }
@@ -1472,7 +1523,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
1472
 
1473
  // set the locale data
1474
  $store->setPrimaryLocale($this->array_get($data, 'store_locale', 'en'));
1475
- $store->setTimezone($this->array_get($data, 'store_timezone', 'America\New_York'));
1476
  $store->setCurrencyCode($this->array_get($data, 'store_currency_code', 'USD'));
1477
  $store->setMoneyFormat($store->getCurrencyCode());
1478
 
110
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin.css', array(), $this->version.'.21', 'all' );
111
  wp_enqueue_style( $this->plugin_name . 'checkbox', plugin_dir_url( __FILE__ ) . 'css/checkbox.min.css', array(), $this->version, 'all' );
112
 
113
+ if ( strpos($hook, 'page_mailchimp-woocommerce') !== false ) {
114
  if ( get_bloginfo( 'version' ) < '5.3') {
115
  wp_enqueue_style( $this->plugin_name."-settings", plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings-5.2.css', array(), $this->version, 'all' );
116
  }
117
  wp_enqueue_style( $this->plugin_name."-settings", plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings.css', array(), $this->version, 'all' );
118
+ wp_style_add_data( $this->plugin_name."-settings", 'rtl', 'replace' );
119
  }
120
  }
121
 
125
  * @since 1.0.0
126
  */
127
  public function enqueue_scripts($hook) {
128
+ if ( strpos($hook, 'page_mailchimp-woocommerce') !== false ) {
129
  wp_register_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/mailchimp-woocommerce-admin.js', array( 'jquery', 'swal' ), $this->version.'.21', false );
130
  wp_localize_script(
131
  $this->plugin_name,
258
  */
259
  public function initial_notice() {
260
  if (!mailchimp_is_configured()) {
261
+ // If WC_Admin_Notes doesn't exist, show normal wordpress admin notice...
262
+ if ( ! class_exists( '\Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes' ) ) {
263
+ $class = 'notice notice-warning is-dismissible';
264
+ $message = sprintf(
265
+ /* translators: Placeholders %1$s - opening strong HTML tag, %2$s - closing strong HTML tag, %3$s - opening link HTML tag, %4$s - closing link HTML tag */
266
+ esc_html__(
267
+ '%1$sMailchimp for Woocommerce%2$s is not yet connected to a Mailchimp account. To complete the connection, %3$svisit the plugin settings page%4$s.',
268
+ 'facebook-for-woocommerce'
269
+ ),
270
+ '<strong>',
271
+ '</strong>',
272
+ '<a href="' . admin_url( 'admin.php?page=') . $this->plugin_name . '">',
273
+ '</a>'
274
+ );
275
+ printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
276
+ }
277
+ // else show the WooCoomerce admin inbox note.
278
+ else {
279
+ if ( ! class_exists( 'WC_Data_Store' ) ) {
280
+ return;
281
+ }
282
+
283
+ $data_store = WC_Data_Store::load( 'admin-note' );
284
+
285
+ // First, see if we've already created this kind of note so we don't do it again.
286
+ $note_ids = $data_store->get_notes_with_name( 'mailchimp-for-woocommerce-incomplete-install' );
287
+ foreach( (array) $note_ids as $note_id ) {
288
+ $note = \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes::get_note( $note_id );
289
+ $content_data = $note->get_content_data();
290
+ if ( property_exists( $content_data, 'getting_started' ) ) {
291
+ return;
292
+ }
293
+ }
294
+
295
+ // Otherwise, add the note
296
+ $activated_time = current_time( 'timestamp', 0 );
297
+ $activated_time_formatted = date( 'F jS', $activated_time );
298
+ $note = new \Automattic\WooCommerce\Admin\Notes\WC_Admin_Note();
299
+ $note->set_title( __( 'Mailchimp For WooCommerce', 'mailchimp-for-woocommerce' ) );
300
+ $note->set_content(
301
+ esc_html__(
302
+ 'Plugin is not yet connected to a Mailchimp account. To complete the connection, open the settings page.',
303
+ 'mailchimp-for-woocommerce'
304
+ )
305
+ );
306
+ $note->set_content_data( (object) array(
307
+ 'getting_started' => true,
308
+ 'activated' => $activated_time,
309
+ 'activated_formatted' => $activated_time_formatted,
310
+ ) );
311
+ $note->set_type( \Automattic\WooCommerce\Admin\Notes\WC_Admin_Note::E_WC_ADMIN_NOTE_WARNING );
312
+ $note->set_layout('plain');
313
+ $note->set_image('');
314
+ $note->set_name( 'mailchimp-for-woocommerce-incomplete-install' );
315
+ $note->set_source( 'mailchimp-for-woocommerce' );
316
+ $note->set_layout('plain');
317
+ $note->set_image('');
318
+ $note->add_action(
319
+ 'settings',
320
+ __( 'Open Settings', 'mailchimp-for-woocommerce' ),
321
+ admin_url( 'admin.php?page=') . $this->plugin_name
322
+ );
323
+ $note->save();
324
+ }
325
  }
326
  }
327
 
 
328
  /**
329
  * Depending on the version we're on we may need to run some sort of migrations.
330
  */
933
  'store_phone' => isset($input['store_phone']) ? $input['store_phone'] : false,
934
  // locale info
935
  'store_locale' => isset($input['store_locale']) ? $input['store_locale'] : false,
936
+ 'store_timezone' => mailchimp_get_timezone(),
937
  'admin_email' => isset($input['admin_email']) && is_email($input['admin_email']) ? $input['admin_email'] : $this->getOption('admin_email', false),
938
  'mailchimp_permission_cap' => $checkbox,
939
  );
1147
  return $this->validateOptions(array(
1148
  'store_name', 'store_street', 'store_city', 'store_state',
1149
  'store_postal_code', 'store_country', 'store_phone',
1150
+ 'store_locale',
1151
  'store_phone','mailchimp_permission_cap',
1152
  ), $data);
1153
  }
1523
 
1524
  // set the locale data
1525
  $store->setPrimaryLocale($this->array_get($data, 'store_locale', 'en'));
1526
+ $store->setTimezone(mailchimp_get_timezone());
1527
  $store->setCurrencyCode($this->array_get($data, 'store_currency_code', 'USD'));
1528
  $store->setMoneyFormat($store->getCurrencyCode());
1529
 
admin/css/mailchimp-woocommerce-admin-settings-rtl.css ADDED
@@ -0,0 +1,1123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * mc-woocommerce Settings Page
3
+ */
4
+ @import url('https://use.typekit.net/wvc2hnb.css');
5
+
6
+ @font-face {
7
+ font-family: 'Proxima Nova Alt Light';
8
+ font-style: normal;
9
+ font-weight: normal;
10
+ src: local('Proxima Nova Alt Light'), url('../fonts/Mark Simonson - Proxima Nova Alt Light.woff') format('woff');
11
+ }
12
+
13
+ html {
14
+ scroll-padding-top: 8em;
15
+ }
16
+
17
+ .mc-woocommerce-settings {
18
+ width:90%;
19
+ margin: 4em auto 0 auto !important;
20
+ font-family: "proxima-nova", Arial, Helvetica, sans-serif;
21
+
22
+ }
23
+
24
+ .mc-woocommerce-settings p {
25
+ font-size: 14px;
26
+ font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif;
27
+ }
28
+
29
+ .mc-woocommerce-settings-subtitles {
30
+ font-family: "proxima-nova", Arial, Helvetica, sans-serif;
31
+ font-size: 22px !important;
32
+ line-height: 32px;
33
+ color: #3C3C3C;
34
+ }
35
+
36
+ .description {
37
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
38
+ font-size: 12px !important;
39
+ line-height: 16px !important;
40
+ color: #b3b3b3 !important;
41
+ }
42
+
43
+ .description.support-form {
44
+ color: #444 !important;
45
+ }
46
+
47
+ .nav-wizard-wrapper {
48
+ cursor: default;
49
+ margin-bottom: 110px !important;
50
+
51
+ }
52
+
53
+ .nav-wizard-wrapper .wizard-tab {
54
+ display: inline-block;
55
+ height: 13px;
56
+ width: 57px;
57
+ margin-left: 0.5em;
58
+ position: relative;
59
+ align-items: center;
60
+ text-align: center;
61
+ text-transform: uppercase;
62
+ }
63
+
64
+ .nav-wizard-wrapper .wizard-tab .marker{
65
+ display: block;
66
+ height: 13px;
67
+ width: 57px;
68
+ border-bottom: 3px solid #E6E6E6;
69
+ }
70
+
71
+ .nav-wizard-wrapper .wizard-tab .marker-disabled{
72
+ display: block;
73
+ height: 13px;
74
+ width: 57px;
75
+ border-bottom: 3px solid #E6E6E6;
76
+ }
77
+
78
+ .nav-wizard-wrapper .wizard-tab .marker:hover{
79
+ border-bottom: 3px solid #212121;
80
+ }
81
+
82
+ .nav-wizard-wrapper .wizard-tab-tooltip{
83
+ display: none;
84
+ }
85
+
86
+ .nav-wizard-wrapper .wizard-tab-active .wizard-tab-tooltip{
87
+ display: block;
88
+ }
89
+
90
+ .nav-wizard-wrapper .wizard-tab-tooltip {
91
+ position: absolute;
92
+ right: 0;
93
+ top: 40px;
94
+ width: 150px;
95
+ background: white;
96
+ border-radius: 6px;
97
+ padding: 20px 30px;
98
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
99
+ font-size: 14px;
100
+ line-height: 17px;
101
+ color: #3C3C3C;
102
+ cursor: default;
103
+ }
104
+
105
+ .nav-wizard-wrapper .wizard-tab-tooltip svg{
106
+ position: absolute;
107
+ right: 13px;
108
+ top: -13px;
109
+
110
+ }
111
+
112
+ .nav-tab-wrapper {
113
+ border-bottom: 2px solid white !important;
114
+ margin-bottom: 25px !important;
115
+ }
116
+
117
+ .nav-tab-wrapper .nav-tab {
118
+ background: #F1F1F1;
119
+ border-radius: 4px 4px 0px 0px;
120
+ border: 1px solid #F1F1F1;
121
+ border-bottom: none;
122
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
123
+ font-size: 14px;
124
+ line-height: 24px;
125
+ text-align: center;
126
+ color: #212121;
127
+ padding: 20px 35px;
128
+ -webkit-transition: padding 0.1s ease-out;
129
+ -moz-transition: padding 0.1s ease-out;
130
+ -o-transition: padding 0.1s ease-out;
131
+ transition: padding 0.1s ease-out;
132
+ }
133
+
134
+ .nav-tab-wrapper .nav-tab:first-of-type {
135
+ margin-left: 0;
136
+ }
137
+
138
+ .nav-tab-wrapper .nav-tab:focus {
139
+ outline: none !important;
140
+ box-shadow: none !important;
141
+ }
142
+
143
+ .nav-tab-wrapper .nav-tab:hover:not(.nav-tab-active) {
144
+ background: #F5F5F5;
145
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
146
+ font-size: 14px;
147
+ line-height: 24px;
148
+ text-align: center;
149
+ color: #212121;
150
+ padding: 18px 35px 22px 35px;
151
+ -webkit-transition: padding 0.1s ease-out;
152
+ -moz-transition: padding 0.1s ease-out;
153
+ -o-transition: padding 0.1s ease-out;
154
+ transition: padding 0.1s ease-out;
155
+ }
156
+
157
+ .nav-tab-wrapper .nav-tab-active {
158
+ background: white;
159
+ padding: 18px 35px 22px 35px;
160
+ border-radius: 4px 4px 0px 0px;
161
+ border: 1px solid #F1F1F1;
162
+ border-bottom: none;
163
+ }
164
+
165
+ .tab-content-wrapper {
166
+ background: white;
167
+ padding: 0;
168
+ margin: 0;
169
+ -webkit-box-sizing: border-box;
170
+ -moz-box-sizing: border-box;
171
+ box-sizing: border-box;
172
+ }
173
+
174
+ .tab-content-wrapper *,
175
+ .sync-content-wrapper {
176
+ margin: 0;
177
+ padding: 0;
178
+ border: 0;
179
+ -webkit-box-sizing: border-box;
180
+ -moz-box-sizing: border-box;
181
+ box-sizing: border-box;
182
+ }
183
+
184
+ .tab-content-wrapper a {
185
+ color: #8D5C87;
186
+ text-decoration: none;
187
+ }
188
+ .tab-content-wrapper a:hover {
189
+ text-decoration: underline;
190
+ }
191
+
192
+ .tab-content-wrapper form {
193
+ margin: 0 auto;
194
+ padding: 3em;
195
+ }
196
+
197
+ .tab-content-wrapper fieldset{
198
+ background: white;
199
+ width: 100%;
200
+ }
201
+
202
+ .tab-content-wrapper fieldset .fieldset-header{
203
+ float: left;
204
+ padding-top: 3em;
205
+ width: 100%;
206
+ font-size: 18px;
207
+ }
208
+
209
+ .tab-content-wrapper p.submit {
210
+ margin-top: 0 !important;
211
+ padding-top: 35px !important;
212
+ margin-bottom: 45px !important;
213
+ font-weight: 600;
214
+ }
215
+
216
+ .tab-content-wrapper p.submit:focus {
217
+ margin-top: 10px !important;
218
+ }
219
+
220
+ .tab-content-wrapper .required-field-mark {
221
+ color: red;
222
+ }
223
+
224
+ .tab-content-submit,
225
+ .mc-woocommerce-resync-button,
226
+ .mc-woocommerce-log-button {
227
+ font-family: proxima-nova, Arial, Helvetica, sans-serif !important;
228
+ font-size: 14px !important;
229
+ line-height: 16px !important;
230
+ padding: 15px 35px 15px 35px !important;
231
+
232
+ /* identical to box height */
233
+ text-transform: uppercase !important;
234
+ color: #FFFFFF !important;
235
+ border-radius: 100px !important;
236
+ border: none !important;
237
+
238
+ }
239
+
240
+ .oauth-description {
241
+ display: none;
242
+ }
243
+
244
+ #mailchimp-oauth-connected {
245
+ color: #7FAD45;
246
+ }
247
+
248
+ .mc-woocommerce-log-button {
249
+ padding: 15px !important;
250
+ text-decoration: none;
251
+ display:inline-block;
252
+ background-color: #FFFF;
253
+ }
254
+
255
+ .mc-woocommerce-log-button.delete-log-button:hover span {
256
+ color: red;
257
+ }
258
+
259
+ .mc-woocommerce-log-button.mc-woocommerce-copy-log-button span.yes {
260
+ color: green;
261
+ display:none;
262
+ }
263
+
264
+ .tab-content-submit {
265
+ float:right;
266
+ background: #7FAD45 !important;
267
+ box-shadow:0 1px 0 #7FAD45 !important;
268
+ text-shadow: 0 -1px 1px #7FAD45,1px 0 1px #7FAD45,0 1px 1px #7FAD45,-1px 0 1px #7FAD45 !important;
269
+ -webkit-transition: background-color 0.3s ease-out,
270
+ text-shadow 0.3s ease-out,
271
+ box-shadow 0.3s ease-out;
272
+ -moz-transition: background-color 0.3s ease-out,
273
+ text-shadow 0.3s ease-out,
274
+ box-shadow 0.3s ease-out;
275
+ -o-transition: background-color 0.3s ease-out,
276
+ text-shadow 0.3s ease-out,
277
+ box-shadow 0.3s ease-out;
278
+ transition: background-color 0.3s ease-out,
279
+ text-shadow 0.3s ease-out,
280
+ box-shadow 0.3s ease-out;
281
+ }
282
+
283
+ .disconnect-button {
284
+ width:180px;
285
+ margin: 0 0.5em !important;
286
+ }
287
+
288
+ .tab-content-submit:hover {
289
+ float:right;
290
+ background: #9EC769 !important;
291
+ box-shadow:0 1px 0 #9EC769 !important;
292
+ text-shadow: 0 -1px 1px #9EC769,1px 0 1px #9EC769,0 1px 1px #9EC769,-1px 0 1px #9EC769 !important;
293
+ -webkit-transition: background-color 0.3s ease-out,
294
+ text-shadow 0.3s ease-out,
295
+ box-shadow 0.3s ease-out;
296
+ -moz-transition: background-color 0.3s ease-out,
297
+ text-shadow 0.3s ease-out,
298
+ box-shadow 0.3s ease-out;
299
+ -o-transition: background-color 0.3s ease-out,
300
+ text-shadow 0.3s ease-out,
301
+ box-shadow 0.3s ease-out;
302
+ transition: background-color 0.3s ease-out,
303
+ text-shadow 0.3s ease-out,
304
+ box-shadow 0.3s ease-out;
305
+ text-decoration: none !important;
306
+ }
307
+
308
+ .mc-woocommerce-resync-button,
309
+ .mc-woocommerce-log-button {
310
+ color: #3C3C3C !important;
311
+ background: #E6E6E6 !important;
312
+ box-shadow:0 1px 0 #E6E6E6 !important;
313
+ text-shadow: 0 -1px 1px #E6E6E6,1px 0 1px #E6E6E6,0 1px 1px #E6E6E6,-1px 0 1px #E6E6E6 !important;
314
+ -webkit-transition: background-color 0.3s ease-out,
315
+ text-shadow 0.3s ease-out,
316
+ box-shadow 0.3s ease-out;
317
+ -moz-transition: background-color 0.3s ease-out,
318
+ text-shadow 0.3s ease-out,
319
+ box-shadow 0.3s ease-out;
320
+ -o-transition: background-color 0.3s ease-out,
321
+ text-shadow 0.3s ease-out,
322
+ box-shadow 0.3s ease-out;
323
+ transition: background-color 0.3s ease-out,
324
+ text-shadow 0.3s ease-out,
325
+ box-shadow 0.3s ease-out;
326
+
327
+ }
328
+
329
+ .mc-woocommerce-resync-button:hover,
330
+ .mc-woocommerce-log-button:hover {
331
+ color: #3C3C3C !important;
332
+ background: #DADADA !important;
333
+ box-shadow:0 1px 0 #DADADA !important;
334
+ text-shadow: 0 -1px 1px #DADADA,1px 0 1px #DADADA,0 1px 1px #DADADA,-1px 0 1px #DADADA !important;
335
+ -webkit-transition: background-color 0.3s ease-out,
336
+ text-shadow 0.3s ease-out,
337
+ box-shadow 0.3s ease-out;
338
+ -moz-transition: background-color 0.3s ease-out,
339
+ text-shadow 0.3s ease-out,
340
+ box-shadow 0.3s ease-out;
341
+ -o-transition: background-color 0.3s ease-out,
342
+ text-shadow 0.3s ease-out,
343
+ box-shadow 0.3s ease-out;
344
+ transition: background-color 0.3s ease-out,
345
+ text-shadow 0.3s ease-out,
346
+ box-shadow 0.3s ease-out;
347
+ text-decoration: none !important;
348
+ }
349
+
350
+ .mc-woocommerce-log-button {
351
+ background: #fff !important;
352
+ box-shadow:none !important;
353
+ text-shadow: 0 -1px 1px #DADADA,1px 0 1px #DADADA,0 1px 1px #DADADA,-1px 0 1px #DADADA !important;
354
+ }
355
+
356
+ .mc-woocommerce-log-button:hover {
357
+ background: #eee !important;
358
+ }
359
+
360
+ .tab-content-submit:focus,.tab-content-submit:hover{
361
+ background: rgb(149, 189, 101);
362
+ border-color: rgb(149, 189, 101);
363
+ color:#fff;
364
+ box-shadow:0 1px 0 rgb(149, 189, 101);
365
+ }
366
+
367
+ .tab-content-wrapper label {
368
+ display: block;
369
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
370
+ font-size: 14px;
371
+ font-weight: 600 !important;
372
+ line-height: 30px;
373
+ width: 100%;
374
+ color: #3C3C3C;
375
+ }
376
+
377
+ .tab-content-wrapper h4 {
378
+ margin-top: 0;
379
+ }
380
+
381
+ .sync-content-wrapper {
382
+ display: table;
383
+ width: 100%;
384
+ }
385
+
386
+ .sync-comm-wrapper {
387
+ position:relative;
388
+ background-color: white;
389
+ padding: 4px 2em;
390
+ margin-top: 26px;
391
+ -webkit-border-radius: 4px;
392
+ -moz-border-radius: 4px;
393
+ border-radius: 4px;
394
+ height: 164px;
395
+ }
396
+
397
+ .sync-more-wrapper {
398
+ position:relative;
399
+ padding: 4px 0em;
400
+ height: 264px;
401
+ }
402
+
403
+ .sync-comm-wrapper .comm_box_status {
404
+ font-weight: 700;
405
+ }
406
+
407
+ .el-switch > input[type="checkbox"]:checked + .el-switch-style {
408
+ background-color: #4DD463;
409
+ }
410
+
411
+ .comm_box_wrapper fieldset {
412
+ border: 2px solid #E0E0E0;
413
+ padding: 0 1em 0 1em;
414
+ margin: 1em 0;
415
+ }
416
+
417
+ .comm_box_wrapper .el-switch,
418
+ .comm_box_wrapper .mc-comm-save{
419
+ float: right;
420
+ }
421
+
422
+ .comm_box_wrapper .mc-comm-save {
423
+ margin-right: 10px;
424
+ }
425
+
426
+ .sync-content-wrapper .sync-stats-wrapper {
427
+ position:relative;
428
+ background-color: white;
429
+ padding: 4px 2em 0 2em;
430
+ margin-left: 2em;
431
+ -webkit-border-radius: 4px;
432
+ -moz-border-radius: 4px;
433
+ border-radius: 4px;
434
+ }
435
+
436
+ .sync-content-wrapper .sync-stats-card {
437
+ width: 100%;
438
+ border-bottom: 1px solid #E6E6E6;
439
+ padding: 2em 0;
440
+ min-height: 20px;
441
+ }
442
+
443
+ .sync-content-wrapper .sync-stats-card:last-child {
444
+ border-bottom: none;
445
+ }
446
+
447
+ .sync-content-wrapper .sync-stats-card .sync-stats-card-content{
448
+ position:relative;
449
+ }
450
+
451
+ .sync-content-wrapper .sync-stats-card span.card_label,
452
+ .sync-content-wrapper .sync-stats-card span.card_label{
453
+ padding-left: 0.7em;
454
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
455
+ font-size: 14px;
456
+ line-height: 14px;
457
+ }
458
+
459
+ .sync-content-wrapper .sync-stats-card span.card_count,
460
+ .sync-content-wrapper .sync-stats-card span.card_count{
461
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
462
+ font-size: 22px;
463
+ line-height: 22px;
464
+ position: absolute;
465
+ left: 1em;
466
+ margin: 0;
467
+ }
468
+
469
+
470
+ .sync-content-wrapper .sync-stats-card .card_count_label {
471
+ position: absolute;
472
+ top: -1.3em;
473
+ right: 0;
474
+ color: #E6E6E6;
475
+ }
476
+
477
+ .sync-content-wrapper .sync-stats-card .sync-loader {
478
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
479
+ font-size: 22px;
480
+ line-height: 22px;
481
+ position: absolute;
482
+ right: 1em;
483
+ margin: 8px 0px;
484
+ visibility: hidden;
485
+ }
486
+
487
+ .progress-bar-wrapper {
488
+ position: absolute;
489
+ top: 0.6em;
490
+ left: 1.8em;
491
+ background: #F7F7F7;
492
+ width: 50%;
493
+ height: 3px;
494
+ display: none;
495
+ }
496
+
497
+ .progress-bar {
498
+ background: #8D5C87;
499
+ width: 0%;
500
+ height: 3px;
501
+ }
502
+
503
+ .sync-content-wrapper .sync-controls-wrapper {
504
+ background-color: #E6E6E6;
505
+ -webkit-border-radius: 4px;
506
+ -moz-border-radius: 4px;
507
+ border-radius: 4px;
508
+ display: table-cell;
509
+ width: 60%;
510
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
511
+ font-size: 14px ;
512
+ line-height: 14px;
513
+ }
514
+
515
+ .sync-content-wrapper .sync-controls {
516
+ padding: 1em 1em 1em 3em;
517
+ font-size: 14px;
518
+ line-height: 14px;
519
+ }
520
+
521
+ .sync-content-wrapper .sync-controls .mc-woocommerce-last-sync{
522
+ margin-top: 14em;
523
+ }
524
+
525
+ .sync-content-wrapper .mc-woocommerce-disconnect-button {
526
+ cursor: pointer;
527
+ padding-top: 1em;
528
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
529
+ font-size: 14px;
530
+ line-height: 17px;
531
+ font-weight: 600;
532
+ display: flex;
533
+ align-items: center;
534
+ text-transform: uppercase;
535
+ text-decoration: none;
536
+ color: #3C3C3C;
537
+ border: none;
538
+ border-radius: 100px;
539
+ padding: 1em 2em 1em 1em;
540
+ background: #E6E6E6;
541
+ -webkit-transition: background-color 0.3s ease-out;
542
+ -moz-transition: background-color 0.3s ease-out;
543
+ -o-transition: background-color 0.3s ease-out;
544
+ transition: background-color 0.3s ease-out;
545
+
546
+ }
547
+ .sync-content-wrapper .mc-woocommerce-disconnect-button {
548
+ float: left;
549
+ }
550
+
551
+ .sync-content-wrapper .mc-woocommerce-disconnect-button:hover {
552
+ color: #3C3C3C;
553
+ background-color: #DADADA;
554
+ -webkit-transition: background-color 0.3s ease-out;
555
+ -moz-transition: background-color 0.3s ease-out;
556
+ -o-transition: background-color 0.3s ease-out;
557
+ transition: background-color 0.3s ease-out;
558
+ text-decoration: none !important;
559
+ }
560
+
561
+ .sync-content-wrapper .mc-woocommerce-disconnect-button svg {
562
+ margin-left: 2em;
563
+ }
564
+
565
+
566
+ .tab-content-wrapper .box {
567
+ padding: 0.5rem 1rem;
568
+ margin: 0;
569
+ clear:both;
570
+ }
571
+
572
+ .sync-comm-wrapper .box,
573
+ .sync-more-wrapper .box {
574
+ padding: 0.5rem 0rem;
575
+ margin: 0;
576
+ }
577
+
578
+ .sync-more-wrapper .box {
579
+ height: 200px !important;
580
+ -webkit-border-radius: 4px;
581
+ -moz-border-radius: 4px;
582
+ border-radius: 4px;
583
+ }
584
+
585
+ .tab-content-wrapper .box.box-half,
586
+ .sync-content-wrapper .box.box-half,
587
+ .sync-more-wrapper .box.box-half {
588
+ float: left;
589
+ clear: none;
590
+ width: 50%;
591
+
592
+ }
593
+
594
+ .sync-more-wrapper .box.box-half .content{
595
+ padding: 0 2em;
596
+ }
597
+
598
+ .sync-content-wrapper .box.box-half {
599
+ height: 100%;
600
+ }
601
+
602
+ .tab-content-wrapper .box.box-half.margin-large {
603
+ margin-top: 3em;
604
+ }
605
+
606
+ .tab-content-wrapper .box.box-third {
607
+ float: left;
608
+ clear:none;
609
+ width: 33%;
610
+ }
611
+
612
+ .tab-content-wrapper fieldset label {
613
+ font-weight: 500;
614
+ }
615
+
616
+ .tab-content-wrapper fieldset label p{
617
+ font-weight: 400;
618
+ }
619
+
620
+ .tab-content-wrapper fieldset input[type="text"],
621
+ .tab-content-wrapper fieldset input[type="password"],
622
+ .tab-content-wrapper fieldset input[type="email"],
623
+ .tab-content-wrapper fieldset textarea {
624
+ border: 1px solid #E6E6E6;
625
+ box-sizing: border-box;
626
+ border-radius: 4px;
627
+ padding: 0.6em 1.5em;
628
+ width: 100%;
629
+ font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif
630
+
631
+ }
632
+
633
+ .tab-content-wrapper .mailchimp-select-wrapper {
634
+ border: 1px solid #E6E6E6;
635
+ padding: 6px 6px 4px 20px;
636
+ -webkit-border-radius: 4px;
637
+ -moz-border-radius: 4px;
638
+ border-radius: 4px;
639
+ box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
640
+ }
641
+
642
+ .tab-content-wrapper .mailchimp-select-wrapper select {
643
+ padding: 3px 24px 3px 0px;
644
+ font-size: 14px;
645
+ font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif;
646
+ border: none;
647
+ -webkit-appearance: none;
648
+ box-shadow: none;
649
+ outline: none;
650
+ width: 100% !important;
651
+ max-width: 10000px;
652
+ color: #32373c;
653
+ }
654
+
655
+ .tab-content-wrapper .mailchimp-select-wrapper select option{
656
+ outline: none;
657
+ }
658
+
659
+ .tab-content-wrapper .mailchimp-select-wrapper select:disabled {
660
+ color: #aaa;
661
+ background: none;
662
+ }
663
+
664
+ .tab-content-wrapper fieldset select:focus {
665
+ outline: none;
666
+ }
667
+
668
+ .tab-content-wrapper fieldset input[type='checkbox'] {
669
+ width: 2em;
670
+ height: 2em;
671
+ border-radius: 4px;
672
+ border: 1px solid #E6E6E6;
673
+ }
674
+ .tab-content-wrapper fieldset input[type='checkbox']:checked::before {
675
+ color: #7FAD45;
676
+ margin: 0.6em 0px 0px 0.2em;
677
+ content: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='9' viewBox='0 0 13 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.75 0.5L12.25 2L5.26 9L0.75 4.5L2.25 3L5.26 6L10.75 0.5Z' fill='%237FAD45'/%3e%3c/svg%3e ");
678
+ float: left !important;
679
+ }
680
+
681
+
682
+ .tab-content-wrapper fieldset input[type='radio'],
683
+ .sync-content-wrapper fieldset input[type='radio'] {
684
+ width: 2em;
685
+ height: 2em;
686
+ border: 1px solid #E6E6E6;
687
+ margin-right: 10px;
688
+ }
689
+
690
+ .tab-content-wrapper fieldset input[type='radio']:checked::before,
691
+ .sync-content-wrapper fieldset input[type='radio']:checked::before {
692
+ background: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='9' viewBox='0 0 13 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.75 0.5L12.25 2L5.26 9L0.75 4.5L2.25 3L5.26 6L10.75 0.5Z' fill='%237FAD45'/%3e%3c/svg%3e ");
693
+ background-repeat: none;
694
+ width: 13px;
695
+ height: 9px;
696
+ margin: 8px 0 0 7px;
697
+ float: left !important;
698
+ }
699
+
700
+ .tab-content-wrapper fieldset .radio-label,
701
+ .sync-content-wrapper fieldset .radio-label {
702
+ margin-bottom: 10px;
703
+ }
704
+
705
+ .mc-comm-save {
706
+ display:none;
707
+ color: #628735;
708
+ margin-left: 10px;
709
+ }
710
+
711
+ .tab-content-wrapper fieldset textarea {
712
+ border: 1px solid #E6E6E6;
713
+ box-sizing: border-box;
714
+ border-radius: 4px;
715
+ padding: 15px 20px;
716
+ width: 100%;
717
+
718
+ }
719
+
720
+ .tab-content-wrapper .optional-settings-label,
721
+ .tab-content-wrapper .optional-settings-button {
722
+ margin-top: 3em;
723
+ font-weight: 600;
724
+ }
725
+
726
+ .tab-content-wrapper .optional-settings-button:hover span {
727
+ color: #628735;
728
+ }
729
+
730
+ .tab-content-wrapper .optional-settings-label span,
731
+ .tab-content-wrapper .optional-settings-button span {
732
+ text-transform: uppercase;
733
+ color: #7FAD45 ;
734
+ font-size: 14px;
735
+ cursor: default;
736
+ }
737
+
738
+ .tab-content-wrapper .optional-settings-button span {
739
+ background: no-repeat left center url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='8' viewBox='0 0 13 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11.34 0.590027L6.75 5.17003L2.16 0.590027L0.75 2.00003L6.75 8.00003L12.75 2.00003L11.34 0.590027Z' fill='%23212121'/%3e%3c/svg%3e ");
740
+ padding-left: 2em;
741
+ cursor: pointer;
742
+ }
743
+
744
+ .tab-content-wrapper .optional-settings-button span.active {
745
+ background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='8' viewBox='0 0 13 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2.16 7.40997L6.75 2.82997L11.34 7.40997L12.75 5.99997L6.75 -2.61783e-05L0.75 5.99997L2.16 7.40997Z' fill='%23212121'/%3e%3c/svg%3e ");
746
+ }
747
+
748
+ .tab-content-wrapper .optional-settings-content {
749
+ display: block;
750
+ }
751
+
752
+ /* Old styles from tabs.php */
753
+
754
+ #sync-status-message strong,
755
+ #http-worker-deprecated-message strong {
756
+ font-weight:inherit;
757
+ }
758
+
759
+ .view-log-select {
760
+ width: 100%;
761
+ display: inline-block;
762
+ }
763
+
764
+ .log-file-actions {
765
+ display: flex;
766
+ justify-content: space-around;
767
+ align-items: stretch;
768
+ }
769
+
770
+ #log-actions {
771
+ float: left;
772
+ flex: 0 0 120px;
773
+ margin-right: 20px;
774
+ }
775
+
776
+ .view-log-submit {
777
+ width: 15%;
778
+ display: inline-block;
779
+ }
780
+
781
+ #log-viewer {
782
+ background: #fff;
783
+ border: 1px solid #e5e5e5;
784
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
785
+ text-align: center;
786
+ }
787
+
788
+ #log-viewer pre {
789
+ font-family: monospace;
790
+ white-space: pre-wrap;
791
+ }
792
+
793
+ #log-viewer #log-header {
794
+ border-bottom: 1px solid #e5e5e5;
795
+ padding: 15px 20px;
796
+ }
797
+
798
+ #log-viewer #log-content {
799
+ height: 500px;
800
+ padding: 15px 20px;
801
+ width: 100%;
802
+ background-color: white;
803
+ color: #444;
804
+ font-family: monospace;
805
+ white-space: pre-wrap;
806
+ font-size: 1em;
807
+
808
+ }
809
+
810
+ #log-viewer #log-content:focus {
811
+ outline: none;
812
+ box-shadow: none !important;
813
+ }
814
+
815
+ #log-viewer .spinner {
816
+ float:none;
817
+ background-size: 16px 16px;
818
+ width: 16px;
819
+ height: 16px;
820
+ margin: 30px 10px
821
+ }
822
+
823
+ /* account create modal */
824
+ #mc-woocommerce-create-account-link {
825
+ padding-top: 20px;
826
+ }
827
+
828
+ .mc-woocommerce-modal {
829
+ width: 100%;
830
+ display: flex;
831
+ align-items: center;
832
+ justify-content: center;
833
+ position: absolute;
834
+ left: 0;
835
+ visibility: hidden;
836
+ display: none;
837
+ padding-top: 20px;
838
+ /* background: red;
839
+ opacity: 0.5; */
840
+ }
841
+
842
+ #mc-woocommerce-support-form {
843
+ bottom:0px;
844
+ padding-bottom: 20px;
845
+ }
846
+
847
+ #mc-woocommerce-create-account {
848
+ top:50px;
849
+ }
850
+
851
+ .mc-woocommerce-modal .terms {
852
+ padding-top: 20px;
853
+ padding-bottom: 20px;
854
+ }
855
+
856
+ .mc-woocommerce-modal .terms a {
857
+ color: #7FAD45 !important;
858
+ }
859
+
860
+ .mc-woocommerce-modal h3 {
861
+ padding-bottom: 20px;
862
+ }
863
+
864
+ .mc-woocommerce-modal .notices {
865
+ background:#fff;
866
+ border-left: 4px solid#fff;
867
+ border-left-color: rgb(255, 255, 255);
868
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
869
+ margin: 5px 15px 2px;
870
+ padding: 1px 12px;
871
+ padding-right: 12px;
872
+ }
873
+
874
+ #mc-woocommerce-create-account:target,
875
+ #mc-woocommerce-support-form:target {
876
+ visibility: visible;
877
+ display: block;
878
+ }
879
+
880
+ .mc-woocommerce-modal .reveal-modal {
881
+ position: relative;
882
+ margin: 0 auto;
883
+ width: 70%;
884
+ max-width: 580px;
885
+ background-color: #ffffff;
886
+ box-shadow: 5px 10px 40px rgba(0, 0, 0, 0.1);
887
+ font-family: proxima-nova, Arial, Helvetica, sans-serif;
888
+ line-height: 17px;
889
+ }
890
+
891
+ .mc-woocommerce-modal .close-modal {
892
+ position: absolute;
893
+ left: 10px;
894
+ top: 10px;
895
+ }
896
+
897
+ .mc-woocommerce-modal .modal-header {
898
+ text-align: center;
899
+ padding-top: 30px;
900
+ }
901
+
902
+ #mc-woocommerce-support-form .modal-header svg{
903
+ display: inline;
904
+ }
905
+
906
+ #mc-woocommerce-support-form .modal-header h3{
907
+ text-align: center;
908
+ padding: 0px 0 20px 30px;
909
+ font-size: 2em;
910
+ display: inline-block;
911
+ }
912
+
913
+ .mc-woocommerce-modal .modal-header h3{
914
+ text-align: center;
915
+ padding-top: 30px;
916
+ font-size: 2em;
917
+ }
918
+
919
+ #mc-woocommerce-support-form h3{
920
+ padding-bottom: 0;
921
+ }
922
+
923
+ .mc-woocommerce-modal .modal-footer {
924
+ padding: 35px;
925
+ bottom: 0px;
926
+ color: #B0B4BD;
927
+ font-size: 10px;
928
+ }
929
+
930
+ .mc-woocommerce-create-account-step {
931
+ padding: 5px 35px 10px 35px;
932
+ }
933
+
934
+ #mc-woocommerce-create-account-step-2 {
935
+ display: none;
936
+ }
937
+
938
+ .mc-woocommerce-create-account-step .spinner{
939
+ float:right;
940
+ background-size: 16px 16px;
941
+ width: 16px;
942
+ height: 16px;
943
+ margin: 15px 10px;
944
+ }
945
+
946
+ .mc-woocommerce-create-account-step-error p{
947
+ display: none;
948
+
949
+ background:#fff;
950
+ border-left: 4px solid#fff;
951
+ border-left-color: red;
952
+ box-shadow: 1px 1px 1px 1px rgba(0,0,0,.1);
953
+ margin: 5px 15px 2px;
954
+ padding: 4px 12px;
955
+ padding-right: 12px;
956
+ }
957
+
958
+ .mc-woocommerce-create-account-step-error #connecting,
959
+ .mc-woocommerce-create-account-step-error #success{
960
+ border-left-color: #7FAD45;
961
+ }
962
+
963
+ .mc-woocommerce-create-account-step #username_suggestion {
964
+ visibility: hidden;
965
+ }
966
+
967
+ .mc-woocommerce-create-account-step #username_suggestion span{
968
+ color: #7FAD45;
969
+ text-decoration: none;
970
+ cursor: pointer;
971
+ }
972
+
973
+ .mc-woocommerce-create-account-step #username_suggestion span:hover{
974
+ text-decoration: underline;
975
+ }
976
+
977
+ .mc-woocommerce-create-account-step .whitebtn{
978
+ color: #3C3C3C !important;
979
+ background: white !important;
980
+ box-shadow: 0 1px 0 #E6E6E6 !important;
981
+ text-shadow: 0 -1px 1px #E6E6E6,1px 0 1px #E6E6E6,0 1px 1px #E6E6E6,-1px 0 1px #E6E6E6 !important;
982
+ border: 1px solid #E6E6E6 !important;
983
+ }
984
+
985
+ #mc-woocommerce-create-account-next {
986
+ }
987
+
988
+ #mc-woocommerce-create-account-prev {
989
+ float: none;
990
+ }
991
+
992
+ #mc-woocommerce-create-account-step-1 .tab-content-submit:hover{
993
+ background: #F7F7F7;
994
+ }
995
+
996
+ #mc-woocommerce-create-account-step-1 ul{
997
+ list-style: disc !important;
998
+ margin-left: 13px;
999
+ }
1000
+
1001
+
1002
+ @media screen and (max-width: 782px) {
1003
+ .tab-content-submit,
1004
+ .mc-woocommerce-resync-button {
1005
+ padding: 15px 35px 15px 35px !important;
1006
+ }
1007
+
1008
+ .log-file-actions {
1009
+ display: block;
1010
+ }
1011
+
1012
+ #log-actions {
1013
+ float: left;
1014
+ }
1015
+
1016
+ .tab-content-wrapper form{
1017
+ padding: 1em;
1018
+ }
1019
+
1020
+ .tab-content-wrapper .mailchimp-select-wrapper select {
1021
+
1022
+ font-size: 16px;
1023
+ line-height: 32px;
1024
+ }
1025
+ .tab-content-wrapper .box.box-half,
1026
+ .tab-content-wrapper .box.box-third,
1027
+ .sync-comm-wrapper .box.box-half,
1028
+ .sync-more-wrapper .box.box-half {
1029
+ width: 100%;
1030
+ }
1031
+
1032
+ .sync-more-wrapper .box.box-half:last-child {
1033
+ margin-top: 26px;
1034
+ }
1035
+
1036
+ .sync-content-wrapper .sync-stats-wrapper {
1037
+ display: block;
1038
+ position:relative;
1039
+ margin-bottom: 2em;
1040
+ margin-left: 0;
1041
+ }
1042
+
1043
+ .sync-content-wrapper .sync-stats-content-wrapper {
1044
+ margin-left: 0;
1045
+ width: 100%;
1046
+ margin: 0;
1047
+ }
1048
+
1049
+ .sync-content-wrapper .sync-stats-wrapper .sync-stats-card-content{
1050
+ margin-left: 0;
1051
+ margin-bottom: 0;
1052
+ }
1053
+
1054
+ .sync-content-wrapper .sync-controls-wrapper {
1055
+ display: block;
1056
+ width: 100%;
1057
+ position:relative;
1058
+ }
1059
+
1060
+ .sync-content-wrapper .sync-controls .mc-woocommerce-last-sync{
1061
+ margin-top: 3em;
1062
+ }
1063
+
1064
+
1065
+ .sync-content-wrapper .sync-controls .spinner {
1066
+ margin: -3px 10px 0 5px;
1067
+ }
1068
+
1069
+ .sync-comm-wrapper {
1070
+ padding-bottom: 20px;
1071
+ }
1072
+
1073
+ .view-log-select,
1074
+ .view-log-submit {
1075
+ width: 100%;
1076
+ display: block;
1077
+ margin-bottom: 1em;
1078
+ }
1079
+
1080
+ #mc-woocommerce-create-account {
1081
+ padding-top: 60px;
1082
+ }
1083
+ #mc-woocommerce-create-account .reveal-modal{
1084
+ width: 80%;
1085
+ }
1086
+
1087
+ }
1088
+
1089
+
1090
+ @media screen and (max-width: 482px) {
1091
+ .nav-tab-wrapper {
1092
+ border-bottom: none !important;
1093
+ }
1094
+ .nav-tab {
1095
+ width: 100%;
1096
+ padding: 2em 0 !important;
1097
+ margin-left: 0;
1098
+ border: none;
1099
+ border-bottom: 1px solid white !important;
1100
+ -webkit-border-radius: 0 !important;
1101
+ -moz-border-radius: 0 !important;
1102
+ border-radius: 0 !important;
1103
+ }
1104
+
1105
+ .nav-tab:last-child {
1106
+ border: none;
1107
+ }
1108
+
1109
+ .nav-tab.nav-tab-active {
1110
+ border: 1px solid white !important;
1111
+ }
1112
+ .disconnect-button {
1113
+ margin: 0.5em 0em !important;
1114
+ }
1115
+
1116
+ #mc-woocommerce-create-account .reveal-modal{
1117
+ width: 100%;
1118
+ }
1119
+
1120
+ .mc-woocommerce-create-account-step {
1121
+ padding: 5px 5px 10px 5px;
1122
+ }
1123
+ }
admin/partials/tabs/campaign_defaults.php CHANGED
@@ -51,9 +51,9 @@ if (!$handler->hasValidStoreInfo()) {
51
 
52
  <div class="mailchimp-select-wrapper">
53
  <select id="<?php echo $this->plugin_name; ?>-campaign-language-label" name="<?php echo $this->plugin_name; ?>[campaign_language]" required>
54
- <?php $selected_locale = isset($options['campaign_language']) && !empty($options['campaign_language']) ? $options['campaign_language'] : 'en'; ?>
55
  <?php
56
- foreach(MailChimp_Api_Locales::simple() as $locale_key => $local_value) {
57
  echo '<option value="' . esc_attr( $locale_key ) . '" ' . selected($locale_key === $selected_locale, true, false ) . '>' . esc_html( $local_value ) . '</option>';
58
  }
59
  ?>
51
 
52
  <div class="mailchimp-select-wrapper">
53
  <select id="<?php echo $this->plugin_name; ?>-campaign-language-label" name="<?php echo $this->plugin_name; ?>[campaign_language]" required>
54
+ <?php $selected_locale = isset($options['store_locale']) && !empty($options['store_locale']) ? $options['store_locale'] : get_locale(); ?> ?>
55
  <?php
56
+ foreach(MailChimp_Api_Locales::all() as $locale_key => $local_value) {
57
  echo '<option value="' . esc_attr( $locale_key ) . '" ' . selected($locale_key === $selected_locale, true, false ) . '>' . esc_html( $local_value ) . '</option>';
58
  }
59
  ?>
admin/partials/tabs/store_info.php CHANGED
@@ -8,9 +8,15 @@ if (!$handler->hasValidApiKey()) {
8
  }
9
 
10
  ?>
11
- <input type="hidden" name="mailchimp_active_settings_tab" value="store_info"/>
12
-
13
  <fieldset class="">
 
 
 
 
 
 
 
 
14
  <legend class="screen-reader-text">
15
  <span><?php esc_html_e('Store Settings', 'mailchimp-for-woocommerce');?></span>
16
  </legend>
@@ -98,56 +104,52 @@ if (!$handler->hasValidApiKey()) {
98
  </div>
99
 
100
  <div class="box fieldset-header" >
101
- <h3 style="padding-top: 1em;"><?= __('Locale Settings', 'mailchimp-for-woocommerce');?></h3>
102
- <br/>
103
- <p><?= __('Please apply your locale settings. If you\'re unsure about these, use the defaults.', 'mailchimp-for-woocommerce');?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  </div>
105
 
106
  <div class="box box-half" >
 
107
  <label for="<?php echo $this->plugin_name; ?>-store-locale-label">
108
  <span><?php esc_html_e('Locale', 'mailchimp-for-woocommerce'); ?></span>
109
  <span class="required-field-mark">*</span>
 
110
  </label>
 
 
 
111
  <div class="mailchimp-select-wrapper">
112
  <select name="<?php echo $this->plugin_name; ?>[store_locale]" required>
113
  <option disabled selected value="<?= __('','mailchimp-for-woocommerce')?>"><?= __("Select store's locale",'mailchimp-for-woocommerce')?></option>
114
- <?php $selected_locale = isset($options['store_locale']) && !empty($options['store_locale']) ? $options['store_locale'] : substr(get_locale(), 0, 2); ?>
115
- <?php foreach(MailChimp_Api_Locales::simple() as $locale_key => $local_value) : ?>
 
116
  <option value="<?php echo esc_attr( $locale_key ) . '" ' . selected($locale_key === $selected_locale, true, false ); ?>"> <?php esc_html_e( $local_value ) ?> </option>;
117
  <?php endforeach;?>
118
  </select>
119
  </div>
120
- </div>
121
-
122
- <div class="box box-half" >
123
- <?php
124
- $current_currency = isset($options['store_currency_code']) ? $options['store_currency_code'] : get_woocommerce_currency();
125
- $current_currency_data = MailChimp_WooCommerce_CurrencyCodes::getCurrency($current_currency);
126
- ?>
127
- <label for="<?php echo $this->plugin_name; ?>-store-currency-code-label">
128
- <span><?php esc_html_e('Woocommerce Currency', 'mailchimp-for-woocommerce'); ?></span>
129
- </label>
130
- <input type="text" value="<?php echo isset($current_currency_data) ? $current_currency . ' | ' . $current_currency_data['name']: $current_currency ?>" disabled/>
131
  </div>
132
 
133
  <div class="box" >
134
- <label for="<?php echo $this->plugin_name; ?>-store-timezone-label">
135
- <span><?php esc_html_e('Timezone', 'mailchimp-for-woocommerce'); ?></span>
136
- <span class="required-field-mark">*</span>
137
- </label>
138
- <div class="mailchimp-select-wrapper">
139
- <select name="<?php echo $this->plugin_name; ?>[store_timezone]" required>
140
- <option disabled selected value="<?= __('','mailchimp-for-woocommerce')?>"><?= __("Select store's timezone",'mailchimp-for-woocommerce')?></option>
141
- <?php $selected_timezone = isset($options['store_timezone']) && !empty($options['store_timezone']) ? $options['store_timezone'] : get_option('timezone_string'); ?>
142
- <?php
143
- foreach(mailchimp_get_timezone_list() as $t) {
144
- echo '<option value="' . esc_attr( $t['zone'] ) . '" ' . selected($t['zone'] === $selected_timezone, true, false ) . '>' . esc_html( $t['diff_from_GMT'] . ' - ' . $t['zone'] ) . '</option>';
145
- }
146
- ?>
147
- </select>
148
- </div>
149
  </div>
150
-
151
  <?php
152
  // Only admins should see mailchimp_permission_cap radio buttons
153
  if (current_user_can('manage_options')) : ?>
8
  }
9
 
10
  ?>
 
 
11
  <fieldset class="">
12
+ <input type="hidden" name="mailchimp_active_settings_tab" value="store_info"/>
13
+ <?php
14
+ $current_currency = isset($options['store_currency_code']) ? $options['store_currency_code'] : get_woocommerce_currency();
15
+ $current_currency_data = MailChimp_WooCommerce_CurrencyCodes::getCurrency($current_currency);
16
+ ?>
17
+ <input type="hidden" value="<?php echo isset($current_currency_data) ? $current_currency . ' | ' . $current_currency_data['name']: $current_currency ?>" disabled/>
18
+ <input type="hidden" value="<?php echo mailchimp_get_timezone(true)?>" disabled/>
19
+
20
  <legend class="screen-reader-text">
21
  <span><?php esc_html_e('Store Settings', 'mailchimp-for-woocommerce');?></span>
22
  </legend>
104
  </div>
105
 
106
  <div class="box fieldset-header" >
107
+ <h3 style="padding-top: 1em;"><?= __('Locale Settings', 'mailchimp-for-woocommerce');?></h3>
108
+ </div>
109
+
110
+ <div class="box" >
111
+ <p>
112
+ <?php
113
+
114
+ echo sprintf(
115
+ /* translators: %1$s - The Currency name and format (ex: USD | US Dollar) %2$s - Timezone name or offset (ex: America/New_York or UTC-4:00) %3$s and %5$s- <a> tag open %4$s - </a> tag close*/
116
+ __('We\'ve detected that your WooCommerce store\'s currency is <b>%1$s</b> (%3$schange%4$s), and the WordPress timezone is <b>%2$s</b> (%5$schange%4$s). <br/>.', 'mailchimp-for-woocommerce'),
117
+ isset($current_currency_data) ? $current_currency . ' | ' . $current_currency_data['name']: $current_currency,
118
+ mailchimp_get_timezone(true),
119
+ '<a href="' . admin_url( 'options-general.php') .'" title="'.__( 'WooCommerce Settings' ).'">',
120
+ '</a>',
121
+ '<a href="' . admin_url( 'admin.php/?page=wc-settings') .'" title="'.__( 'General Settings' ).'">'
122
+ );
123
+ ?>
124
+ </p>
125
  </div>
126
 
127
  <div class="box box-half" >
128
+
129
  <label for="<?php echo $this->plugin_name; ?>-store-locale-label">
130
  <span><?php esc_html_e('Locale', 'mailchimp-for-woocommerce'); ?></span>
131
  <span class="required-field-mark">*</span>
132
+ <p><?= __('Please apply your locale settings. If you\'re unsure about these, use the defaults.', 'mailchimp-for-woocommerce');?></p>
133
  </label>
134
+
135
+ </div>
136
+ <div class="box box-half" >
137
  <div class="mailchimp-select-wrapper">
138
  <select name="<?php echo $this->plugin_name; ?>[store_locale]" required>
139
  <option disabled selected value="<?= __('','mailchimp-for-woocommerce')?>"><?= __("Select store's locale",'mailchimp-for-woocommerce')?></option>
140
+ <?php
141
+ $selected_locale = isset($options['store_locale']) && !empty($options['store_locale']) ? $options['store_locale'] : get_locale(); ?>
142
+ <?php foreach(MailChimp_Api_Locales::all() as $locale_key => $local_value) : ?>
143
  <option value="<?php echo esc_attr( $locale_key ) . '" ' . selected($locale_key === $selected_locale, true, false ); ?>"> <?php esc_html_e( $local_value ) ?> </option>;
144
  <?php endforeach;?>
145
  </select>
146
  </div>
147
+
 
 
 
 
 
 
 
 
 
 
148
  </div>
149
 
150
  <div class="box" >
151
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  </div>
 
153
  <?php
154
  // Only admins should see mailchimp_permission_cap radio buttons
155
  if (current_user_can('manage_options')) : ?>
bootstrap.php CHANGED
@@ -87,7 +87,7 @@ function mailchimp_environment_variables() {
87
  return (object) array(
88
  'repo' => 'master',
89
  'environment' => 'production', // staging or production
90
- 'version' => '2.4.5',
91
  'php_version' => phpversion(),
92
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
93
  'wc_version' => function_exists('WC') ? WC()->version : null,
@@ -415,7 +415,8 @@ function mailchimp_date_utc($date) {
415
  * @return DateTime
416
  */
417
  function mailchimp_date_local($date) {
418
- $timezone = mailchimp_get_option('store_timezone', 'America/New_York');
 
419
  if (is_numeric($date)) {
420
  $stamp = $date;
421
  $date = new \DateTime('now', new DateTimeZone('UTC'));
@@ -463,6 +464,36 @@ function mailchimp_get_timezone_list() {
463
  return $zones_array;
464
  }
465
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
466
  /**
467
  * @return bool
468
  */
@@ -1115,6 +1146,17 @@ function mailchimp_remove_communication_status() {
1115
  }
1116
  }
1117
 
 
 
 
 
 
 
 
 
 
 
 
1118
  // Print notices outside woocommerce admin bar
1119
  function mailchimp_settings_errors() {
1120
  $settings_errors = get_settings_errors();
@@ -1134,29 +1176,45 @@ function mailchimp_settings_errors() {
1134
  * @throws MailChimp_WooCommerce_Error
1135
  * @throws MailChimp_WooCommerce_ServerError
1136
  */
1137
- function mailchimp_member_language_update($user_email = null, $language = null, $caller = '', $status_if_new = 'transactional', $order = null) {
1138
- mailchimp_debug('debug', "mailchimp_member_language_update", array(
1139
  'user_email' => $user_email,
1140
  'user_language' => $language,
1141
  'caller' => $caller,
1142
  'status_if_new' => $status_if_new,
1143
  ));
1144
  if (!$user_email) return;
 
1145
  $hash = md5(strtolower(trim($user_email)));
 
 
1146
  if ($caller !== 'cart' || !mailchimp_get_transient($caller . ".member.{$hash}")) {
1147
  $list_id = mailchimp_get_list_id();
1148
  try {
1149
  // try to get the member to update if already synced
1150
  $member = mailchimp_get_api()->member($list_id, $user_email);
1151
- // update member with new language
1152
  // if the member's subscriber status was transactional - and if we're passing in either one of these options below,
1153
  // we can attach the new status to the member.
 
 
1154
  if ($member['status'] === 'transactional' && in_array($status_if_new, array('subscribed', 'pending'))) {
1155
  $member['status'] = $status_if_new;
1156
  }
 
 
 
 
 
 
 
 
 
 
 
1157
  $merge_fields = $order ? apply_filters('mailchimp_get_ecommerce_merge_tags', array(), $order) : array();
1158
  if (!is_array($merge_fields)) $merge_fields = array();
1159
- mailchimp_get_api()->update($list_id, $user_email, $member['status'], $merge_fields, null, $language);
1160
  // set transient to prevent too many calls to update language
1161
  mailchimp_set_transient($caller . ".member.{$hash}", true, 3600);
1162
  mailchimp_log($caller . '.member.updated', "Updated {$user_email} subscriber status to {$member['status']} and language to {$language}");
87
  return (object) array(
88
  'repo' => 'master',
89
  'environment' => 'production', // staging or production
90
+ 'version' => '2.4.6',
91
  'php_version' => phpversion(),
92
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
93
  'wc_version' => function_exists('WC') ? WC()->version : null,
415
  * @return DateTime
416
  */
417
  function mailchimp_date_local($date) {
418
+ $timezone = str_replace(':', '', mailchimp_get_timezone());
419
+
420
  if (is_numeric($date)) {
421
  $stamp = $date;
422
  $date = new \DateTime('now', new DateTimeZone('UTC'));
464
  return $zones_array;
465
  }
466
 
467
+ /**
468
+ * Gets the current tomezone from wordpress settings
469
+ *
470
+ * @return String timezone
471
+ */
472
+ function mailchimp_get_timezone($humanReadable = false) {
473
+ // get timezone data from options
474
+ $timezone_string = get_option( 'timezone_string' );
475
+ $offset = get_option( 'gmt_offset' );
476
+
477
+ $signal = ($offset <=> 0 ) < 0 ? "-" : "+";
478
+ $offset = sprintf('%1s%02d:%02d', $signal, abs((int) $offset), abs(fmod($offset, 1) * 60));
479
+
480
+ // shows timezone name + offset in hours and minutes, or only the timezone name. If no timezone string is set, show only offset
481
+ if (!$humanReadable && $timezone_string) {
482
+ $timezone = $timezone_string;
483
+ }
484
+ else if ($humanReadable && $timezone_string) {
485
+ $timezone = "UTC" . $offset .' '. $timezone_string;
486
+ }
487
+ else if ($humanReadable && !$timezone_string) {
488
+ $timezone = "UTC" . $offset;
489
+ }
490
+ else if (!$timezone_string) {
491
+ $timezone = $offset;
492
+ }
493
+
494
+ return $timezone;
495
+ }
496
+
497
  /**
498
  * @return bool
499
  */
1146
  }
1147
  }
1148
 
1149
+ /**
1150
+ * Removes any Woocommece inbox notes this plugin created.
1151
+ */
1152
+ function mailchimp_remove_activity_panel_inbox_notes() {
1153
+ if ( ! class_exists( '\Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes' ) ) {
1154
+ return;
1155
+ }
1156
+
1157
+ \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes::delete_notes_with_name( 'mailchimp-for-woocommerce-incomplete-install' );
1158
+ }
1159
+
1160
  // Print notices outside woocommerce admin bar
1161
  function mailchimp_settings_errors() {
1162
  $settings_errors = get_settings_errors();
1176
  * @throws MailChimp_WooCommerce_Error
1177
  * @throws MailChimp_WooCommerce_ServerError
1178
  */
1179
+ function mailchimp_member_data_update($user_email = null, $language = null, $caller = '', $status_if_new = 'transactional', $order = null, $gdpr_fields = null) {
1180
+ mailchimp_debug('debug', "mailchimp_member_data_update", array(
1181
  'user_email' => $user_email,
1182
  'user_language' => $language,
1183
  'caller' => $caller,
1184
  'status_if_new' => $status_if_new,
1185
  ));
1186
  if (!$user_email) return;
1187
+
1188
  $hash = md5(strtolower(trim($user_email)));
1189
+ $gdpr_fields_to_save = null;
1190
+
1191
  if ($caller !== 'cart' || !mailchimp_get_transient($caller . ".member.{$hash}")) {
1192
  $list_id = mailchimp_get_list_id();
1193
  try {
1194
  // try to get the member to update if already synced
1195
  $member = mailchimp_get_api()->member($list_id, $user_email);
1196
+ // update member with new data
1197
  // if the member's subscriber status was transactional - and if we're passing in either one of these options below,
1198
  // we can attach the new status to the member.
1199
+
1200
+
1201
  if ($member['status'] === 'transactional' && in_array($status_if_new, array('subscribed', 'pending'))) {
1202
  $member['status'] = $status_if_new;
1203
  }
1204
+
1205
+ if (($member['status'] === 'transactional' && in_array($status_if_new, array('subscribed', 'pending'))) || $member['status'] === 'subscribed') {
1206
+ if (!empty($gdpr_fields)) {
1207
+ $gdpr_fields_to_save = [];
1208
+ foreach ($gdpr_fields as $id => $value) {
1209
+ $gdpr_field['marketing_permission_id'] = $id;
1210
+ $gdpr_field['enabled'] = (bool) $value;
1211
+ $gdpr_fields_to_save[] = $gdpr_field;
1212
+ }
1213
+ }
1214
+ }
1215
  $merge_fields = $order ? apply_filters('mailchimp_get_ecommerce_merge_tags', array(), $order) : array();
1216
  if (!is_array($merge_fields)) $merge_fields = array();
1217
+ mailchimp_get_api()->update($list_id, $user_email, $member['status'], $merge_fields, null, $language, $gdpr_fields_to_save);
1218
  // set transient to prevent too many calls to update language
1219
  mailchimp_set_transient($caller . ".member.{$hash}", true, 3600);
1220
  mailchimp_log($caller . '.member.updated', "Updated {$user_email} subscriber status to {$member['status']} and language to {$language}");
includes/api/class-mailchimp-api.php CHANGED
@@ -196,7 +196,7 @@ class MailChimp_WooCommerce_MailChimpApi
196
  * @throws MailChimp_WooCommerce_Error
197
  * @throws MailChimp_WooCommerce_ServerError
198
  */
199
- public function subscribe($list_id, $email, $subscribed = true, $merge_fields = array(), $list_interests = array(), $language = null)
200
  {
201
  if (is_string($subscribed)) {
202
  $status = $subscribed;
@@ -215,7 +215,8 @@ class MailChimp_WooCommerce_MailChimpApi
215
  'status' => $status,
216
  'merge_fields' => $merge_fields,
217
  'interests' => $list_interests,
218
- 'language' => $language
 
219
  );
220
 
221
  if (empty($data['merge_fields'])) {
@@ -229,6 +230,10 @@ class MailChimp_WooCommerce_MailChimpApi
229
  if (empty($data['language'])) {
230
  unset($data['language']);
231
  }
 
 
 
 
232
 
233
  mailchimp_debug('api.subscribe', "Subscribing {$email}", $data);
234
 
@@ -245,7 +250,7 @@ class MailChimp_WooCommerce_MailChimpApi
245
  * @throws Exception
246
  * @throws MailChimp_WooCommerce_Error
247
  */
248
- public function update($list_id, $email, $subscribed = true, $merge_fields = array(), $list_interests = array(), $language = null)
249
  {
250
  $hash = md5(strtolower(trim($email)));
251
 
@@ -264,7 +269,8 @@ class MailChimp_WooCommerce_MailChimpApi
264
  'status' => $status,
265
  'merge_fields' => $merge_fields,
266
  'interests' => $list_interests,
267
- 'language' => $language
 
268
  );
269
 
270
  if (empty($data['merge_fields'])) {
@@ -279,6 +285,10 @@ class MailChimp_WooCommerce_MailChimpApi
279
  unset($data['language']);
280
  }
281
 
 
 
 
 
282
  mailchimp_debug('api.update_member', "Updating {$email}", $data);
283
 
284
  return $this->patch("lists/$list_id/members/$hash?skip_merge_validation=true", $data);
@@ -1575,6 +1585,50 @@ class MailChimp_WooCommerce_MailChimpApi
1575
  return true;
1576
  }
1577
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1578
  /**
1579
  * @param $url
1580
  * @param null $params
196
  * @throws MailChimp_WooCommerce_Error
197
  * @throws MailChimp_WooCommerce_ServerError
198
  */
199
+ public function subscribe($list_id, $email, $subscribed = true, $merge_fields = array(), $list_interests = array(), $language = null, $gdpr_fields = null)
200
  {
201
  if (is_string($subscribed)) {
202
  $status = $subscribed;
215
  'status' => $status,
216
  'merge_fields' => $merge_fields,
217
  'interests' => $list_interests,
218
+ 'language' => $language,
219
+ 'marketing_permissions' => $gdpr_fields,
220
  );
221
 
222
  if (empty($data['merge_fields'])) {
230
  if (empty($data['language'])) {
231
  unset($data['language']);
232
  }
233
+
234
+ if (empty($data['marketing_permissions'])) {
235
+ unset($data['marketing_permissions']);
236
+ }
237
 
238
  mailchimp_debug('api.subscribe', "Subscribing {$email}", $data);
239
 
250
  * @throws Exception
251
  * @throws MailChimp_WooCommerce_Error
252
  */
253
+ public function update($list_id, $email, $subscribed = true, $merge_fields = array(), $list_interests = array(), $language = null, $gdpr_fields = null)
254
  {
255
  $hash = md5(strtolower(trim($email)));
256
 
269
  'status' => $status,
270
  'merge_fields' => $merge_fields,
271
  'interests' => $list_interests,
272
+ 'language' => $language,
273
+ 'marketing_permissions' => $gdpr_fields,
274
  );
275
 
276
  if (empty($data['merge_fields'])) {
285
  unset($data['language']);
286
  }
287
 
288
+ if (empty($data['marketing_permissions'])) {
289
+ unset($data['marketing_permissions']);
290
+ }
291
+
292
  mailchimp_debug('api.update_member', "Updating {$email}", $data);
293
 
294
  return $this->patch("lists/$list_id/members/$hash?skip_merge_validation=true", $data);
1585
  return true;
1586
  }
1587
 
1588
+ /**
1589
+ * @param string $list_id
1590
+ * @param int $minutes
1591
+ * @return false|mixed
1592
+ */
1593
+ public function getCachedGDPRFields($list_id, $minutes = 5)
1594
+ {
1595
+ $transient = "mailchimp-woocommerce-gdpr-fields.{$list_id}";
1596
+ $GDPRfields = get_site_transient($transient);
1597
+
1598
+ // only return the values if it's a false - or an array
1599
+ if (is_array($GDPRfields)) return $GDPRfields;
1600
+
1601
+ try {
1602
+ $GDPRfields = $this->getGDPRFields($list_id);
1603
+ set_site_transient($transient, $GDPRfields, 60 * $minutes);
1604
+ } catch (\Exception $e) {
1605
+ $GDPRfields = array();
1606
+ }
1607
+
1608
+ return $GDPRfields;
1609
+ }
1610
+
1611
+
1612
+ /**
1613
+ * @param string $list_id
1614
+ * @param int $minutes
1615
+ * @return false|mixed
1616
+ */
1617
+ public function getGDPRFields($list_id)
1618
+ {
1619
+ $one_member = $this->get("lists/$list_id/members?fields=members.marketing_permissions&count=1");
1620
+ $fields = false;
1621
+
1622
+ if (is_array($one_member) &&
1623
+ isset($one_member['members']) &&
1624
+ isset($one_member['members'][0]) &&
1625
+ isset($one_member['members'][0]['marketing_permissions'])) {
1626
+ $fields = $one_member['members'][0]['marketing_permissions'];
1627
+ }
1628
+
1629
+ return $fields;
1630
+ }
1631
+
1632
  /**
1633
  * @param $url
1634
  * @param null $params
includes/class-mailchimp-woocommerce-newsletter.php CHANGED
@@ -33,6 +33,10 @@ class MailChimp_Newsletter extends MailChimp_WooCommerce_Options
33
  public function applyNewsletterField($checkout)
34
  {
35
  if (!is_admin()) {
 
 
 
 
36
 
37
  // if the user has chosen to hide the checkbox, don't do anything.
38
  if (($default_setting = $this->getOption('mailchimp_checkbox_defaults', 'check')) === 'hide') {
@@ -59,13 +63,32 @@ class MailChimp_Newsletter extends MailChimp_WooCommerce_Options
59
  }
60
  }
61
 
62
- // echo out the checkbox.
63
  $checkbox = '<p class="form-row form-row-wide mailchimp-newsletter">';
64
  $checkbox .= '<input class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" id="mailchimp_woocommerce_newsletter" type="checkbox" name="mailchimp_woocommerce_newsletter" value="1"'.($status ? ' checked="checked"' : '').'> ';
65
  $checkbox .= '<label for="mailchimp_woocommerce_newsletter" class="woocommerce-form__label woocommerce-form__label-for-checkbox inline"><span>' . $label . '</span></label>';
66
  $checkbox .= '</p>';
67
  $checkbox .= '<div class="clear"></div>';
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  echo apply_filters( 'mailchimp_woocommerce_newsletter_field', $checkbox, $status, $label);
70
  }
71
  }
33
  public function applyNewsletterField($checkout)
34
  {
35
  if (!is_admin()) {
36
+ $api = mailchimp_get_api();
37
+
38
+ // get the gdpr fields from the cache - or call it again and save for 5 minutes.
39
+ $GDPRfields = $api->getCachedGDPRFields(mailchimp_get_list_id(), 5);
40
 
41
  // if the user has chosen to hide the checkbox, don't do anything.
42
  if (($default_setting = $this->getOption('mailchimp_checkbox_defaults', 'check')) === 'hide') {
63
  }
64
  }
65
 
66
+ // echo out the subscription checkbox.
67
  $checkbox = '<p class="form-row form-row-wide mailchimp-newsletter">';
68
  $checkbox .= '<input class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" id="mailchimp_woocommerce_newsletter" type="checkbox" name="mailchimp_woocommerce_newsletter" value="1"'.($status ? ' checked="checked"' : '').'> ';
69
  $checkbox .= '<label for="mailchimp_woocommerce_newsletter" class="woocommerce-form__label woocommerce-form__label-for-checkbox inline"><span>' . $label . '</span></label>';
70
  $checkbox .= '</p>';
71
  $checkbox .= '<div class="clear"></div>';
72
 
73
+ // only render these fields if it's an array that has valid data.
74
+ if (!empty($GDPRfields) && is_array($GDPRfields)) {
75
+ $checkbox .= "<div id='mailchimp-gdpr-fields'><p>";
76
+ $checkbox .= __('Please select all the ways you would like to hear from us', 'mailchimp-for-woocommerce');
77
+ $checkbox .= "<div class='clear'></div>";
78
+
79
+ foreach ($GDPRfields as $key => $field) {
80
+ $marketing_permission_id = $field['marketing_permission_id'];
81
+ $text = $field['text'];
82
+
83
+ // Add to the checkbox output
84
+ $checkbox .= "<input type='hidden' value='0' name='mailchimp_woocommerce_gdpr[{$marketing_permission_id}]'>";
85
+ $checkbox .= "<input class='woocommerce-form__input woocommerce-form__input-checkbox input-checkbox' id='mailchimp_woocommerce_gdpr[{$marketing_permission_id}]' type='checkbox' name='mailchimp_woocommerce_gdpr[{$marketing_permission_id}]' value='1'".($status ? ' checked="checked"' : '').">";
86
+ $checkbox .= "<label for='mailchimp_woocommerce_gdpr[{$marketing_permission_id}]' class='woocommerce-form__label woocommerce-form__label-for-checkbox inline'><span>{$text}</span></label>";
87
+ $checkbox .= "<div class='clear'></div>";
88
+ }
89
+ $checkbox .= "</p></div>";
90
+ }
91
+
92
  echo apply_filters( 'mailchimp_woocommerce_newsletter_field', $checkbox, $status, $label);
93
  }
94
  }
includes/class-mailchimp-woocommerce-rest-api.php CHANGED
@@ -28,26 +28,33 @@ class MailChimp_WooCommerce_Rest_Api
28
  register_rest_route(static::$namespace, "/survey/disconnect", array(
29
  'methods' => 'POST',
30
  'callback' => array($this, 'post_disconnect_survey'),
31
- 'permission_callback' => '__return_true',
32
  ));
33
 
34
  // Sync Stats
35
- if (mailchimp_get_allowed_capability()) {
36
- register_rest_route(static::$namespace, '/sync/stats', array(
37
- 'methods' => 'GET',
38
- 'callback' => array($this, 'get_sync_stats'),
39
- 'permission_callback' => '__return_true',
40
- ));
41
- }
42
 
43
  // remove review banner
44
  register_rest_route(static::$namespace, "/review-banner", array(
45
  'methods' => 'GET',
46
  'callback' => array($this, 'dismiss_review_banner'),
47
- 'permission_callback' => '__return_true',
48
  ));
49
  }
50
 
 
 
 
 
 
 
 
 
 
51
  /**
52
  * @param WP_REST_Request $request
53
  * @return WP_Error|WP_REST_Response
28
  register_rest_route(static::$namespace, "/survey/disconnect", array(
29
  'methods' => 'POST',
30
  'callback' => array($this, 'post_disconnect_survey'),
31
+ 'permission_callback' => array($this, 'permission_callback'),
32
  ));
33
 
34
  // Sync Stats
35
+ register_rest_route(static::$namespace, '/sync/stats', array(
36
+ 'methods' => 'GET',
37
+ 'callback' => array($this, 'get_sync_stats'),
38
+ 'permission_callback' => array($this, 'permission_callback'),
39
+ ));
 
 
40
 
41
  // remove review banner
42
  register_rest_route(static::$namespace, "/review-banner", array(
43
  'methods' => 'GET',
44
  'callback' => array($this, 'dismiss_review_banner'),
45
+ 'permission_callback' => array($this, 'permission_callback'),
46
  ));
47
  }
48
 
49
+ /**
50
+ * @return bool
51
+ */
52
+ public function permission_callback()
53
+ {
54
+ $cap = mailchimp_get_allowed_capability();
55
+ return ($cap === 'manage_woocommerce' || $cap === 'manage_options' );
56
+ }
57
+
58
  /**
59
  * @param WP_REST_Request $request
60
  * @return WP_Error|WP_REST_Response
includes/class-mailchimp-woocommerce-service.php CHANGED
@@ -148,6 +148,9 @@ class MailChimp_Service extends MailChimp_WooCommerce_Options
148
  $campaign_id = isset($tracking) && isset($tracking['campaign_id']) ? $tracking['campaign_id'] : null;
149
  $landing_site = isset($tracking) && isset($tracking['landing_site']) ? $tracking['landing_site'] : null;
150
  $language = $newOrder ? substr( get_locale(), 0, 2 ) : null;
 
 
 
151
 
152
  if (isset($tracking)) {
153
  // update the post meta with campaing tracking details for future sync
@@ -155,7 +158,7 @@ class MailChimp_Service extends MailChimp_WooCommerce_Options
155
  update_post_meta($order_id, 'mailchimp_woocommerce_landing_site', $landing_site);
156
  }
157
 
158
- $handler = new MailChimp_WooCommerce_Single_Order($order_id, null, $campaign_id, $landing_site, $language);
159
  $handler->is_update = $newOrder ? !$newOrder : null;
160
  $handler->is_admin_save = is_admin();
161
 
@@ -375,14 +378,19 @@ class MailChimp_Service extends MailChimp_WooCommerce_Options
375
  {
376
  if (!mailchimp_is_configured()) return;
377
 
378
- $subscribed = (bool) isset($_POST['mailchimp_woocommerce_newsletter']) ?
379
- $_POST['mailchimp_woocommerce_newsletter'] : false;
 
 
 
 
380
 
381
  // update the user meta with the 'is_subscribed' form element
382
  update_user_meta($user_id, 'mailchimp_woocommerce_is_subscribed', $subscribed);
383
 
384
  if ($subscribed) {
385
- mailchimp_handle_or_queue(new MailChimp_WooCommerce_User_Submit($user_id, $subscribed, null));
 
386
  }
387
  }
388
 
@@ -492,8 +500,17 @@ class MailChimp_Service extends MailChimp_WooCommerce_Options
492
  // cookie the current email
493
  @setcookie('mailchimp_user_email', $this->user_email, $cookie_duration, '/' );
494
 
495
- // set the cart data.
496
- $this->setWooSession('cart', unserialize($cart->cart));
 
 
 
 
 
 
 
 
 
497
  }
498
  }
499
 
148
  $campaign_id = isset($tracking) && isset($tracking['campaign_id']) ? $tracking['campaign_id'] : null;
149
  $landing_site = isset($tracking) && isset($tracking['landing_site']) ? $tracking['landing_site'] : null;
150
  $language = $newOrder ? substr( get_locale(), 0, 2 ) : null;
151
+
152
+ $gdpr_fields = isset($_POST['mailchimp_woocommerce_gdpr']) ?
153
+ $_POST['mailchimp_woocommerce_gdpr'] : false;
154
 
155
  if (isset($tracking)) {
156
  // update the post meta with campaing tracking details for future sync
158
  update_post_meta($order_id, 'mailchimp_woocommerce_landing_site', $landing_site);
159
  }
160
 
161
+ $handler = new MailChimp_WooCommerce_Single_Order($order_id, null, $campaign_id, $landing_site, $language, $gdpr_fields);
162
  $handler->is_update = $newOrder ? !$newOrder : null;
163
  $handler->is_admin_save = is_admin();
164
 
378
  {
379
  if (!mailchimp_is_configured()) return;
380
 
381
+ $subscribed = (bool) isset($_POST['mailchimp_woocommerce_newsletter']) && $_POST['mailchimp_woocommerce_newsletter'] ? true : false;
382
+
383
+ if (isset($_POST['mailchimp_woocommerce_newsletter']) && $_POST['mailchimp_woocommerce_newsletter']) {
384
+ $gdpr_fields = isset($_POST['mailchimp_woocommerce_gdpr']) ?
385
+ $_POST['mailchimp_woocommerce_gdpr'] : false;
386
+ }
387
 
388
  // update the user meta with the 'is_subscribed' form element
389
  update_user_meta($user_id, 'mailchimp_woocommerce_is_subscribed', $subscribed);
390
 
391
  if ($subscribed) {
392
+ $job = new MailChimp_WooCommerce_User_Submit($user_id, $subscribed, null, null, $gdpr_fields);
393
+ mailchimp_handle_or_queue($job);
394
  }
395
  }
396
 
500
  // cookie the current email
501
  @setcookie('mailchimp_user_email', $this->user_email, $cookie_duration, '/' );
502
 
503
+ $cart_data = unserialize($cart->cart);
504
+
505
+ if (!empty($cart_data)) {
506
+ // set the cart data.
507
+ $this->setWooSession('cart', unserialize($cart->cart));
508
+
509
+ mailchimp_debug('carts', "manually setting cart data for {$this->user_email}", array(
510
+ 'cart_id' => $_GET['mc_cart_id'],
511
+ 'cart' => $cart->cart,
512
+ ));
513
+ }
514
  }
515
  }
516
 
includes/class-mailchimp-woocommerce.php CHANGED
@@ -229,7 +229,7 @@ class MailChimp_WooCommerce
229
  $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
230
 
231
  // Add menu item
232
- $this->loader->add_action('admin_menu', $plugin_admin, 'add_plugin_admin_menu');
233
 
234
  // Add WooCommerce Navigation Bar
235
  $this->loader->add_action('admin_menu', $plugin_admin, 'add_woocommerce_navigation_bar');
@@ -241,7 +241,7 @@ class MailChimp_WooCommerce
241
  // make sure we're listening for the admin init
242
  $this->loader->add_action('admin_init', $plugin_admin, 'options_update');
243
  $this->loader->add_action('admin_notices', $plugin_admin, 'initial_notice');
244
-
245
  // put the menu on the admin top bar.
246
  //$this->loader->add_action('admin_bar_menu', $plugin_admin, 'admin_bar', 100);
247
 
@@ -288,6 +288,9 @@ class MailChimp_WooCommerce
288
  $plugin_public = new MailChimp_WooCommerce_Public( $this->get_plugin_name(), $this->get_version() );
289
  $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
290
  $this->loader->add_action('wp_footer', $plugin_public, 'add_inline_footer_script');
 
 
 
291
  }
292
 
293
  /**
229
  $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
230
 
231
  // Add menu item
232
+ $this->loader->add_action('admin_menu', $plugin_admin, 'add_plugin_admin_menu', 71);
233
 
234
  // Add WooCommerce Navigation Bar
235
  $this->loader->add_action('admin_menu', $plugin_admin, 'add_woocommerce_navigation_bar');
241
  // make sure we're listening for the admin init
242
  $this->loader->add_action('admin_init', $plugin_admin, 'options_update');
243
  $this->loader->add_action('admin_notices', $plugin_admin, 'initial_notice');
244
+
245
  // put the menu on the admin top bar.
246
  //$this->loader->add_action('admin_bar_menu', $plugin_admin, 'admin_bar', 100);
247
 
288
  $plugin_public = new MailChimp_WooCommerce_Public( $this->get_plugin_name(), $this->get_version() );
289
  $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
290
  $this->loader->add_action('wp_footer', $plugin_public, 'add_inline_footer_script');
291
+
292
+ $this->loader->add_action('woocommerce_after_checkout_form', $plugin_public, 'add_JS_checkout', 10);
293
+ $this->loader->add_action('woocommerce_register_form', $plugin_public, 'add_JS_checkout', 10);
294
  }
295
 
296
  /**
includes/processes/class-mailchimp-woocommerce-cart-update.php CHANGED
@@ -192,7 +192,7 @@ class MailChimp_WooCommerce_Cart_Update extends Mailchimp_Woocommerce_Job
192
  }
193
 
194
  // Maybe sync subscriber to set correct member.language
195
- mailchimp_member_language_update($this->email, $this->user_language, 'cart');
196
 
197
  } catch (MailChimp_WooCommerce_RateLimitError $e) {
198
  sleep(3);
192
  }
193
 
194
  // Maybe sync subscriber to set correct member.language
195
+ mailchimp_member_data_update($this->email, $this->user_language, 'cart');
196
 
197
  } catch (MailChimp_WooCommerce_RateLimitError $e) {
198
  sleep(3);
includes/processes/class-mailchimp-woocommerce-single-order.php CHANGED
@@ -19,6 +19,7 @@ class MailChimp_WooCommerce_Single_Order extends Mailchimp_Woocommerce_Job
19
  public $is_admin_save = false;
20
  public $is_full_sync = false;
21
  public $partially_refunded = false;
 
22
  protected $woo_order_number = false;
23
  protected $is_amazon_order = false;
24
  protected $is_privacy_restricted = false;
@@ -30,13 +31,14 @@ class MailChimp_WooCommerce_Single_Order extends Mailchimp_Woocommerce_Job
30
  * @param null $campaign_id
31
  * @param null $landing_site
32
  */
33
- public function __construct($id = null, $cart_session_id = null, $campaign_id = null, $landing_site = null, $user_language = null)
34
  {
35
  if (!empty($id)) $this->id = $id;
36
  if (!empty($cart_session_id)) $this->cart_session_id = $cart_session_id;
37
  if (!empty($campaign_id)) $this->campaign_id = $campaign_id;
38
  if (!empty($landing_site)) $this->landing_site = $landing_site;
39
  if (!empty($user_language)) $this->user_language = $user_language;
 
40
  }
41
 
42
  /**
@@ -319,7 +321,7 @@ class MailChimp_WooCommerce_Single_Order extends Mailchimp_Woocommerce_Job
319
  }
320
 
321
  // Maybe sync subscriber to set correct member.language
322
- mailchimp_member_language_update($email, $this->user_language, 'order', $status_if_new, $order);
323
 
324
  mailchimp_log('order_submit.success', $log);
325
 
19
  public $is_admin_save = false;
20
  public $is_full_sync = false;
21
  public $partially_refunded = false;
22
+ public $gdpr_fields = false;
23
  protected $woo_order_number = false;
24
  protected $is_amazon_order = false;
25
  protected $is_privacy_restricted = false;
31
  * @param null $campaign_id
32
  * @param null $landing_site
33
  */
34
+ public function __construct($id = null, $cart_session_id = null, $campaign_id = null, $landing_site = null, $user_language = null, $gdpr_fields = null)
35
  {
36
  if (!empty($id)) $this->id = $id;
37
  if (!empty($cart_session_id)) $this->cart_session_id = $cart_session_id;
38
  if (!empty($campaign_id)) $this->campaign_id = $campaign_id;
39
  if (!empty($landing_site)) $this->landing_site = $landing_site;
40
  if (!empty($user_language)) $this->user_language = $user_language;
41
+ if (!empty($gdpr_fields)) $this->gdpr_fields = $gdpr_fields;
42
  }
43
 
44
  /**
321
  }
322
 
323
  // Maybe sync subscriber to set correct member.language
324
+ mailchimp_member_data_update($email, $this->user_language, 'order', $status_if_new, $order, $this->gdpr_fields);
325
 
326
  mailchimp_log('order_submit.success', $log);
327
 
includes/processes/class-mailchimp-woocommerce-user-submit.php CHANGED
@@ -14,6 +14,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
14
 
15
  public $id;
16
  public $subscribed;
 
17
  public $updated_data;
18
  public $language;
19
  public $should_ignore = false;
@@ -24,7 +25,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
24
  * @param null $subscribed
25
  * @param WP_User|null $updated_data
26
  */
27
- public function __construct($id = null, $subscribed = null, $updated_data = null, $language = null)
28
  {
29
  if (!empty($id)) {
30
  // if we're passing in another user with the same id during the same php process we need to ignore it.
@@ -37,8 +38,18 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
37
 
38
  if (is_bool($subscribed)) {
39
  $this->subscribed = $subscribed;
 
 
 
 
 
 
 
 
40
  }
41
 
 
 
42
  if (!empty($updated_data)) {
43
  $this->updated_data = $updated_data->to_array();
44
  }
@@ -146,9 +157,11 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
146
  $merge_fields = $merge_fields_system;
147
  }
148
  // language
149
-
150
  $language = $this->language;
151
 
 
 
 
152
  // pull the transient key for this job.
153
  $transient_id = mailchimp_get_transient_email_key($email);
154
  $status_meta = mailchimp_get_subscriber_status_options($this->subscribed);
@@ -171,7 +184,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
171
  // delete the old
172
  $api->deleteMember($list_id, $this->updated_data['user_email']);
173
  // subscribe the new
174
- $api->subscribe($list_id, $email, $status_meta['created'], $merge_fields, null, $language);
175
 
176
  // update the member tags but fail silently just in case.
177
  $api->updateMemberTags(mailchimp_get_list_id(), $email, true);
@@ -204,7 +217,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
204
  // if the status is not === 'transactional' we can update them to subscribed or pending now.
205
  if (isset($member_data['status']) && $member_data['status'] === 'transactional' || $member_data['status'] === 'cleaned') {
206
  // ok let's update this member
207
- $api->update($list_id, $email, $status_meta['updated'], $merge_fields, null, $language);
208
 
209
  // update the member tags but fail silently just in case.
210
  $api->updateMemberTags(mailchimp_get_list_id(), $email, true);
@@ -221,7 +234,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
221
 
222
  if (isset($member_data['status'])) {
223
  // ok let's update this member
224
- $api->update($list_id, $email, $member_data['status'], $merge_fields, null, $language);
225
 
226
  // update the member tags but fail silently just in case.
227
  $api->updateMemberTags(mailchimp_get_list_id(), $email, true);
@@ -247,7 +260,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
247
  $uses_doi = isset($status_meta['requires_double_optin']) && $status_meta['requires_double_optin'];
248
  $status_if_new = $uses_doi ? 'pending' : true;
249
 
250
- $api->subscribe($list_id, $user->user_email, $status_if_new, $merge_fields, null, $language);
251
 
252
  // update the member tags but fail silently just in case.
253
  $api->updateMemberTags(mailchimp_get_list_id(), $email, true);
14
 
15
  public $id;
16
  public $subscribed;
17
+ public $gdpr_fields;
18
  public $updated_data;
19
  public $language;
20
  public $should_ignore = false;
25
  * @param null $subscribed
26
  * @param WP_User|null $updated_data
27
  */
28
+ public function __construct($id = null, $subscribed = null, $updated_data = null, $language = null, $gdpr_fields = null)
29
  {
30
  if (!empty($id)) {
31
  // if we're passing in another user with the same id during the same php process we need to ignore it.
38
 
39
  if (is_bool($subscribed)) {
40
  $this->subscribed = $subscribed;
41
+
42
+ if ($subscribed && !empty($gdpr_fields)) {
43
+ foreach ($gdpr_fields as $id => $value) {
44
+ $gdpr_field['marketing_permission_id'] = $id;
45
+ $gdpr_field['enabled'] = (bool) $value;
46
+ $this->gdpr_fields[] = $gdpr_field;
47
+ }
48
+ }
49
  }
50
 
51
+
52
+
53
  if (!empty($updated_data)) {
54
  $this->updated_data = $updated_data->to_array();
55
  }
157
  $merge_fields = $merge_fields_system;
158
  }
159
  // language
 
160
  $language = $this->language;
161
 
162
+ // GDPR
163
+ $gdpr_fields = $this->gdpr_fields;
164
+
165
  // pull the transient key for this job.
166
  $transient_id = mailchimp_get_transient_email_key($email);
167
  $status_meta = mailchimp_get_subscriber_status_options($this->subscribed);
184
  // delete the old
185
  $api->deleteMember($list_id, $this->updated_data['user_email']);
186
  // subscribe the new
187
+ $api->subscribe($list_id, $email, $status_meta['created'], $merge_fields, null, $language, $gdpr_fields);
188
 
189
  // update the member tags but fail silently just in case.
190
  $api->updateMemberTags(mailchimp_get_list_id(), $email, true);
217
  // if the status is not === 'transactional' we can update them to subscribed or pending now.
218
  if (isset($member_data['status']) && $member_data['status'] === 'transactional' || $member_data['status'] === 'cleaned') {
219
  // ok let's update this member
220
+ $api->update($list_id, $email, $status_meta['updated'], $merge_fields, null, $language, $gdpr_fields);
221
 
222
  // update the member tags but fail silently just in case.
223
  $api->updateMemberTags(mailchimp_get_list_id(), $email, true);
234
 
235
  if (isset($member_data['status'])) {
236
  // ok let's update this member
237
+ $api->update($list_id, $email, $member_data['status'], $merge_fields, null, $language, $gdpr_fields);
238
 
239
  // update the member tags but fail silently just in case.
240
  $api->updateMemberTags(mailchimp_get_list_id(), $email, true);
260
  $uses_doi = isset($status_meta['requires_double_optin']) && $status_meta['requires_double_optin'];
261
  $status_if_new = $uses_doi ? 'pending' : true;
262
 
263
+ $api->subscribe($list_id, $user->user_email, $status_if_new, $merge_fields, null, $language, $gdpr_fields);
264
 
265
  // update the member tags but fail silently just in case.
266
  $api->updateMemberTags(mailchimp_get_list_id(), $email, true);
languages/mc-woocommerce.pot CHANGED
@@ -2,21 +2,21 @@
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.4.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mailchimp-for-woocommerce\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: 2020-06-29T11:13:21+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
- "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: mailchimp-for-woocommerce\n"
16
 
17
  #. Plugin Name of the plugin
18
- #: admin/class-mailchimp-woocommerce-admin.php:144
19
- #: admin/class-mailchimp-woocommerce-admin.php:161
20
  msgid "Mailchimp for WooCommerce"
21
  msgstr ""
22
 
@@ -29,7 +29,7 @@ msgid "Connects WooCommerce to Mailchimp to sync your store data, send targeted
29
  msgstr ""
30
 
31
  #. Author of the plugin
32
- #: admin/class-mailchimp-woocommerce-admin.php:145
33
  msgid "Mailchimp"
34
  msgstr ""
35
 
@@ -37,251 +37,341 @@ msgstr ""
37
  msgid "https://mailchimp.com"
38
  msgstr ""
39
 
40
- #: admin/class-mailchimp-woocommerce-admin.php:121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  msgid "Are you sure?"
42
  msgstr ""
43
 
44
- #: admin/class-mailchimp-woocommerce-admin.php:122
45
  msgid "You will not be able to revert."
46
  msgstr ""
47
 
48
- #: admin/class-mailchimp-woocommerce-admin.php:123
49
  msgid "Yes, delete it!"
50
  msgstr ""
51
 
52
- #: admin/class-mailchimp-woocommerce-admin.php:124
53
  msgid "No, cancel!"
54
  msgstr ""
55
 
56
- #: admin/class-mailchimp-woocommerce-admin.php:125
57
  msgid "You are about to disconnect your store from Mailchimp."
58
  msgstr ""
59
 
60
- #: admin/class-mailchimp-woocommerce-admin.php:126
61
  msgid "Yes, disconnect."
62
  msgstr ""
63
 
64
- #: admin/class-mailchimp-woocommerce-admin.php:235
65
  msgid "Log file deleted."
66
  msgstr ""
67
 
68
- #: admin/class-mailchimp-woocommerce-admin.php:359
69
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:379
70
- msgid "Mailchimp for Woocommerce"
71
- msgstr ""
72
-
73
- #: admin/class-mailchimp-woocommerce-admin.php:360
74
  msgid "We dectected that this site has the following constants defined, likely at wp-config.php file"
75
  msgstr ""
76
 
77
- #: admin/class-mailchimp-woocommerce-admin.php:362
78
  msgid "These constants are deprecated since Mailchimp for Woocommerce version 2.3. Please refer to the <a href=\"https://github.com/mailchimp/mc-woocommerce/wiki/\">plugin official wiki</a> for further details."
79
  msgstr ""
80
 
81
- #: admin/class-mailchimp-woocommerce-admin.php:531
82
  msgid "Store Disconnected"
83
  msgstr ""
84
 
85
- #: admin/class-mailchimp-woocommerce-admin.php:535
86
  msgid "Store Disconnect Failed"
87
  msgstr ""
88
 
89
- #: admin/class-mailchimp-woocommerce-admin.php:793
90
- #: admin/class-mailchimp-woocommerce-admin.php:998
91
- #: admin/class-mailchimp-woocommerce-admin.php:1556
92
  msgid "Cannot create or update Store at Mailchimp."
93
  msgstr ""
94
 
95
- #: admin/class-mailchimp-woocommerce-admin.php:887
96
  msgid "As part of the Mailchimp Terms of Use, we require a contact email and a physical mailing address."
97
  msgstr ""
98
 
99
- #: admin/class-mailchimp-woocommerce-admin.php:895
100
  msgid "As part of the Mailchimp Terms of Use, we require a valid phone number for your store."
101
  msgstr ""
102
 
103
- #: admin/class-mailchimp-woocommerce-admin.php:903
104
  msgid "Mailchimp for WooCommerce requires a Store Name to connect your store."
105
  msgstr ""
106
 
107
  #. translators: %s - plugin name.
108
- #: admin/class-mailchimp-woocommerce-admin.php:921
109
  #: admin/partials/tabs/campaign_defaults.php:73
110
  msgid "You were subscribed to the newsletter from %s"
111
  msgstr ""
112
 
113
- #: admin/class-mailchimp-woocommerce-admin.php:926
114
- #: admin/class-mailchimp-woocommerce-admin.php:1023
115
  msgid "One or more fields were not updated"
116
  msgstr ""
117
 
118
- #: admin/class-mailchimp-woocommerce-admin.php:973
119
- #: admin/partials/tabs/newsletter_settings.php:97
120
- #: includes/class-mailchimp-woocommerce-newsletter.php:43
121
- msgid "Subscribe to our newsletter"
122
- msgstr ""
123
-
124
- #: admin/class-mailchimp-woocommerce-admin.php:1088
125
  msgid "You must supply your Mailchimp API key to pull the audiences."
126
  msgstr ""
127
 
128
- #: admin/class-mailchimp-woocommerce-admin.php:1357
129
  msgid "Cannot create or update List at Mailchimp."
130
  msgstr ""
131
 
132
- #: admin/class-mailchimp-woocommerce-admin.php:1357
133
  msgid "Please retry."
134
  msgstr ""
135
 
136
- #: admin/class-mailchimp-woocommerce-admin.php:1572
137
  msgid "Starting the sync process..."
138
  msgstr ""
139
 
140
- #: admin/class-mailchimp-woocommerce-admin.php:1574
141
  msgid "The plugin has started the initial sync with your store, and the process will work in the background automatically."
142
  msgstr ""
143
 
144
- #: admin/class-mailchimp-woocommerce-admin.php:1576
145
  msgid "Sometimes the sync can take a while, especially on sites with lots of orders and/or products. It is safe to navigate away from this screen while it is running."
146
  msgstr ""
147
 
148
- #: admin/class-mailchimp-woocommerce-admin.php:1592
149
  msgid "Your store is synced with Mailchimp!"
150
  msgstr ""
151
 
152
  #. translators: %1$s: Number of synced orders %2$s: Audience name
153
- #: admin/class-mailchimp-woocommerce-admin.php:1595
154
  msgid "We've successfully synced %1$s orders to your Audience %2$s, that's awesome!"
155
  msgstr ""
156
 
157
  #. translators: %s - Wordpress.org plugin review URL.
158
- #: admin/class-mailchimp-woocommerce-admin.php:1603
159
  msgid "Could you please do us a favor and leave the plugin a 5-star <a href=%s target='_blank'>rating on Wordpress.org</a>? It helps our community know that we're working hard to make it better each day."
160
  msgstr ""
161
 
162
- #: admin/class-mailchimp-woocommerce-admin.php:1606
163
  msgid "Leave a Review"
164
  msgstr ""
165
 
166
- #: admin/class-mailchimp-woocommerce-admin.php:1631
167
  msgid "Saved"
168
  msgstr ""
169
 
170
- #: admin/class-mailchimp-woocommerce-admin.php:1636
171
  msgid "Error setting communications status"
172
  msgstr ""
173
 
174
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:68
175
- msgid "Mailchimp says: Please upgrade your PHP version to a minimum of 7.0"
176
  msgstr ""
177
 
178
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:74
179
- msgid "Mailchimp says: API Request Error - "
180
  msgstr ""
181
 
182
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:99
183
- msgid "Add Mailchimp for WooCommerce to build custom segments,<br/>send automations, and track purchase activity in Mailchimp"
 
 
184
  msgstr ""
185
 
186
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:103
187
- msgid "Please provide a bit of information<br/>about your WooCommerce store"
188
  msgstr ""
189
 
190
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:107
191
- msgid "Please review the audience default<br/>campaign information"
192
  msgstr ""
193
 
194
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:112
195
- msgid "Please apply your <br/>audience settings."
196
  msgstr ""
197
 
198
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:115
199
- msgid "Please apply your audience settings. "
200
  msgstr ""
201
 
202
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:116
203
- msgid "If you don’t<br/>have an audience, you can choose to create one"
204
  msgstr ""
205
 
206
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:121
207
- msgid "Sweet! You're connected with<br/>Mailchimp and syncing data"
208
  msgstr ""
209
 
210
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:124
211
- msgid "Connect your WooCommerce store to a<br/>Mailchimp audience in less than 60 seconds"
212
  msgstr ""
213
 
214
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:129
215
- msgid "Log events from the <br/>Mailchimp plugin"
216
  msgstr ""
217
 
218
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:137
219
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:193
220
- #: admin/partials/tabs/api_key.php:10
221
- msgid "Connect"
222
  msgstr ""
223
 
224
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:147
225
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:196
226
- #: admin/partials/tabs/store_info.php:15
227
- msgid "Store Settings"
228
  msgstr ""
229
 
230
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:162
231
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:199
232
- #: admin/partials/tabs/campaign_defaults.php:19
233
- msgid "Audience Defaults"
234
  msgstr ""
235
 
236
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:177
237
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:202
238
- #: admin/partials/tabs/newsletter_settings.php:36
239
- msgid "Audience Settings"
240
  msgstr ""
241
 
242
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:195
243
- msgid "Overview"
244
  msgstr ""
245
 
246
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:205
247
- msgid "Logs"
248
  msgstr ""
249
 
250
- #: admin/partials/mailchimp-woocommerce-admin-tabs.php:266
251
- msgid "Start sync"
252
  msgstr ""
253
 
254
- #: admin/partials/tabs/api_key.php:6
255
- #: admin/partials/tabs/api_key.php:11
256
- msgid "Connect your store to Mailchimp"
257
  msgstr ""
258
 
259
- #: admin/partials/tabs/api_key.php:10
260
- msgid "Reconnect"
261
  msgstr ""
262
 
263
- #: admin/partials/tabs/api_key.php:14
264
- msgid "Already connected. You can reconnect with another Mailchimp account if you want."
265
  msgstr ""
266
 
267
- #: admin/partials/tabs/api_key.php:16
268
- msgid "Connecting. A new window will open with Mailchimp's OAuth service. Please log-in an we will take care of the rest."
269
  msgstr ""
270
 
271
- #: admin/partials/tabs/api_key.php:17
272
- msgid "Error, can't login."
273
  msgstr ""
274
 
275
- #: admin/partials/tabs/api_key.php:18
276
- msgid "Connection in progress"
277
  msgstr ""
278
 
279
- #: admin/partials/tabs/api_key.php:19
280
- msgid "Connected! Please wait while loading next step"
 
 
 
 
281
  msgstr ""
282
 
283
  #: admin/partials/tabs/api_key_create_account.php:33
284
- #: admin/partials/tabs/store_info.php:27
 
285
  msgid "Email"
286
  msgstr ""
287
 
@@ -298,6 +388,7 @@ msgid "Next Step"
298
  msgstr ""
299
 
300
  #: admin/partials/tabs/api_key_create_account.php:53
 
301
  msgid "Invalid Email. Please double check."
302
  msgstr ""
303
 
@@ -310,12 +401,12 @@ msgid "Address Line 2"
310
  msgstr ""
311
 
312
  #: admin/partials/tabs/api_key_create_account.php:82
313
- #: admin/partials/tabs/store_info.php:43
314
  msgid "City"
315
  msgstr ""
316
 
317
  #: admin/partials/tabs/api_key_create_account.php:89
318
- #: admin/partials/tabs/store_info.php:51
319
  msgid "State"
320
  msgstr ""
321
 
@@ -324,7 +415,7 @@ msgid "Zip"
324
  msgstr ""
325
 
326
  #: admin/partials/tabs/api_key_create_account.php:103
327
- #: admin/partials/tabs/store_info.php:67
328
  msgid "Country"
329
  msgstr ""
330
 
@@ -333,7 +424,6 @@ msgid "Phone"
333
  msgstr ""
334
 
335
  #: admin/partials/tabs/api_key_create_account.php:135
336
- #: admin/partials/tabs/store_info.php:135
337
  msgid "Timezone"
338
  msgstr ""
339
 
@@ -382,30 +472,6 @@ msgstr ""
382
  msgid "Connecting..."
383
  msgstr ""
384
 
385
- #: admin/partials/tabs/campaign_defaults.php:24
386
- msgid "From Name"
387
- msgstr ""
388
-
389
- #: admin/partials/tabs/campaign_defaults.php:32
390
- msgid "From Email"
391
- msgstr ""
392
-
393
- #: admin/partials/tabs/campaign_defaults.php:40
394
- msgid "Subject"
395
- msgstr ""
396
-
397
- #: admin/partials/tabs/campaign_defaults.php:43
398
- msgid "Store Newsletter"
399
- msgstr ""
400
-
401
- #: admin/partials/tabs/campaign_defaults.php:48
402
- msgid "Language"
403
- msgstr ""
404
-
405
- #: admin/partials/tabs/campaign_defaults.php:66
406
- msgid "Permission reminder message"
407
- msgstr ""
408
-
409
  #: admin/partials/tabs/logs.php:38
410
  #: admin/partials/tabs/logs.php:42
411
  msgid "Logging Preferences"
@@ -443,384 +509,377 @@ msgstr ""
443
  msgid "Delete Log"
444
  msgstr ""
445
 
446
- #: admin/partials/tabs/newsletter_settings.php:41
447
- msgid "Sync audience with your store"
448
- msgstr ""
449
-
450
- #: admin/partials/tabs/newsletter_settings.php:47
451
- msgid "Create New Audience"
452
- msgstr ""
453
-
454
- #: admin/partials/tabs/newsletter_settings.php:51
455
- msgid "Select Audience"
456
- msgstr ""
457
-
458
- #: admin/partials/tabs/newsletter_settings.php:76
459
- msgid "During initial sync, auto subscribe the existing customers."
460
  msgstr ""
461
 
462
- #: admin/partials/tabs/newsletter_settings.php:81
463
- msgid "Optional Audience Settings"
464
  msgstr ""
465
 
466
- #: admin/partials/tabs/newsletter_settings.php:86
467
- msgid "Opt-in Settings"
468
  msgstr ""
469
 
470
- #: admin/partials/tabs/newsletter_settings.php:91
471
- msgid "Message for the opt-in checkbox"
472
  msgstr ""
473
 
474
- #: admin/partials/tabs/newsletter_settings.php:92
475
- msgid "The call-to-action text that prompts customers to subscribe to your newsletter at checkout."
476
  msgstr ""
477
 
478
- #: admin/partials/tabs/newsletter_settings.php:98
479
- msgid "HTML tags allowed: <a href=\"\" target=\"\" title=\"\"></a> and <br>"
480
  msgstr ""
481
 
482
- #: admin/partials/tabs/newsletter_settings.php:103
483
- msgid "Checkbox Display Options"
 
 
484
  msgstr ""
485
 
486
- #: admin/partials/tabs/newsletter_settings.php:104
487
- msgid "Choose how you want the opt-in to your newsletter checkbox to render at checkout"
488
  msgstr ""
489
 
490
- #: admin/partials/tabs/newsletter_settings.php:112
491
- msgid "Visible, checked by default"
492
  msgstr ""
493
 
494
- #: admin/partials/tabs/newsletter_settings.php:115
495
- msgid "Visible, unchecked by default"
 
496
  msgstr ""
497
 
498
- #: admin/partials/tabs/newsletter_settings.php:118
499
- msgid "Hidden, unchecked by default"
500
  msgstr ""
501
 
502
- #: admin/partials/tabs/newsletter_settings.php:125
503
- msgid "Advanced Checkbox Settings"
504
  msgstr ""
505
 
506
- #. translators: %s - Woocommerce Actions documentation URL.
507
- #: admin/partials/tabs/newsletter_settings.php:126
508
- msgid "To change the location of the opt-in <br/>checkbox at checkout, input one of the <a href=%s target=_blank>available WooCommerce form actions</a>."
509
  msgstr ""
510
 
511
- #: admin/partials/tabs/newsletter_settings.php:132
512
- msgid "Enter a WooCommerce form action"
513
  msgstr ""
514
 
515
- #: admin/partials/tabs/newsletter_settings.php:136
516
- msgid "Subscriber Settings"
517
  msgstr ""
518
 
519
- #: admin/partials/tabs/newsletter_settings.php:141
520
- msgid "Tags"
521
  msgstr ""
522
 
523
- #: admin/partials/tabs/newsletter_settings.php:142
524
- msgid "Add a comma-separated list of tags to apply to a subscriber in Mailchimp after a transaction occurs"
525
  msgstr ""
526
 
527
- #: admin/partials/tabs/newsletter_settings.php:151
528
- msgid "Product Settings"
529
  msgstr ""
530
 
531
- #: admin/partials/tabs/newsletter_settings.php:157
532
- msgid "Product Image Size"
533
  msgstr ""
534
 
535
- #: admin/partials/tabs/newsletter_settings.php:158
536
- msgid "Define the product image size used by abandoned carts, order notifications, and product recommendations."
537
  msgstr ""
538
 
539
- #: admin/partials/tabs/notices.php:6
540
- msgid "Mailchimp says: You must enter in a valid API key."
541
  msgstr ""
542
 
543
- #: admin/partials/tabs/notices.php:9
544
- msgid "Mailchimp says: Sorry you must set up your campaign defaults before you proceed!"
545
  msgstr ""
546
 
547
- #: admin/partials/tabs/notices.php:12
548
- msgid "Mailchimp says: You must select a marketing audience."
549
  msgstr ""
550
 
551
- #: admin/partials/tabs/notices.php:15
552
- msgid "Mailchimp says: Sorry you must set up your store before you proceed!"
553
  msgstr ""
554
 
555
- #: admin/partials/tabs/notices.php:18
556
- msgid "Mailchimp says: You are not fully ready to run the Store Sync, please verify your settings before proceeding."
557
  msgstr ""
558
 
559
- #: admin/partials/tabs/notices.php:32
560
- msgid "Mailchimp says: Your re-sync has been started!"
561
  msgstr ""
562
 
563
- #: admin/partials/tabs/store_info.php:19
564
- msgid "Name"
565
  msgstr ""
566
 
567
- #: admin/partials/tabs/store_info.php:35
568
- msgid "Street address"
569
  msgstr ""
570
 
571
- #: admin/partials/tabs/store_info.php:59
572
- msgid "Postal Code"
573
  msgstr ""
574
 
575
- #: admin/partials/tabs/store_info.php:94
576
- msgid "Phone Number"
577
  msgstr ""
578
 
579
- #: admin/partials/tabs/store_info.php:101
580
- msgid "Locale Settings"
581
  msgstr ""
582
 
583
- #: admin/partials/tabs/store_info.php:103
584
- msgid "Please apply your locale settings. If you're unsure about these, use the defaults."
585
  msgstr ""
586
 
587
- #: admin/partials/tabs/store_info.php:108
588
- msgid "Locale"
 
589
  msgstr ""
590
 
591
- #: admin/partials/tabs/store_info.php:113
592
- msgid "Select store's locale"
593
  msgstr ""
594
 
595
- #: admin/partials/tabs/store_info.php:128
596
- msgid "Woocommerce Currency"
597
  msgstr ""
598
 
599
- #: admin/partials/tabs/store_info.php:140
600
- msgid "Select store's timezone"
 
601
  msgstr ""
602
 
603
- #: admin/partials/tabs/store_info.php:156
604
- msgid "Optional Store Settings"
 
605
  msgstr ""
606
 
607
- #: admin/partials/tabs/store_info.php:162
608
- msgid "Plugin Permission Level"
 
609
  msgstr ""
610
 
611
- #: admin/partials/tabs/store_info.php:163
612
- msgid "Select the minimum permission capability to manage Mailchimp for Woocommerce options"
 
613
  msgstr ""
614
 
615
- #: admin/partials/tabs/store_info.php:170
616
- msgid "Administrators Only"
 
617
  msgstr ""
618
 
619
- #: admin/partials/tabs/store_info.php:173
620
- msgid "Shop Managers and Administrators"
621
  msgstr ""
622
 
623
- #: admin/partials/tabs/store_sync.php:77
624
- msgid "Coupons"
625
  msgstr ""
626
 
627
- #: admin/partials/tabs/store_sync.php:87
628
- msgid "Products"
629
  msgstr ""
630
 
631
- #: admin/partials/tabs/store_sync.php:97
632
- msgid "Orders"
633
  msgstr ""
634
 
635
- #: admin/partials/tabs/store_sync.php:110
636
- msgid "Subscribers"
637
  msgstr ""
638
 
639
- #: admin/partials/tabs/store_sync.php:117
640
- msgid "Transactional"
641
  msgstr ""
642
 
643
- #: admin/partials/tabs/store_sync.php:124
644
- msgid "Unsubscribed"
645
  msgstr ""
646
 
647
- #: admin/partials/tabs/store_sync.php:143
648
- msgid "DISCONNECT STORE"
649
  msgstr ""
650
 
651
- #: admin/partials/tabs/store_sync.php:146
652
- msgid "Account Connected"
653
  msgstr ""
654
 
655
- #: admin/partials/tabs/store_sync.php:148
656
- msgid "Audience Connected"
657
  msgstr ""
658
 
659
- #: admin/partials/tabs/store_sync.php:154
660
- msgid "Status:"
661
  msgstr ""
662
 
663
- #: admin/partials/tabs/store_sync.php:155
664
- msgid "Sync Completed"
665
  msgstr ""
666
 
667
- #: admin/partials/tabs/store_sync.php:155
668
- msgid "Syncing..."
 
669
  msgstr ""
670
 
671
- #: admin/partials/tabs/store_sync.php:157
672
- msgid "Initial sync in progress"
673
  msgstr ""
674
 
675
- #: admin/partials/tabs/store_sync.php:161
676
- msgid "Last Updated:"
 
 
677
  msgstr ""
678
 
679
- #: admin/partials/tabs/store_sync.php:164
680
- #: includes/class-mailchimp-woocommerce-rest-api.php:140
681
- msgid "D, M j, Y g:i A"
682
  msgstr ""
683
 
684
- #: admin/partials/tabs/store_sync.php:166
685
- msgid "Starting..."
686
  msgstr ""
687
 
688
- #: admin/partials/tabs/store_sync.php:193
689
- msgid "enabled"
690
  msgstr ""
691
 
692
- #: admin/partials/tabs/store_sync.php:194
693
- msgid "disabled"
694
  msgstr ""
695
 
696
- #: admin/partials/tabs/store_sync.php:211
697
- msgid "Synchronization"
698
  msgstr ""
699
 
700
- #: admin/partials/tabs/store_sync.php:213
701
- msgid "You can resync your audience at any time without losing any of your e-commerce data."
 
 
702
  msgstr ""
703
 
704
- #: admin/partials/tabs/store_sync.php:216
705
- #: admin/partials/tabs/store_sync.php:218
706
- msgid "Resync now"
707
  msgstr ""
708
 
709
- #: admin/partials/tabs/store_sync.php:219
710
- msgid "Sync is running. Please wait until it finishes."
711
  msgstr ""
712
 
713
- #: admin/partials/tabs/store_sync.php:226
714
- msgid "More Information"
715
  msgstr ""
716
 
717
- #. translators: %s - Plugin review URL.
718
- #: admin/partials/tabs/store_sync.php:228
719
- msgid "Is this plugin helping your e-commerce business? <a href=%s target=_blank>Please leave us a ★★★★★ review!</a>."
720
  msgstr ""
721
 
722
- #. translators: %s - WP-CLI URL.
723
- #: admin/partials/tabs/store_sync.php:229
724
- msgid "Have a larger store or having issues syncing? Consider using <a href=%s target=_blank>WP-CLI</a>."
725
  msgstr ""
726
 
727
- #. translators: %s - WP-CLI URL.
728
- #: admin/partials/tabs/store_sync.php:230
729
- msgid "Order and customer information will not sync if they contain an Amazon or generic email address."
730
  msgstr ""
731
 
732
- #. translators: %s - Mailchimp Support URL.
733
- #: admin/partials/tabs/store_sync.php:231
734
- msgid "Need help? Visit Mailchimp <a href=%s target=_blank>support</a>."
735
  msgstr ""
736
 
737
- #. translators: %s - Mailchimp Privacy Policy URL.
738
- #: admin/partials/tabs/store_sync.php:232
739
- msgid "By using this plugin, Mailchimp will process customer information in accordance with their <a href=%s target=_blank>Privacy Policy</a>."
740
  msgstr ""
741
 
742
- #: bootstrap.php:240
743
- msgid "Error retrieving list for double_optin check"
744
  msgstr ""
745
 
746
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:179
747
- msgid "Please select an option"
748
  msgstr ""
749
 
750
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:182
751
- msgid "Sending Feedback"
752
  msgstr ""
753
 
754
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:327
755
- msgid "I want to change the audience associated with this integration."
756
  msgstr ""
757
 
758
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:331
759
- msgid "I want to change the site or store connected through this integration."
760
  msgstr ""
761
 
762
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:335
763
- msgid "The order data isn't syncing."
764
  msgstr ""
765
 
766
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:339
767
- msgid "The promo codes aren't showing up."
768
  msgstr ""
769
 
770
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:343
771
- msgid "I'm trying to troubleshoot the integration."
772
  msgstr ""
773
 
774
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:347
775
- msgid "I was instructed to disconnect by Mailchimp Support."
776
  msgstr ""
777
 
778
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:351
779
- msgid "I no longer use this integration."
780
  msgstr ""
781
 
782
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:355
783
- msgid "It's a temporary deactivation."
784
  msgstr ""
785
 
786
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:359
787
- msgid "Other"
788
  msgstr ""
789
 
790
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:361
791
- msgid "Please share the reason"
792
  msgstr ""
793
 
794
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:370
795
- msgid "Quick Feedback"
796
  msgstr ""
797
 
798
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:371
799
- msgid "Close"
800
  msgstr ""
801
 
802
- #. translators: %s - plugin name.
803
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:378
804
- msgid "If you have a moment, please share why you are deactivating %s:"
805
  msgstr ""
806
 
807
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:398
808
- msgid "Submit & Deactivate"
809
  msgstr ""
810
 
811
- #: includes/class-mailchimp-woocommerce-deactivation-survey.php:399
812
- msgid "Skip & Deactivate"
813
  msgstr ""
814
 
815
- #. translators: %s - Mailchimp Privacy Policy URL.
816
- #: includes/class-mailchimp-woocommerce-privacy.php:12
817
- 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>."
818
  msgstr ""
819
 
820
- #: includes/class-mailchimp-woocommerce-privacy.php:78
821
- msgid "MailChimp Shopping Cart Data"
822
  msgstr ""
823
 
824
- #: includes/class-mailchimp-woocommerce-privacy.php:82
825
- msgid "User ID"
826
  msgstr ""
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.4.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mailchimp-for-woocommerce\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: 2020-09-04T10:17:41+02:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
+ "X-Generator: WP-CLI 2.1.0\n"
15
  "X-Domain: mailchimp-for-woocommerce\n"
16
 
17
  #. Plugin Name of the plugin
18
+ #: admin/class-mailchimp-woocommerce-admin.php:158
19
+ #: admin/class-mailchimp-woocommerce-admin.php:175
20
  msgid "Mailchimp for WooCommerce"
21
  msgstr ""
22
 
29
  msgstr ""
30
 
31
  #. Author of the plugin
32
+ #: admin/class-mailchimp-woocommerce-admin.php:159
33
  msgid "Mailchimp"
34
  msgstr ""
35
 
37
  msgid "https://mailchimp.com"
38
  msgstr ""
39
 
40
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:179
41
+ msgid "Please select an option"
42
+ msgstr ""
43
+
44
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:182
45
+ msgid "Sending Feedback"
46
+ msgstr ""
47
+
48
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:327
49
+ msgid "I want to change the audience associated with this integration."
50
+ msgstr ""
51
+
52
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:331
53
+ msgid "I want to change the site or store connected through this integration."
54
+ msgstr ""
55
+
56
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:335
57
+ msgid "The order data isn't syncing."
58
+ msgstr ""
59
+
60
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:339
61
+ msgid "The promo codes aren't showing up."
62
+ msgstr ""
63
+
64
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:343
65
+ msgid "I'm trying to troubleshoot the integration."
66
+ msgstr ""
67
+
68
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:347
69
+ msgid "I was instructed to disconnect by Mailchimp Support."
70
+ msgstr ""
71
+
72
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:351
73
+ msgid "I no longer use this integration."
74
+ msgstr ""
75
+
76
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:355
77
+ msgid "It's a temporary deactivation."
78
+ msgstr ""
79
+
80
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:359
81
+ msgid "Other"
82
+ msgstr ""
83
+
84
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:361
85
+ msgid "Please share the reason"
86
+ msgstr ""
87
+
88
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:370
89
+ msgid "Quick Feedback"
90
+ msgstr ""
91
+
92
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:371
93
+ msgid "Close"
94
+ msgstr ""
95
+
96
+ #. translators: %s - plugin name.
97
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:378
98
+ msgid "If you have a moment, please share why you are deactivating %s:"
99
+ msgstr ""
100
+
101
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:379
102
+ #: admin/class-mailchimp-woocommerce-admin.php:369
103
+ msgid "Mailchimp for Woocommerce"
104
+ msgstr ""
105
+
106
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:398
107
+ msgid "Submit & Deactivate"
108
+ msgstr ""
109
+
110
+ #: includes/class-mailchimp-woocommerce-deactivation-survey.php:399
111
+ msgid "Skip & Deactivate"
112
+ msgstr ""
113
+
114
+ #. translators: %s - Mailchimp Privacy Policy URL.
115
+ #: includes/class-mailchimp-woocommerce-privacy.php:12
116
+ 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>."
117
+ msgstr ""
118
+
119
+ #: includes/class-mailchimp-woocommerce-privacy.php:78
120
+ msgid "MailChimp Shopping Cart Data"
121
+ msgstr ""
122
+
123
+ #: includes/class-mailchimp-woocommerce-privacy.php:82
124
+ msgid "User ID"
125
+ msgstr ""
126
+
127
+ #: includes/class-mailchimp-woocommerce-newsletter.php:45
128
+ #: admin/class-mailchimp-woocommerce-admin.php:1031
129
+ #: admin/partials/tabs/newsletter_settings.php:97
130
+ msgid "Subscribe to our newsletter"
131
+ msgstr ""
132
+
133
+ #: includes/class-mailchimp-woocommerce-newsletter.php:73
134
+ msgid "Please select all the ways you would like to hear from us"
135
+ msgstr ""
136
+
137
+ #: includes/class-mailchimp-woocommerce-rest-api.php:151
138
+ #: admin/partials/tabs/store_sync.php:161
139
+ msgid "D, M j, Y g:i A"
140
+ msgstr ""
141
+
142
+ #: admin/class-mailchimp-woocommerce-admin.php:135
143
  msgid "Are you sure?"
144
  msgstr ""
145
 
146
+ #: admin/class-mailchimp-woocommerce-admin.php:136
147
  msgid "You will not be able to revert."
148
  msgstr ""
149
 
150
+ #: admin/class-mailchimp-woocommerce-admin.php:137
151
  msgid "Yes, delete it!"
152
  msgstr ""
153
 
154
+ #: admin/class-mailchimp-woocommerce-admin.php:138
155
  msgid "No, cancel!"
156
  msgstr ""
157
 
158
+ #: admin/class-mailchimp-woocommerce-admin.php:139
159
  msgid "You are about to disconnect your store from Mailchimp."
160
  msgstr ""
161
 
162
+ #: admin/class-mailchimp-woocommerce-admin.php:140
163
  msgid "Yes, disconnect."
164
  msgstr ""
165
 
166
+ #: admin/class-mailchimp-woocommerce-admin.php:249
167
  msgid "Log file deleted."
168
  msgstr ""
169
 
170
+ #: admin/class-mailchimp-woocommerce-admin.php:370
 
 
 
 
 
171
  msgid "We dectected that this site has the following constants defined, likely at wp-config.php file"
172
  msgstr ""
173
 
174
+ #: admin/class-mailchimp-woocommerce-admin.php:372
175
  msgid "These constants are deprecated since Mailchimp for Woocommerce version 2.3. Please refer to the <a href=\"https://github.com/mailchimp/mc-woocommerce/wiki/\">plugin official wiki</a> for further details."
176
  msgstr ""
177
 
178
+ #: admin/class-mailchimp-woocommerce-admin.php:554
179
  msgid "Store Disconnected"
180
  msgstr ""
181
 
182
+ #: admin/class-mailchimp-woocommerce-admin.php:557
183
  msgid "Store Disconnect Failed"
184
  msgstr ""
185
 
186
+ #: admin/class-mailchimp-woocommerce-admin.php:851
187
+ #: admin/class-mailchimp-woocommerce-admin.php:1056
188
+ #: admin/class-mailchimp-woocommerce-admin.php:1618
189
  msgid "Cannot create or update Store at Mailchimp."
190
  msgstr ""
191
 
192
+ #: admin/class-mailchimp-woocommerce-admin.php:945
193
  msgid "As part of the Mailchimp Terms of Use, we require a contact email and a physical mailing address."
194
  msgstr ""
195
 
196
+ #: admin/class-mailchimp-woocommerce-admin.php:953
197
  msgid "As part of the Mailchimp Terms of Use, we require a valid phone number for your store."
198
  msgstr ""
199
 
200
+ #: admin/class-mailchimp-woocommerce-admin.php:961
201
  msgid "Mailchimp for WooCommerce requires a Store Name to connect your store."
202
  msgstr ""
203
 
204
  #. translators: %s - plugin name.
205
+ #: admin/class-mailchimp-woocommerce-admin.php:979
206
  #: admin/partials/tabs/campaign_defaults.php:73
207
  msgid "You were subscribed to the newsletter from %s"
208
  msgstr ""
209
 
210
+ #: admin/class-mailchimp-woocommerce-admin.php:984
211
+ #: admin/class-mailchimp-woocommerce-admin.php:1081
212
  msgid "One or more fields were not updated"
213
  msgstr ""
214
 
215
+ #: admin/class-mailchimp-woocommerce-admin.php:1146
 
 
 
 
 
 
216
  msgid "You must supply your Mailchimp API key to pull the audiences."
217
  msgstr ""
218
 
219
+ #: admin/class-mailchimp-woocommerce-admin.php:1415
220
  msgid "Cannot create or update List at Mailchimp."
221
  msgstr ""
222
 
223
+ #: admin/class-mailchimp-woocommerce-admin.php:1415
224
  msgid "Please retry."
225
  msgstr ""
226
 
227
+ #: admin/class-mailchimp-woocommerce-admin.php:1634
228
  msgid "Starting the sync process..."
229
  msgstr ""
230
 
231
+ #: admin/class-mailchimp-woocommerce-admin.php:1636
232
  msgid "The plugin has started the initial sync with your store, and the process will work in the background automatically."
233
  msgstr ""
234
 
235
+ #: admin/class-mailchimp-woocommerce-admin.php:1638
236
  msgid "Sometimes the sync can take a while, especially on sites with lots of orders and/or products. It is safe to navigate away from this screen while it is running."
237
  msgstr ""
238
 
239
+ #: admin/class-mailchimp-woocommerce-admin.php:1654
240
  msgid "Your store is synced with Mailchimp!"
241
  msgstr ""
242
 
243
  #. translators: %1$s: Number of synced orders %2$s: Audience name
244
+ #: admin/class-mailchimp-woocommerce-admin.php:1657
245
  msgid "We've successfully synced %1$s orders to your Audience %2$s, that's awesome!"
246
  msgstr ""
247
 
248
  #. translators: %s - Wordpress.org plugin review URL.
249
+ #: admin/class-mailchimp-woocommerce-admin.php:1665
250
  msgid "Could you please do us a favor and leave the plugin a 5-star <a href=%s target='_blank'>rating on Wordpress.org</a>? It helps our community know that we're working hard to make it better each day."
251
  msgstr ""
252
 
253
+ #: admin/class-mailchimp-woocommerce-admin.php:1668
254
  msgid "Leave a Review"
255
  msgstr ""
256
 
257
+ #: admin/class-mailchimp-woocommerce-admin.php:1693
258
  msgid "Saved"
259
  msgstr ""
260
 
261
+ #: admin/class-mailchimp-woocommerce-admin.php:1698
262
  msgid "Error setting communications status"
263
  msgstr ""
264
 
265
+ #: admin/class-mailchimp-woocommerce-admin.php:1744
266
+ msgid "No log file provided"
267
  msgstr ""
268
 
269
+ #: admin/class-mailchimp-woocommerce-admin.php:1763
270
+ msgid "Error loading log file contents"
271
  msgstr ""
272
 
273
+ #: admin/partials/tabs/newsletter_settings.php:36
274
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:181
275
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:206
276
+ msgid "Audience Settings"
277
  msgstr ""
278
 
279
+ #: admin/partials/tabs/newsletter_settings.php:41
280
+ msgid "Sync audience with your store"
281
  msgstr ""
282
 
283
+ #: admin/partials/tabs/newsletter_settings.php:47
284
+ msgid "Create New Audience"
285
  msgstr ""
286
 
287
+ #: admin/partials/tabs/newsletter_settings.php:51
288
+ msgid "Select Audience"
289
  msgstr ""
290
 
291
+ #: admin/partials/tabs/newsletter_settings.php:76
292
+ msgid "During initial sync, auto subscribe the existing customers."
293
  msgstr ""
294
 
295
+ #: admin/partials/tabs/newsletter_settings.php:81
296
+ msgid "Optional Audience Settings"
297
  msgstr ""
298
 
299
+ #: admin/partials/tabs/newsletter_settings.php:86
300
+ msgid "Opt-in Settings"
301
  msgstr ""
302
 
303
+ #: admin/partials/tabs/newsletter_settings.php:91
304
+ msgid "Message for the opt-in checkbox"
305
  msgstr ""
306
 
307
+ #: admin/partials/tabs/newsletter_settings.php:92
308
+ msgid "The call-to-action text that prompts customers to subscribe to your newsletter at checkout."
309
  msgstr ""
310
 
311
+ #: admin/partials/tabs/newsletter_settings.php:98
312
+ msgid "HTML tags allowed: <a href=\"\" target=\"\" title=\"\"></a> and <br>"
 
 
313
  msgstr ""
314
 
315
+ #: admin/partials/tabs/newsletter_settings.php:103
316
+ msgid "Checkbox Display Options"
 
 
317
  msgstr ""
318
 
319
+ #: admin/partials/tabs/newsletter_settings.php:104
320
+ msgid "Choose how you want the opt-in to your newsletter checkbox to render at checkout"
 
 
321
  msgstr ""
322
 
323
+ #: admin/partials/tabs/newsletter_settings.php:112
324
+ msgid "Visible, checked by default"
 
 
325
  msgstr ""
326
 
327
+ #: admin/partials/tabs/newsletter_settings.php:115
328
+ msgid "Visible, unchecked by default"
329
  msgstr ""
330
 
331
+ #: admin/partials/tabs/newsletter_settings.php:118
332
+ msgid "Hidden, unchecked by default"
333
  msgstr ""
334
 
335
+ #: admin/partials/tabs/newsletter_settings.php:125
336
+ msgid "Advanced Checkbox Settings"
337
  msgstr ""
338
 
339
+ #. translators: %s - Woocommerce Actions documentation URL.
340
+ #: admin/partials/tabs/newsletter_settings.php:126
341
+ msgid "To change the location of the opt-in <br/>checkbox at checkout, input one of the <a href=%s target=_blank>available WooCommerce form actions</a>."
342
  msgstr ""
343
 
344
+ #: admin/partials/tabs/newsletter_settings.php:132
345
+ msgid "Enter a WooCommerce form action"
346
  msgstr ""
347
 
348
+ #: admin/partials/tabs/newsletter_settings.php:136
349
+ msgid "Subscriber Settings"
350
  msgstr ""
351
 
352
+ #: admin/partials/tabs/newsletter_settings.php:141
353
+ msgid "Tags"
354
  msgstr ""
355
 
356
+ #: admin/partials/tabs/newsletter_settings.php:142
357
+ msgid "Add a comma-separated list of tags to apply to a subscriber in Mailchimp after a transaction occurs"
358
  msgstr ""
359
 
360
+ #: admin/partials/tabs/newsletter_settings.php:151
361
+ msgid "Product Settings"
362
  msgstr ""
363
 
364
+ #: admin/partials/tabs/newsletter_settings.php:157
365
+ msgid "Product Image Size"
366
+ msgstr ""
367
+
368
+ #: admin/partials/tabs/newsletter_settings.php:158
369
+ msgid "Define the product image size used by abandoned carts, order notifications, and product recommendations."
370
  msgstr ""
371
 
372
  #: admin/partials/tabs/api_key_create_account.php:33
373
+ #: admin/partials/tabs/store_sync.php:282
374
+ #: admin/partials/tabs/store_info.php:33
375
  msgid "Email"
376
  msgstr ""
377
 
388
  msgstr ""
389
 
390
  #: admin/partials/tabs/api_key_create_account.php:53
391
+ #: admin/partials/tabs/store_sync.php:307
392
  msgid "Invalid Email. Please double check."
393
  msgstr ""
394
 
401
  msgstr ""
402
 
403
  #: admin/partials/tabs/api_key_create_account.php:82
404
+ #: admin/partials/tabs/store_info.php:49
405
  msgid "City"
406
  msgstr ""
407
 
408
  #: admin/partials/tabs/api_key_create_account.php:89
409
+ #: admin/partials/tabs/store_info.php:57
410
  msgid "State"
411
  msgstr ""
412
 
415
  msgstr ""
416
 
417
  #: admin/partials/tabs/api_key_create_account.php:103
418
+ #: admin/partials/tabs/store_info.php:73
419
  msgid "Country"
420
  msgstr ""
421
 
424
  msgstr ""
425
 
426
  #: admin/partials/tabs/api_key_create_account.php:135
 
427
  msgid "Timezone"
428
  msgstr ""
429
 
472
  msgid "Connecting..."
473
  msgstr ""
474
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475
  #: admin/partials/tabs/logs.php:38
476
  #: admin/partials/tabs/logs.php:42
477
  msgid "Logging Preferences"
509
  msgid "Delete Log"
510
  msgstr ""
511
 
512
+ #: admin/partials/tabs/notices.php:6
513
+ msgid "Mailchimp says: You must enter in a valid API key."
 
 
 
 
 
 
 
 
 
 
 
 
514
  msgstr ""
515
 
516
+ #: admin/partials/tabs/notices.php:9
517
+ msgid "Mailchimp says: Sorry you must set up your campaign defaults before you proceed!"
518
  msgstr ""
519
 
520
+ #: admin/partials/tabs/notices.php:12
521
+ msgid "Mailchimp says: You must select a marketing audience."
522
  msgstr ""
523
 
524
+ #: admin/partials/tabs/notices.php:15
525
+ msgid "Mailchimp says: Sorry you must set up your store before you proceed!"
526
  msgstr ""
527
 
528
+ #: admin/partials/tabs/notices.php:18
529
+ msgid "Mailchimp says: You are not fully ready to run the Store Sync, please verify your settings before proceeding."
530
  msgstr ""
531
 
532
+ #: admin/partials/tabs/notices.php:32
533
+ msgid "Mailchimp says: Your re-sync has been started!"
534
  msgstr ""
535
 
536
+ #: admin/partials/tabs/campaign_defaults.php:19
537
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:166
538
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:203
539
+ msgid "Audience Defaults"
540
  msgstr ""
541
 
542
+ #: admin/partials/tabs/campaign_defaults.php:24
543
+ msgid "From Name"
544
  msgstr ""
545
 
546
+ #: admin/partials/tabs/campaign_defaults.php:32
547
+ msgid "From Email"
548
  msgstr ""
549
 
550
+ #: admin/partials/tabs/campaign_defaults.php:40
551
+ #: admin/partials/tabs/store_sync.php:289
552
+ msgid "Subject"
553
  msgstr ""
554
 
555
+ #: admin/partials/tabs/campaign_defaults.php:43
556
+ msgid "Store Newsletter"
557
  msgstr ""
558
 
559
+ #: admin/partials/tabs/campaign_defaults.php:48
560
+ msgid "Language"
561
  msgstr ""
562
 
563
+ #: admin/partials/tabs/campaign_defaults.php:66
564
+ msgid "Permission reminder message"
 
565
  msgstr ""
566
 
567
+ #: admin/partials/tabs/store_sync.php:78
568
+ msgid "Coupons"
569
  msgstr ""
570
 
571
+ #: admin/partials/tabs/store_sync.php:88
572
+ msgid "Products"
573
  msgstr ""
574
 
575
+ #: admin/partials/tabs/store_sync.php:98
576
+ msgid "Orders"
577
  msgstr ""
578
 
579
+ #: admin/partials/tabs/store_sync.php:111
580
+ msgid "Subscribers"
581
  msgstr ""
582
 
583
+ #: admin/partials/tabs/store_sync.php:118
584
+ msgid "Transactional"
585
  msgstr ""
586
 
587
+ #: admin/partials/tabs/store_sync.php:125
588
+ msgid "Unsubscribed"
589
  msgstr ""
590
 
591
+ #: admin/partials/tabs/store_sync.php:141
592
+ msgid "DISCONNECT STORE"
593
  msgstr ""
594
 
595
+ #: admin/partials/tabs/store_sync.php:143
596
+ msgid "Account Connected"
597
  msgstr ""
598
 
599
+ #: admin/partials/tabs/store_sync.php:145
600
+ msgid "Audience Connected"
601
  msgstr ""
602
 
603
+ #: admin/partials/tabs/store_sync.php:151
604
+ msgid "Status:"
605
  msgstr ""
606
 
607
+ #: admin/partials/tabs/store_sync.php:152
608
+ msgid "Sync Completed"
609
  msgstr ""
610
 
611
+ #: admin/partials/tabs/store_sync.php:152
612
+ msgid "Syncing..."
613
  msgstr ""
614
 
615
+ #: admin/partials/tabs/store_sync.php:154
616
+ msgid "Initial sync in progress"
617
  msgstr ""
618
 
619
+ #: admin/partials/tabs/store_sync.php:158
620
+ msgid "Last Updated:"
621
  msgstr ""
622
 
623
+ #: admin/partials/tabs/store_sync.php:163
624
+ msgid "Starting..."
625
  msgstr ""
626
 
627
+ #: admin/partials/tabs/store_sync.php:190
628
+ msgid "enabled"
629
  msgstr ""
630
 
631
+ #: admin/partials/tabs/store_sync.php:191
632
+ msgid "disabled"
633
  msgstr ""
634
 
635
+ #: admin/partials/tabs/store_sync.php:209
636
+ msgid "Synchronization"
637
  msgstr ""
638
 
639
+ #: admin/partials/tabs/store_sync.php:211
640
+ msgid "You can resync your audience at any time without losing any of your e-commerce data."
641
  msgstr ""
642
 
643
+ #: admin/partials/tabs/store_sync.php:214
644
+ #: admin/partials/tabs/store_sync.php:216
645
+ msgid "Resync now"
646
  msgstr ""
647
 
648
+ #: admin/partials/tabs/store_sync.php:217
649
+ msgid "Sync is running. Please wait until it finishes."
650
  msgstr ""
651
 
652
+ #: admin/partials/tabs/store_sync.php:224
653
+ msgid "More Information"
654
  msgstr ""
655
 
656
+ #. translators: %s - Plugin review URL.
657
+ #: admin/partials/tabs/store_sync.php:226
658
+ msgid "Is this plugin helping your e-commerce business? <a href=%s target=_blank>Please leave us a ★★★★★ review!</a>."
659
  msgstr ""
660
 
661
+ #. translators: %s - WP-CLI URL.
662
+ #: admin/partials/tabs/store_sync.php:227
663
+ msgid "Have a larger store or having issues syncing? Consider using <a href=%s target=_blank>WP-CLI</a> or browse documentation around common <a href=%s target=_blank>caching problems</a>."
664
  msgstr ""
665
 
666
+ #. translators: %s - WP-CLI URL.
667
+ #: admin/partials/tabs/store_sync.php:228
668
+ msgid "Order and customer information will not sync if they contain an Amazon or generic email address."
669
  msgstr ""
670
 
671
+ #. translators: %s - Mailchimp Support URL.
672
+ #: admin/partials/tabs/store_sync.php:229
673
+ msgid "Need help? Visit <a href=%s target=_blank>Mailchimp support</a> or <a id=%s href=%s>send us an email.</a> "
674
  msgstr ""
675
 
676
+ #. translators: %s - Mailchimp Privacy Policy URL.
677
+ #: admin/partials/tabs/store_sync.php:230
678
+ msgid "By using this plugin, Mailchimp will process customer information in accordance with their <a href=%s target=_blank>Privacy Policy</a>."
679
  msgstr ""
680
 
681
+ #: admin/partials/tabs/store_sync.php:253
682
+ msgid "Send us a support ticket"
683
  msgstr ""
684
 
685
+ #: admin/partials/tabs/store_sync.php:254
686
+ msgid "The best way to get in touch with us is by submitting a ticket in the form below. </br> We do our best to get back to you within 48 hours. We look forward to hear from you!"
687
  msgstr ""
688
 
689
+ #: admin/partials/tabs/store_sync.php:268
690
+ msgid "First name"
691
  msgstr ""
692
 
693
+ #: admin/partials/tabs/store_sync.php:275
694
+ msgid "Last name"
695
  msgstr ""
696
 
697
+ #: admin/partials/tabs/store_sync.php:296
698
+ msgid "Message"
699
  msgstr ""
700
 
701
+ #: admin/partials/tabs/store_sync.php:302
702
+ msgid "Send"
703
  msgstr ""
704
 
705
+ #: admin/partials/tabs/store_sync.php:308
706
+ msgid "Invalid First Name. Please double check."
707
  msgstr ""
708
 
709
+ #: admin/partials/tabs/store_sync.php:309
710
+ msgid "Invalid Last Name. Please double check."
711
  msgstr ""
712
 
713
+ #: admin/partials/tabs/store_sync.php:310
714
+ msgid "Invalid Subject. Please double check."
715
  msgstr ""
716
 
717
+ #: admin/partials/tabs/store_sync.php:311
718
+ msgid "Invalid Message. Please double check."
719
  msgstr ""
720
 
721
+ #: admin/partials/tabs/store_sync.php:312
722
+ msgid "Message sent..."
723
  msgstr ""
724
 
725
+ #: admin/partials/tabs/store_sync.php:313
726
+ msgid "Error: Message not sent..."
727
  msgstr ""
728
 
729
+ #: admin/partials/tabs/api_key.php:6
730
+ #: admin/partials/tabs/api_key.php:11
731
+ msgid "Connect your store to Mailchimp"
732
  msgstr ""
733
 
734
+ #: admin/partials/tabs/api_key.php:10
735
+ msgid "Reconnect"
736
  msgstr ""
737
 
738
+ #: admin/partials/tabs/api_key.php:10
739
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:141
740
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:197
741
+ msgid "Connect"
742
  msgstr ""
743
 
744
+ #: admin/partials/tabs/api_key.php:14
745
+ msgid "Already connected. You can reconnect with another Mailchimp account if you want."
 
746
  msgstr ""
747
 
748
+ #: admin/partials/tabs/api_key.php:16
749
+ msgid "Connecting. A new window will open with Mailchimp's OAuth service. Please log-in an we will take care of the rest."
750
  msgstr ""
751
 
752
+ #: admin/partials/tabs/api_key.php:17
753
+ msgid "Error, can't login."
754
  msgstr ""
755
 
756
+ #: admin/partials/tabs/api_key.php:18
757
+ msgid "Connection in progress"
758
  msgstr ""
759
 
760
+ #: admin/partials/tabs/api_key.php:19
761
+ msgid "Connected! Please wait while loading next step"
762
  msgstr ""
763
 
764
+ #: admin/partials/tabs/store_info.php:21
765
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:151
766
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:200
767
+ msgid "Store Settings"
768
  msgstr ""
769
 
770
+ #: admin/partials/tabs/store_info.php:25
771
+ msgid "Name"
 
772
  msgstr ""
773
 
774
+ #: admin/partials/tabs/store_info.php:41
775
+ msgid "Street address"
776
  msgstr ""
777
 
778
+ #: admin/partials/tabs/store_info.php:65
779
+ msgid "Postal Code"
780
  msgstr ""
781
 
782
+ #: admin/partials/tabs/store_info.php:100
783
+ msgid "Phone Number"
 
784
  msgstr ""
785
 
786
+ #: admin/partials/tabs/store_info.php:107
787
+ msgid "Locale Settings"
 
788
  msgstr ""
789
 
790
+ #. translators: %1$s - The Currency name and format (ex: USD | US Dollar) %2$s - Timezone name or offset (ex: America/New_York or UTC-4:00) %3$s and %5$s- <a> tag open %4$s - </a> tag close
791
+ #: admin/partials/tabs/store_info.php:116
792
+ msgid "We've detected that your WooCommerce store's currency is <b>%1$s</b> (%3$schange%4$s), and the WordPress timezone is <b>%2$s</b> (%5$schange%4$s). <br/>."
793
  msgstr ""
794
 
795
+ #: admin/partials/tabs/store_info.php:130
796
+ msgid "Locale"
 
797
  msgstr ""
798
 
799
+ #: admin/partials/tabs/store_info.php:132
800
+ msgid "Please apply your locale settings. If you're unsure about these, use the defaults."
 
801
  msgstr ""
802
 
803
+ #: admin/partials/tabs/store_info.php:139
804
+ msgid "Select store's locale"
805
  msgstr ""
806
 
807
+ #: admin/partials/tabs/store_info.php:158
808
+ msgid "Optional Store Settings"
809
  msgstr ""
810
 
811
+ #: admin/partials/tabs/store_info.php:164
812
+ msgid "Plugin Permission Level"
813
  msgstr ""
814
 
815
+ #: admin/partials/tabs/store_info.php:165
816
+ msgid "Select the minimum permission capability to manage Mailchimp for Woocommerce options"
817
  msgstr ""
818
 
819
+ #: admin/partials/tabs/store_info.php:172
820
+ msgid "Administrators Only"
821
  msgstr ""
822
 
823
+ #: admin/partials/tabs/store_info.php:175
824
+ msgid "Shop Managers and Administrators"
825
  msgstr ""
826
 
827
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:72
828
+ msgid "Mailchimp says: Please upgrade your PHP version to a minimum of 7.0"
829
  msgstr ""
830
 
831
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:78
832
+ msgid "Mailchimp says: API Request Error - "
833
  msgstr ""
834
 
835
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:103
836
+ msgid "Add Mailchimp for WooCommerce to build custom segments,<br/>send automations, and track purchase activity in Mailchimp"
837
  msgstr ""
838
 
839
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:107
840
+ msgid "Please provide a bit of information<br/>about your WooCommerce store"
841
  msgstr ""
842
 
843
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:111
844
+ msgid "Please review the audience default<br/>campaign information"
845
  msgstr ""
846
 
847
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:116
848
+ msgid "Please apply your <br/>audience settings."
849
  msgstr ""
850
 
851
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:119
852
+ msgid "Please apply your audience settings. "
853
  msgstr ""
854
 
855
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:120
856
+ msgid "If you don’t<br/>have an audience, you can choose to create one"
857
  msgstr ""
858
 
859
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:125
860
+ msgid "Sweet! You're connected with<br/>Mailchimp and syncing data"
861
  msgstr ""
862
 
863
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:128
864
+ msgid "Connect your WooCommerce store to a<br/>Mailchimp audience in less than 60 seconds"
 
865
  msgstr ""
866
 
867
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:133
868
+ msgid "Log events from the <br/>Mailchimp plugin"
869
  msgstr ""
870
 
871
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:199
872
+ msgid "Overview"
873
  msgstr ""
874
 
875
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:209
876
+ msgid "Logs"
 
877
  msgstr ""
878
 
879
+ #: admin/partials/mailchimp-woocommerce-admin-tabs.php:270
880
+ msgid "Start sync"
881
  msgstr ""
882
 
883
+ #: bootstrap.php:240
884
+ msgid "Error retrieving list for double_optin check"
885
  msgstr ""
mailchimp-woocommerce.php CHANGED
@@ -16,7 +16,7 @@
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.4.5
20
  * Author: Mailchimp
21
  * Author URI: https://mailchimp.com
22
  * License: GPL-2.0+
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.4.6
20
  * Author: Mailchimp
21
  * Author URI: https://mailchimp.com
22
  * License: GPL-2.0+
public/class-mailchimp-woocommerce-public.php CHANGED
@@ -86,5 +86,15 @@ class MailChimp_WooCommerce_Public {
86
  echo $fragment;
87
  }
88
  }
89
- }
 
 
 
 
 
 
 
 
 
 
90
  }
86
  echo $fragment;
87
  }
88
  }
89
+ }
90
+
91
+ /**
92
+ * Add GDPR script to the checkout page
93
+ */
94
+ public function add_JS_checkout()
95
+ {
96
+ wp_enqueue_script($this->plugin_name. '_gdpr', plugin_dir_url( __FILE__ ) .'js/mailchimp-woocommerce-checkout-gdpr.min.js', array(), $this->version, true);
97
+ }
98
+
99
+
100
  }
public/js/mailchimp-woocommerce-checkout-gdpr.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $ ) {
2
+ 'use strict';
3
+
4
+ $( document ).ready(function() {
5
+ var mailchimp_woocommerce_newsletter = $('#mailchimp_woocommerce_newsletter');
6
+ var gdprFields = $('#mailchimp-gdpr-fields');
7
+ if (gdprFields.length) {
8
+ showHideGDPR(mailchimp_woocommerce_newsletter, gdprFields);
9
+
10
+ mailchimp_woocommerce_newsletter.change(function () {
11
+ showHideGDPR(mailchimp_woocommerce_newsletter, gdprFields);
12
+ });
13
+ }
14
+
15
+ })
16
+ function showHideGDPR(mailchimp_woocommerce_newsletter, gdprFields) {
17
+ if (mailchimp_woocommerce_newsletter.prop('checked') == true) {
18
+ gdprFields.slideDown();
19
+ }
20
+ else {
21
+ gdprFields.slideUp();
22
+ }
23
+ }
24
+ })( jQuery );
public/js/mailchimp-woocommerce-checkout-gdpr.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){"use strict";function c(e,c){1==e.prop("checked")?c.slideDown():c.slideUp()}e(document).ready(function(){var n=e("#mailchimp_woocommerce_newsletter"),i=e("#mailchimp-gdpr-fields");i.length&&(c(n,i),n.change(function(){c(n,i)}))})}(jQuery);
uninstall.php CHANGED
@@ -51,6 +51,7 @@ function mailchimp_woocommerce_uninstall() {
51
  }
52
  mailchimp_remove_communication_status();
53
  mailchimp_clean_database();
 
54
  }
55
 
56
  if (!is_multisite()) {
51
  }
52
  mailchimp_remove_communication_status();
53
  mailchimp_clean_database();
54
+ mailchimp_remove_activity_panel_inbox_notes();
55
  }
56
 
57
  if (!is_multisite()) {