MailChimp for WooCommerce - Version 2.7.2

Version Description

Download this release

Release Info

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

Code changes from version 2.7.1 to 2.7.2

README.txt CHANGED
@@ -4,7 +4,7 @@ Tags: ecommerce,email,workflows,mailchimp
4
  Donate link: https://mailchimp.com
5
  Requires at least: 4.9
6
  Tested up to: 6.0
7
- Stable tag: 2.7.1
8
  Requires PHP: 7.0
9
  WC requires at least: 3.5
10
  WC tested up to: 6.7
@@ -78,9 +78,10 @@ At this time, the synchronization of product categories from WooCommerce to Mail
78
  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.
79
 
80
  == Changelog ==
81
- = 2.7.1 =
82
- * Fixes the outgoing IP address defaults
83
- * Fixes webhook creation on plugin install
84
- * Enhancements to the support tool
 
85
 
86
  [Historical Changelog](https://raw.githubusercontent.com/mailchimp/mc-woocommerce/master/CHANGELOG.txt)
4
  Donate link: https://mailchimp.com
5
  Requires at least: 4.9
6
  Tested up to: 6.0
7
+ Stable tag: 2.7.2
8
  Requires PHP: 7.0
9
  WC requires at least: 3.5
10
  WC tested up to: 6.7
78
  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.
79
 
80
  == Changelog ==
81
+ = 2.7.2 =
82
+ * Add first/last name into new Mailchimp account form
83
+ * Optimize get request for spam list blocking
84
+ * Enhancements to the auth process
85
+ * Block based checkout interface check
86
 
87
  [Historical Changelog](https://raw.githubusercontent.com/mailchimp/mc-woocommerce/master/CHANGELOG.txt)
admin/class-mailchimp-woocommerce-admin.php CHANGED
@@ -819,7 +819,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
819
  'headers' => array(),
820
  );
821
 
822
- $response = wp_remote_post($url, $pload);
823
 
824
  // need to return the error message if this is the problem.
825
  if ($response instanceof WP_Error) {
819
  'headers' => array(),
820
  );
821
 
822
+ $response = wp_safe_remote_post($url, $pload);
823
 
824
  // need to return the error message if this is the problem.
825
  if ($response instanceof WP_Error) {
admin/partials/tabs/api_key.php CHANGED
@@ -1,14 +1,11 @@
1
  <fieldset class="full connect-button">
2
  <input type="hidden" name="mailchimp_active_settings_tab" value="api_key"/>
3
-
4
  <legend class="screen-reader-text">
5
  <span><?php esc_html_e('Connect your store to Mailchimp', 'mailchimp-for-woocommerce');?></span>
6
  </legend>
7
  <a id="mailchimp-oauth-connect" class="button button-primary tab-content-submit oauth-connect"><?php $has_valid_api_key ? esc_html_e('Reconnect account', 'mailchimp-for-woocommerce') : esc_html_e('Connect account', 'mailchimp-for-woocommerce');?></a>
8
  <a class="button create-account" href='#mc-woocommerce-create-account'>Create account</a>
9
-
10
  <input type="hidden" id="<?php echo $this->plugin_name; ?>-mailchimp-api-key" name="<?php echo $this->plugin_name; ?>[mailchimp_api_key]" value="<?php echo isset($options['mailchimp_api_key']) ? $options['mailchimp_api_key'] : '' ?>" required/>
11
-
12
  <?php if ($has_valid_api_key) :?>
13
  <p id="mailchimp-oauth-api-key-valid"><?php esc_html_e('Already connected. You can reconnect with another Mailchimp account if you want.' , 'mailchimp-for-woocommerce');?></p>
14
  <?php endif;?>
@@ -17,8 +14,6 @@
17
  <p id="mailchimp-oauth-connecting" class="oauth-description"><?php esc_html_e('Connection in progress' , 'mailchimp-for-woocommerce');?><span class="spinner" style="visibility:visible; margin: 0 10px;"></span></p>
18
  <p id="mailchimp-oauth-connected" class="oauth-description "><?php esc_html_e('Connected! Please wait while loading next step', 'mailchimp-for-woocommerce');?></p>
19
  </fieldset>
20
-
21
-
22
  <div class="tab-content-wrapper">
23
  <div id="mc-woocommerce-create-account" class="mc-woocommerce-modal">
24
  <div id="exampleModal" class="reveal-modal">
@@ -37,97 +32,95 @@
37
  <path d="M44.044 31.2761C44.0223 31.2012 43.8862 30.7002 43.6969 30.0967C43.5075 29.4932 43.3142 29.0672 43.3142 29.0672C44.0696 27.9351 44.0834 26.9233 43.9828 26.3514C43.8763 25.6414 43.5805 25.0359 42.9829 24.4107C42.3873 23.7854 41.1684 23.1445 39.4545 22.6632C39.2593 22.608 38.6123 22.4305 38.5551 22.4127C38.5512 22.3753 38.5078 20.2945 38.4684 19.3991C38.4408 18.7522 38.3836 17.7444 38.0719 16.7504C37.6992 15.4053 37.0483 14.2298 36.2377 13.4764C38.4763 11.157 39.8726 8.60091 39.8707 6.40774C39.8647 2.19102 34.6855 0.914962 28.3033 3.55781C28.2974 3.55978 26.9602 4.1278 26.9503 4.13174C26.9444 4.12582 24.5066 1.73346 24.4692 1.7019C17.1954 -4.64488 -5.55475 20.6436 1.71899 26.7853L3.30864 28.1323C2.89644 29.2013 2.73471 30.4241 2.86685 31.7396C3.03647 33.4299 3.90822 35.0511 5.32234 36.3015C6.66348 37.4908 8.42669 38.2422 10.1386 38.2402C12.9688 44.7626 19.4359 48.7643 27.0193 48.9891C35.153 49.2317 41.981 45.4134 44.8428 38.5578C45.0301 38.0765 45.825 35.909 45.825 33.9939C45.825 32.0729 44.7382 31.2761 44.044 31.2761ZM10.7638 36.41C10.5173 36.4514 10.2649 36.4691 10.0104 36.4632C7.55298 36.3981 4.90027 34.1852 4.63598 31.5621C4.34409 28.6629 5.82527 26.4322 8.44839 25.9017C8.76198 25.8386 9.14066 25.8011 9.54892 25.8228C11.0183 25.9037 13.1838 27.0318 13.6789 30.2328C14.1187 33.0689 13.4225 35.9564 10.7638 36.41ZM8.02041 24.1681C6.38736 24.4856 4.9476 25.4106 4.06797 26.6886C3.54137 26.2508 2.56115 25.4007 2.38956 25.0694C0.985306 22.4009 3.92202 17.2138 5.97516 14.285C11.0478 7.04676 18.9922 1.56581 22.6705 2.55984C23.2681 2.72945 25.2482 5.02518 25.2482 5.02518C25.2482 5.02518 21.5719 7.06451 18.1618 9.90853C13.5704 13.4468 10.0992 18.5885 8.02041 24.1681ZM33.8079 35.3252C33.8611 35.3035 33.8986 35.2424 33.8927 35.1812C33.8848 35.1063 33.8177 35.0531 33.7448 35.0609C33.7448 35.0609 29.8969 35.6309 26.26 34.2996C26.6564 33.0117 27.7096 33.4772 29.3012 33.6054C32.1709 33.777 34.7408 33.3569 36.642 32.8125C38.2889 32.3392 40.4505 31.4083 42.1309 30.0829C42.6969 31.3274 42.8981 32.6962 42.8981 32.6962C42.8981 32.6962 43.3359 32.6173 43.7028 32.8441C44.0499 33.0571 44.3024 33.5009 44.1288 34.6448C43.7758 36.7847 42.8665 38.5223 41.338 40.1198C40.4071 41.1217 39.277 41.9935 37.9852 42.6266C37.2988 42.9875 36.5671 43.2991 35.7959 43.5516C30.033 45.4331 24.1339 43.3642 22.2326 38.9207C22.0807 38.5874 21.9525 38.2363 21.852 37.8714C21.0414 34.9426 21.7297 31.43 23.8795 29.2171C23.8795 29.2171 23.8795 29.2171 23.8795 29.2151C24.0116 29.0751 24.1477 28.9094 24.1477 28.7004C24.1477 28.5248 24.0372 28.3414 23.9406 28.2112C23.1892 27.1206 20.5818 25.2607 21.1045 21.6613C21.4792 19.0757 23.7414 17.2553 25.8498 17.3637C26.0273 17.3736 26.2067 17.3834 26.3842 17.3953C27.2974 17.4485 28.0942 17.5669 28.8476 17.5984C30.1059 17.6537 31.238 17.4702 32.5792 16.3519C33.0308 15.9752 33.3937 15.6478 34.0071 15.5453C34.0722 15.5335 34.2319 15.4763 34.5534 15.492C34.8808 15.5098 35.1924 15.5985 35.4725 15.7859C36.5474 16.5018 36.6992 18.2335 36.7545 19.4997C36.786 20.2235 36.8728 21.9729 36.9044 22.4759C36.9734 23.6237 37.2751 23.7874 37.8846 23.9886C38.2278 24.101 38.5473 24.1858 39.0167 24.318C40.4387 24.7183 41.2828 25.1227 41.8153 25.6433C42.1329 25.9688 42.2808 26.3139 42.3261 26.6433C42.4938 27.8661 41.3755 29.3788 38.4171 30.7515C35.1826 32.2524 31.2577 32.6331 28.5459 32.3313C28.3388 32.3076 27.5992 32.2248 27.5952 32.2248C25.4257 31.9329 24.1891 34.7355 25.4908 36.6565C26.329 37.8951 28.6149 38.6998 30.9008 38.6998C36.1431 38.6998 40.1724 36.4613 41.6713 34.5284C41.7167 34.4712 41.7206 34.4633 41.7916 34.3568C41.8646 34.2464 41.8055 34.1852 41.7128 34.2464C40.488 35.0846 35.0484 38.4099 29.2322 37.4099C29.2322 37.4099 28.5261 37.2936 27.8792 37.0431C27.3664 36.8439 26.2935 36.3508 26.1634 35.2483C30.8514 36.6979 33.8079 35.3252 33.8079 35.3252ZM26.3704 34.4476C26.3704 34.4476 26.3724 34.4476 26.3704 34.4476C26.3724 34.4495 26.3724 34.4495 26.3724 34.4515C26.3724 34.4495 26.3724 34.4476 26.3704 34.4476ZM17.3887 14.2554C19.1914 12.1707 21.4121 10.3602 23.4002 9.34249C23.4692 9.30699 23.5422 9.38193 23.5047 9.44899C23.3469 9.73497 23.0432 10.3464 22.9466 10.8118C22.9308 10.8848 23.0097 10.9381 23.0708 10.8966C24.3074 10.0525 26.4612 9.14921 28.3486 9.03284C28.4295 9.02693 28.4689 9.13146 28.4039 9.18076C28.1159 9.40166 27.8023 9.70539 27.5735 10.0131C27.5341 10.0663 27.5716 10.1413 27.6366 10.1413C28.962 10.1511 30.8317 10.6146 32.0486 11.297C32.1315 11.3424 32.0723 11.5021 31.9796 11.4824C30.1375 11.0603 27.1199 10.7389 23.986 11.5041C21.1893 12.1865 19.0533 13.2397 17.4952 14.3738C17.4203 14.4329 17.3256 14.3304 17.3887 14.2554Z" fill="black"/>
38
  </svg>
39
  <h3>Create your mailchimp account (<span id="step_count">1</span> of 2)</h3>
40
-
41
  </div>
42
-
43
-
44
  <div id="mc-woocommerce-create-account-step-1" class="mc-woocommerce-create-account-step">
45
- <fieldset>
46
  <?php $user_id = get_current_user_id(); ?>
47
-
48
- <input id="first_name" name="first_name" type="hidden" value="<?= get_user_meta( $user_id, 'first_name', true );?>">
49
- <input id="last_name" name="last_name" type="hidden" value="<?= get_user_meta( $user_id, 'last_name', true );?>">
50
  <input id="org" name="org" type="hidden" value="<?= get_bloginfo( 'name' );?>">
51
-
52
- <div class="box" >
53
- <label for="email">
54
- <span> <?php esc_html_e('Email', 'mailchimp-for-woocommerce'); ?></span>
55
- </label>
56
- <input required type="email" id="email" name="email"/>
57
- </div>
58
-
59
- <div class="box" >
60
- <label for="username">
61
- <span> <?php esc_html_e('Username', 'mailchimp-for-woocommerce'); ?></span>
62
- </label>
63
- <input required type="text" id="username" name="username"/>
64
- <p class="description" id ="username_suggestion"><?= esc_html__( 'Suggested username: ', 'mailchimp-for-woocommerce' ); ?><span></span></p>
65
- </div>
66
-
67
-
68
- <div class="box " >
69
- <a id="mc-woocommerce-create-account-next" class="button button-primary whitebtn tab-content-submit"><?php esc_html_e('Next Step', 'mailchimp-for-woocommerce'); ?></a>
70
- <span class="mc-woocommerce-create-account-go-spinner spinner"></span>
71
- </div>
72
-
73
- <div class="box mc-woocommerce-create-account-step-error alignright" >
74
- <p id ="email_error"><?= esc_html__( 'Invalid Email. Please double check.', 'mailchimp-for-woocommerce' ); ?></p>
75
- <p id ="username_invalid_error">Username Invalid or already exists</p>
76
- <p id ="username_exists_error">Username already exists</p>
77
- </div>
78
-
79
-
80
-
81
- </fieldset>
 
 
 
 
 
 
 
 
 
 
 
82
  </div>
83
-
84
  <div id="mc-woocommerce-create-account-step-2" class="mc-woocommerce-create-account-step">
85
  <fieldset>
86
- <div class="box" >
87
  <label for="address">
88
  <span> <?php esc_html_e('Address Line 1', 'mailchimp-for-woocommerce'); ?></span>
89
  </label>
90
  <input required type="text" id="address" name="address"/>
91
  </div>
92
-
93
- <div class="box" >
94
  <label for="address2">
95
  <span> <?php esc_html_e('Address Line 2', 'mailchimp-for-woocommerce'); ?></span>
96
  </label>
97
  <input type="text" id="address2" name="address2"/>
98
  </div>
99
-
100
-
101
- <div class="box" >
102
  <label for="city">
103
  <span> <?php esc_html_e('City', 'mailchimp-for-woocommerce'); ?></span>
104
  </label>
105
  <input required type="text" id="city" name="city"/>
106
  </div>
107
-
108
- <div class="box box-half" >
109
  <label for="state">
110
  <span> <?php esc_html_e('State', 'mailchimp-for-woocommerce'); ?></span>
111
  </label>
112
  <input required type="text" id="state" name="state"/>
113
  </div>
114
-
115
- <div class="box box-half" >
116
  <label for="zip">
117
  <span> <?php esc_html_e('Zip', 'mailchimp-for-woocommerce'); ?></span>
118
  </label>
119
  <input required type="text" id="zip" name="zip"/>
120
  </div>
121
-
122
- <div class="box box-half" >
123
  <label for="<?= $this->plugin_name ?>[store_country]">
124
  <span> <?php esc_html_e('Country', 'mailchimp-for-woocommerce'); ?></span>
125
  </label>
126
- <?php global $woocommerce;
127
- $countries_obj = new WC_Countries();
128
- $countries = $countries_obj->__get('countries');
 
129
  ?>
130
-
131
  <div class="mailchimp-select-wrapper">
132
  <?php
133
  woocommerce_form_field($this->plugin_name.'[store_country]', array(
@@ -138,20 +131,16 @@
138
  'required' => true
139
  ),
140
  isset($options['store_country']) ? $options['store_country'] : WC()->countries->get_base_country()
141
- );
142
-
143
- ?>
144
  </div>
145
  </div>
146
-
147
- <div class="box box-half" >
148
  <label for="phone">
149
  <span> <?php esc_html_e('Phone', 'mailchimp-for-woocommerce'); ?></span>
150
  </label>
151
  <input required type="text" id="phone" name="phone"/>
152
  </div>
153
-
154
- <div class="box" >
155
  <label for="<?php echo $this->plugin_name; ?>-store-timezone-label">
156
  <span><?php esc_html_e('Timezone', 'mailchimp-for-woocommerce'); ?></span>
157
  </label>
@@ -166,8 +155,7 @@
166
  </select>
167
  </div>
168
  </div>
169
-
170
- <div class="box terms" >
171
  <p>
172
  <?php
173
  $allowed_html = array(
@@ -180,20 +168,16 @@
180
  );
181
  ?>
182
  <?= sprintf(/* translators: %s - Mailchimp legal pages */wp_kses( __( 'By clicking the "Get Started!" button, you are creating a Mailchimp account, and you agree to Mailchimp\'s <a href=%1$s target=_blank>Terms of Use</a> and <a href=%2$s target=_blank>Privacy Policy</a>.', 'mailchimp-for-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://mailchimp.com/legal/terms' ), esc_url( 'https://mailchimp.com/legal/privacy' ) );?>
183
-
184
  </p>
185
  </div>
186
-
187
- <div class="box box-half" >
188
  <a id="mc-woocommerce-create-account-prev" class="button button-primary whitebtn tab-content-submit"><?php esc_html_e('Go Back', 'mailchimp-for-woocommerce'); ?></a>
189
  </div>
190
-
191
- <div class="box box-half" >
192
  <a id="mc-woocommerce-create-account-go" class="button button-primary tab-content-submit"><?php esc_html_e('Get Started!', 'mailchimp-for-woocommerce'); ?></a>
193
  <span class="spinner"></span>
194
  </div>
195
-
196
- <div class="box mc-woocommerce-create-account-step-error alignright" >
197
  <p id ="address_error"><?= esc_html__( 'Invalid Address', 'mailchimp-for-woocommerce' ); ?></p>
198
  <p id ="city_error"><?= esc_html__( 'Invalid City', 'mailchimp-for-woocommerce' ); ?></p>
199
  <p id ="state_error"><?= esc_html__( 'Invalid State', 'mailchimp-for-woocommerce' ); ?></p>
@@ -204,14 +188,10 @@
204
  <p id ="connecting"><?= esc_html__( 'Connecting...', 'mailchimp-for-woocommerce' ); ?></p>
205
  </div>
206
  </fieldset>
207
-
208
  </div>
209
-
210
-
211
  <div class="modal-footer">
212
  ©2001–<?= date('Y') ?> All Rights Reserved. Mailchimp® is a registered trademark of The Rocket Science Group. Cookie Preferences, Privacy, and Terms.
213
  </div>
214
-
215
  </div>
216
  </div>
217
- </div>
1
  <fieldset class="full connect-button">
2
  <input type="hidden" name="mailchimp_active_settings_tab" value="api_key"/>
 
3
  <legend class="screen-reader-text">
4
  <span><?php esc_html_e('Connect your store to Mailchimp', 'mailchimp-for-woocommerce');?></span>
5
  </legend>
6
  <a id="mailchimp-oauth-connect" class="button button-primary tab-content-submit oauth-connect"><?php $has_valid_api_key ? esc_html_e('Reconnect account', 'mailchimp-for-woocommerce') : esc_html_e('Connect account', 'mailchimp-for-woocommerce');?></a>
7
  <a class="button create-account" href='#mc-woocommerce-create-account'>Create account</a>
 
8
  <input type="hidden" id="<?php echo $this->plugin_name; ?>-mailchimp-api-key" name="<?php echo $this->plugin_name; ?>[mailchimp_api_key]" value="<?php echo isset($options['mailchimp_api_key']) ? $options['mailchimp_api_key'] : '' ?>" required/>
 
9
  <?php if ($has_valid_api_key) :?>
10
  <p id="mailchimp-oauth-api-key-valid"><?php esc_html_e('Already connected. You can reconnect with another Mailchimp account if you want.' , 'mailchimp-for-woocommerce');?></p>
11
  <?php endif;?>
14
  <p id="mailchimp-oauth-connecting" class="oauth-description"><?php esc_html_e('Connection in progress' , 'mailchimp-for-woocommerce');?><span class="spinner" style="visibility:visible; margin: 0 10px;"></span></p>
15
  <p id="mailchimp-oauth-connected" class="oauth-description "><?php esc_html_e('Connected! Please wait while loading next step', 'mailchimp-for-woocommerce');?></p>
16
  </fieldset>
 
 
17
  <div class="tab-content-wrapper">
18
  <div id="mc-woocommerce-create-account" class="mc-woocommerce-modal">
19
  <div id="exampleModal" class="reveal-modal">
32
  <path d="M44.044 31.2761C44.0223 31.2012 43.8862 30.7002 43.6969 30.0967C43.5075 29.4932 43.3142 29.0672 43.3142 29.0672C44.0696 27.9351 44.0834 26.9233 43.9828 26.3514C43.8763 25.6414 43.5805 25.0359 42.9829 24.4107C42.3873 23.7854 41.1684 23.1445 39.4545 22.6632C39.2593 22.608 38.6123 22.4305 38.5551 22.4127C38.5512 22.3753 38.5078 20.2945 38.4684 19.3991C38.4408 18.7522 38.3836 17.7444 38.0719 16.7504C37.6992 15.4053 37.0483 14.2298 36.2377 13.4764C38.4763 11.157 39.8726 8.60091 39.8707 6.40774C39.8647 2.19102 34.6855 0.914962 28.3033 3.55781C28.2974 3.55978 26.9602 4.1278 26.9503 4.13174C26.9444 4.12582 24.5066 1.73346 24.4692 1.7019C17.1954 -4.64488 -5.55475 20.6436 1.71899 26.7853L3.30864 28.1323C2.89644 29.2013 2.73471 30.4241 2.86685 31.7396C3.03647 33.4299 3.90822 35.0511 5.32234 36.3015C6.66348 37.4908 8.42669 38.2422 10.1386 38.2402C12.9688 44.7626 19.4359 48.7643 27.0193 48.9891C35.153 49.2317 41.981 45.4134 44.8428 38.5578C45.0301 38.0765 45.825 35.909 45.825 33.9939C45.825 32.0729 44.7382 31.2761 44.044 31.2761ZM10.7638 36.41C10.5173 36.4514 10.2649 36.4691 10.0104 36.4632C7.55298 36.3981 4.90027 34.1852 4.63598 31.5621C4.34409 28.6629 5.82527 26.4322 8.44839 25.9017C8.76198 25.8386 9.14066 25.8011 9.54892 25.8228C11.0183 25.9037 13.1838 27.0318 13.6789 30.2328C14.1187 33.0689 13.4225 35.9564 10.7638 36.41ZM8.02041 24.1681C6.38736 24.4856 4.9476 25.4106 4.06797 26.6886C3.54137 26.2508 2.56115 25.4007 2.38956 25.0694C0.985306 22.4009 3.92202 17.2138 5.97516 14.285C11.0478 7.04676 18.9922 1.56581 22.6705 2.55984C23.2681 2.72945 25.2482 5.02518 25.2482 5.02518C25.2482 5.02518 21.5719 7.06451 18.1618 9.90853C13.5704 13.4468 10.0992 18.5885 8.02041 24.1681ZM33.8079 35.3252C33.8611 35.3035 33.8986 35.2424 33.8927 35.1812C33.8848 35.1063 33.8177 35.0531 33.7448 35.0609C33.7448 35.0609 29.8969 35.6309 26.26 34.2996C26.6564 33.0117 27.7096 33.4772 29.3012 33.6054C32.1709 33.777 34.7408 33.3569 36.642 32.8125C38.2889 32.3392 40.4505 31.4083 42.1309 30.0829C42.6969 31.3274 42.8981 32.6962 42.8981 32.6962C42.8981 32.6962 43.3359 32.6173 43.7028 32.8441C44.0499 33.0571 44.3024 33.5009 44.1288 34.6448C43.7758 36.7847 42.8665 38.5223 41.338 40.1198C40.4071 41.1217 39.277 41.9935 37.9852 42.6266C37.2988 42.9875 36.5671 43.2991 35.7959 43.5516C30.033 45.4331 24.1339 43.3642 22.2326 38.9207C22.0807 38.5874 21.9525 38.2363 21.852 37.8714C21.0414 34.9426 21.7297 31.43 23.8795 29.2171C23.8795 29.2171 23.8795 29.2171 23.8795 29.2151C24.0116 29.0751 24.1477 28.9094 24.1477 28.7004C24.1477 28.5248 24.0372 28.3414 23.9406 28.2112C23.1892 27.1206 20.5818 25.2607 21.1045 21.6613C21.4792 19.0757 23.7414 17.2553 25.8498 17.3637C26.0273 17.3736 26.2067 17.3834 26.3842 17.3953C27.2974 17.4485 28.0942 17.5669 28.8476 17.5984C30.1059 17.6537 31.238 17.4702 32.5792 16.3519C33.0308 15.9752 33.3937 15.6478 34.0071 15.5453C34.0722 15.5335 34.2319 15.4763 34.5534 15.492C34.8808 15.5098 35.1924 15.5985 35.4725 15.7859C36.5474 16.5018 36.6992 18.2335 36.7545 19.4997C36.786 20.2235 36.8728 21.9729 36.9044 22.4759C36.9734 23.6237 37.2751 23.7874 37.8846 23.9886C38.2278 24.101 38.5473 24.1858 39.0167 24.318C40.4387 24.7183 41.2828 25.1227 41.8153 25.6433C42.1329 25.9688 42.2808 26.3139 42.3261 26.6433C42.4938 27.8661 41.3755 29.3788 38.4171 30.7515C35.1826 32.2524 31.2577 32.6331 28.5459 32.3313C28.3388 32.3076 27.5992 32.2248 27.5952 32.2248C25.4257 31.9329 24.1891 34.7355 25.4908 36.6565C26.329 37.8951 28.6149 38.6998 30.9008 38.6998C36.1431 38.6998 40.1724 36.4613 41.6713 34.5284C41.7167 34.4712 41.7206 34.4633 41.7916 34.3568C41.8646 34.2464 41.8055 34.1852 41.7128 34.2464C40.488 35.0846 35.0484 38.4099 29.2322 37.4099C29.2322 37.4099 28.5261 37.2936 27.8792 37.0431C27.3664 36.8439 26.2935 36.3508 26.1634 35.2483C30.8514 36.6979 33.8079 35.3252 33.8079 35.3252ZM26.3704 34.4476C26.3704 34.4476 26.3724 34.4476 26.3704 34.4476C26.3724 34.4495 26.3724 34.4495 26.3724 34.4515C26.3724 34.4495 26.3724 34.4476 26.3704 34.4476ZM17.3887 14.2554C19.1914 12.1707 21.4121 10.3602 23.4002 9.34249C23.4692 9.30699 23.5422 9.38193 23.5047 9.44899C23.3469 9.73497 23.0432 10.3464 22.9466 10.8118C22.9308 10.8848 23.0097 10.9381 23.0708 10.8966C24.3074 10.0525 26.4612 9.14921 28.3486 9.03284C28.4295 9.02693 28.4689 9.13146 28.4039 9.18076C28.1159 9.40166 27.8023 9.70539 27.5735 10.0131C27.5341 10.0663 27.5716 10.1413 27.6366 10.1413C28.962 10.1511 30.8317 10.6146 32.0486 11.297C32.1315 11.3424 32.0723 11.5021 31.9796 11.4824C30.1375 11.0603 27.1199 10.7389 23.986 11.5041C21.1893 12.1865 19.0533 13.2397 17.4952 14.3738C17.4203 14.4329 17.3256 14.3304 17.3887 14.2554Z" fill="black"/>
33
  </svg>
34
  <h3>Create your mailchimp account (<span id="step_count">1</span> of 2)</h3>
 
35
  </div>
 
 
36
  <div id="mc-woocommerce-create-account-step-1" class="mc-woocommerce-create-account-step">
37
+ <fieldset>
38
  <?php $user_id = get_current_user_id(); ?>
 
 
 
39
  <input id="org" name="org" type="hidden" value="<?= get_bloginfo( 'name' );?>">
40
+ <div class="box">
41
+ <label for="first_name">
42
+ <span> <?php esc_html_e('First name', 'mailchimp-for-woocommerce'); ?></span>
43
+ </label>
44
+ <input required type="text" id="first_name" name="first_name" value="<?= get_user_meta( $user_id, 'first_name', true );?>"/>
45
+ </div>
46
+ <div class="box">
47
+ <label for="last_name">
48
+ <span> <?php esc_html_e('Last name', 'mailchimp-for-woocommerce'); ?></span>
49
+ </label>
50
+ <input required type="text" id="last_name" name="last_name" value="<?= get_user_meta( $user_id, 'last_name', true );?>"/>
51
+ </div>
52
+ <div class="box">
53
+ <label for="username">
54
+ <span> <?php esc_html_e('Username', 'mailchimp-for-woocommerce'); ?></span>
55
+ </label>
56
+ <input required type="text" id="username" name="username"/>
57
+ <p class="description" id ="username_suggestion"><?= esc_html__( 'Suggested username: ', 'mailchimp-for-woocommerce' ); ?><span></span></p>
58
+ </div>
59
+ <div class="box">
60
+ <label for="email">
61
+ <span> <?php esc_html_e('Email', 'mailchimp-for-woocommerce'); ?></span>
62
+ </label>
63
+ <input required type="email" id="email" name="email"/>
64
+ </div>
65
+ <div class="box">
66
+ <label for="username">
67
+ <span> <?php esc_html_e('Username', 'mailchimp-for-woocommerce'); ?></span>
68
+ </label>
69
+ <input required type="text" id="username" name="username"/>
70
+ <p class="description" id ="username_suggestion"><?= esc_html__( 'Suggested username: ', 'mailchimp-for-woocommerce' ); ?><span></span></p>
71
+ </div>
72
+ <div class="box">
73
+ <a id="mc-woocommerce-create-account-next" class="button button-primary whitebtn tab-content-submit"><?php esc_html_e('Next Step', 'mailchimp-for-woocommerce'); ?></a>
74
+ <span class="mc-woocommerce-create-account-go-spinner spinner"></span>
75
+ </div>
76
+ <div class="box mc-woocommerce-create-account-step-error alignright" >
77
+ <p id ="email_error"><?= esc_html__( 'Invalid Email. Please double check.', 'mailchimp-for-woocommerce' ); ?></p>
78
+ <p id ="username_invalid_error">Username Invalid or already exists</p>
79
+ <p id ="username_exists_error">Username already exists</p>
80
+ </div>
81
+ </fieldset>
82
  </div>
 
83
  <div id="mc-woocommerce-create-account-step-2" class="mc-woocommerce-create-account-step">
84
  <fieldset>
85
+ <div class="box">
86
  <label for="address">
87
  <span> <?php esc_html_e('Address Line 1', 'mailchimp-for-woocommerce'); ?></span>
88
  </label>
89
  <input required type="text" id="address" name="address"/>
90
  </div>
91
+ <div class="box">
 
92
  <label for="address2">
93
  <span> <?php esc_html_e('Address Line 2', 'mailchimp-for-woocommerce'); ?></span>
94
  </label>
95
  <input type="text" id="address2" name="address2"/>
96
  </div>
97
+ <div class="box">
 
 
98
  <label for="city">
99
  <span> <?php esc_html_e('City', 'mailchimp-for-woocommerce'); ?></span>
100
  </label>
101
  <input required type="text" id="city" name="city"/>
102
  </div>
103
+ <div class="box box-half">
 
104
  <label for="state">
105
  <span> <?php esc_html_e('State', 'mailchimp-for-woocommerce'); ?></span>
106
  </label>
107
  <input required type="text" id="state" name="state"/>
108
  </div>
109
+ <div class="box box-half">
 
110
  <label for="zip">
111
  <span> <?php esc_html_e('Zip', 'mailchimp-for-woocommerce'); ?></span>
112
  </label>
113
  <input required type="text" id="zip" name="zip"/>
114
  </div>
115
+ <div class="box box-half">
 
116
  <label for="<?= $this->plugin_name ?>[store_country]">
117
  <span> <?php esc_html_e('Country', 'mailchimp-for-woocommerce'); ?></span>
118
  </label>
119
+ <?php
120
+ global $woocommerce;
121
+ $countries_obj = new WC_Countries();
122
+ $countries = $countries_obj->__get('countries');
123
  ?>
 
124
  <div class="mailchimp-select-wrapper">
125
  <?php
126
  woocommerce_form_field($this->plugin_name.'[store_country]', array(
131
  'required' => true
132
  ),
133
  isset($options['store_country']) ? $options['store_country'] : WC()->countries->get_base_country()
134
+ ); ?>
 
 
135
  </div>
136
  </div>
137
+ <div class="box box-half">
 
138
  <label for="phone">
139
  <span> <?php esc_html_e('Phone', 'mailchimp-for-woocommerce'); ?></span>
140
  </label>
141
  <input required type="text" id="phone" name="phone"/>
142
  </div>
143
+ <div class="box">
 
144
  <label for="<?php echo $this->plugin_name; ?>-store-timezone-label">
145
  <span><?php esc_html_e('Timezone', 'mailchimp-for-woocommerce'); ?></span>
146
  </label>
155
  </select>
156
  </div>
157
  </div>
158
+ <div class="box terms">
 
159
  <p>
160
  <?php
161
  $allowed_html = array(
168
  );
169
  ?>
170
  <?= sprintf(/* translators: %s - Mailchimp legal pages */wp_kses( __( 'By clicking the "Get Started!" button, you are creating a Mailchimp account, and you agree to Mailchimp\'s <a href=%1$s target=_blank>Terms of Use</a> and <a href=%2$s target=_blank>Privacy Policy</a>.', 'mailchimp-for-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://mailchimp.com/legal/terms' ), esc_url( 'https://mailchimp.com/legal/privacy' ) );?>
 
171
  </p>
172
  </div>
173
+ <div class="box box-half">
 
174
  <a id="mc-woocommerce-create-account-prev" class="button button-primary whitebtn tab-content-submit"><?php esc_html_e('Go Back', 'mailchimp-for-woocommerce'); ?></a>
175
  </div>
176
+ <div class="box box-half">
 
177
  <a id="mc-woocommerce-create-account-go" class="button button-primary tab-content-submit"><?php esc_html_e('Get Started!', 'mailchimp-for-woocommerce'); ?></a>
178
  <span class="spinner"></span>
179
  </div>
180
+ <div class="box mc-woocommerce-create-account-step-error alignright">
 
181
  <p id ="address_error"><?= esc_html__( 'Invalid Address', 'mailchimp-for-woocommerce' ); ?></p>
182
  <p id ="city_error"><?= esc_html__( 'Invalid City', 'mailchimp-for-woocommerce' ); ?></p>
183
  <p id ="state_error"><?= esc_html__( 'Invalid State', 'mailchimp-for-woocommerce' ); ?></p>
188
  <p id ="connecting"><?= esc_html__( 'Connecting...', 'mailchimp-for-woocommerce' ); ?></p>
189
  </div>
190
  </fieldset>
 
191
  </div>
 
 
192
  <div class="modal-footer">
193
  ©2001–<?= date('Y') ?> All Rights Reserved. Mailchimp® is a registered trademark of The Rocket Science Group. Cookie Preferences, Privacy, and Terms.
194
  </div>
 
195
  </div>
196
  </div>
197
+ </div>
blocks/newsletter.php CHANGED
@@ -2,7 +2,8 @@
2
 
3
  define( 'MAILCHIMP_WOOCOMMERCE_NEWSLETTER_VERSION', '1.0.0' );
4
 
5
- if ( class_exists( '\Automattic\WooCommerce\Blocks\Package' ) ) {
 
6
  require dirname( __FILE__ ) . '/woocommerce-blocks-integration.php';
7
  add_action(
8
  'woocommerce_blocks_checkout_block_registration',
@@ -12,4 +13,4 @@ if ( class_exists( '\Automattic\WooCommerce\Blocks\Package' ) ) {
12
  10,
13
  1
14
  );
15
- }
2
 
3
  define( 'MAILCHIMP_WOOCOMMERCE_NEWSLETTER_VERSION', '1.0.0' );
4
 
5
+ if (class_exists( '\Automattic\WooCommerce\Blocks\Package' ) &&
6
+ interface_exists('\Automattic\WooCommerce\Blocks\Integrations\IntegrationInterface')) {
7
  require dirname( __FILE__ ) . '/woocommerce-blocks-integration.php';
8
  add_action(
9
  'woocommerce_blocks_checkout_block_registration',
13
  10,
14
  1
15
  );
16
+ }
bootstrap.php CHANGED
@@ -94,7 +94,7 @@ function mailchimp_environment_variables() {
94
  return (object) array(
95
  'repo' => 'master',
96
  'environment' => 'production', // staging or production
97
- 'version' => '2.7',
98
  'php_version' => phpversion(),
99
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
100
  'wc_version' => function_exists('WC') ? WC()->version : null,
94
  return (object) array(
95
  'repo' => 'master',
96
  'environment' => 'production', // staging or production
97
+ 'version' => '2.7.2',
98
  'php_version' => phpversion(),
99
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
100
  'wc_version' => function_exists('WC') ? WC()->version : null,
includes/api/class-mailchimp-api.php CHANGED
@@ -1890,7 +1890,8 @@ class MailChimp_WooCommerce_MailChimpApi
1890
  if (is_array($domains) && isset($domains['value'])) {
1891
  return $domains['value'];
1892
  }
1893
- $domains = json_decode(file_get_contents('https://tower.vextras.com/naughty-domains'), true);
 
1894
  mailchimp_set_transient('naughty_list_domains', $domains, 1440);
1895
  return $domains;
1896
  } catch (\Throwable $e) {
@@ -1947,6 +1948,7 @@ class MailChimp_WooCommerce_MailChimpApi
1947
  'body' => json_encode(array(
1948
  'store_id' => mailchimp_get_store_id(),
1949
  'list_id' => mailchimp_get_list_id(),
 
1950
  'email' => $email
1951
  )),
1952
  'timeout' => 30,
1890
  if (is_array($domains) && isset($domains['value'])) {
1891
  return $domains['value'];
1892
  }
1893
+ $domains_response = wp_remote_get('https://tower.vextras.com/naughty-domains');
1894
+ $domains = json_decode($domains_response['body'], true);
1895
  mailchimp_set_transient('naughty_list_domains', $domains, 1440);
1896
  return $domains;
1897
  } catch (\Throwable $e) {
1948
  'body' => json_encode(array(
1949
  'store_id' => mailchimp_get_store_id(),
1950
  'list_id' => mailchimp_get_list_id(),
1951
+ 'domain' => site_url(),
1952
  'email' => $email
1953
  )),
1954
  'timeout' => 30,
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.7.1
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.7.2
20
  * Author: Mailchimp
21
  * Author URI: https://mailchimp.com
22
  * License: GPL-2.0+