Version Description
- adds fallback for mb_strpos if extension is not installed
- implements communications box on sync page
- adds account create for Mailchimp
- fixes Pending Payment and On-hold status orders passed to Mailchimp
- fixes for WooCommerce Fatal-errors
- support for WooCommerce vendor feature
- support for Shop Manager role by Woocommerce
- update to Text Domain for wp translation
- adds banner to review plugin after audience is synced
- support for user language based on wp get_locale() at order placement
Download this release
Release Info
Developer | ryanhungate |
Plugin | MailChimp for WooCommerce |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.3 to 2.3.1
- .idea/.name +0 -1
- .idea/misc.xml +0 -6
- .idea/modules.xml +0 -8
- .idea/svn.mailchimp-woocommerce.iml +0 -8
- .idea/workspace.xml +0 -82
- README.txt +14 -3
- admin/class-mailchimp-woocommerce-admin.php +251 -20
- admin/css/checkbox.min.css +1 -0
- admin/css/mailchimp-woocommerce-admin-settings-5.2.css +999 -0
- admin/css/mailchimp-woocommerce-admin-settings.css +237 -13
- admin/js/mailchimp-woocommerce-admin.js +269 -1
- admin/partials/mailchimp-woocommerce-admin-tabs.php +24 -19
- admin/partials/tabs/api_key.php +8 -8
- admin/partials/tabs/api_key_create_account.php +195 -0
- admin/partials/tabs/campaign_defaults.php +8 -8
- admin/partials/tabs/logs.php +7 -7
- admin/partials/tabs/newsletter_settings.php +26 -26
- admin/partials/tabs/notices.php +6 -6
- admin/partials/tabs/store_info.php +44 -16
- admin/partials/tabs/store_sync.php +56 -25
- bootstrap.php +126 -58
- includes/api/assets/class-mailchimp-customer.php +21 -0
- includes/api/assets/class-mailchimp-order.php +40 -1
- includes/api/class-mailchimp-api.php +107 -24
- includes/api/class-mailchimp-woocommerce-transform-coupons.php +7 -2
- includes/api/class-mailchimp-woocommerce-transform-orders-wc3.php +65 -28
- includes/api/class-mailchimp-woocommerce-transform-products.php +25 -14
- includes/class-mailchimp-woocommerce-deactivation-survey.php +18 -18
- includes/class-mailchimp-woocommerce-i18n.php +1 -1
- includes/class-mailchimp-woocommerce-newsletter.php +1 -1
- includes/class-mailchimp-woocommerce-options.php +1 -1
- includes/class-mailchimp-woocommerce-privacy.php +3 -3
- includes/class-mailchimp-woocommerce-rest-api.php +2 -2
- includes/class-mailchimp-woocommerce-service.php +15 -7
- includes/class-mailchimp-woocommerce.php +13 -0
- includes/processes/class-mailchimp-woocommerce-abstract-sync.php +4 -0
- includes/processes/class-mailchimp-woocommerce-cart-update.php +1 -1
- includes/processes/class-mailchimp-woocommerce-job.php +25 -0
- includes/processes/class-mailchimp-woocommerce-process-coupons.php +3 -0
- includes/processes/class-mailchimp-woocommerce-process-orders.php +29 -5
- includes/processes/class-mailchimp-woocommerce-process-products.php +11 -4
- includes/processes/class-mailchimp-woocommerce-rest-queue.php +0 -251
- includes/processes/class-mailchimp-woocommerce-single-coupon.php +1 -1
- includes/processes/class-mailchimp-woocommerce-single-order.php +25 -34
- includes/processes/class-mailchimp-woocommerce-single-product.php +11 -4
- includes/processes/class-mailchimp-woocommerce-user-submit.php +14 -6
- languages/mc-woocommerce-pt_BR.mo +0 -0
- languages/mc-woocommerce-pt_BR.po +138 -126
- languages/mc-woocommerce.pot +65 -104
- mailchimp-woocommerce.php +4 -4
.idea/.name
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
svn.mailchimp-woocommerce
|
|
.idea/misc.xml
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<project version="4">
|
3 |
-
<component name="JavaScriptSettings">
|
4 |
-
<option name="languageLevel" value="ES6" />
|
5 |
-
</component>
|
6 |
-
</project>
|
|
|
|
|
|
|
|
|
|
|
|
.idea/modules.xml
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<project version="4">
|
3 |
-
<component name="ProjectModuleManager">
|
4 |
-
<modules>
|
5 |
-
<module fileurl="file://$PROJECT_DIR$/.idea/svn.mailchimp-woocommerce.iml" filepath="$PROJECT_DIR$/.idea/svn.mailchimp-woocommerce.iml" />
|
6 |
-
</modules>
|
7 |
-
</component>
|
8 |
-
</project>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.idea/svn.mailchimp-woocommerce.iml
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<module type="WEB_MODULE" version="4">
|
3 |
-
<component name="NewModuleRootManager">
|
4 |
-
<content url="file://$MODULE_DIR$" />
|
5 |
-
<orderEntry type="inheritedJdk" />
|
6 |
-
<orderEntry type="sourceFolder" forTests="false" />
|
7 |
-
</component>
|
8 |
-
</module>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.idea/workspace.xml
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<project version="4">
|
3 |
-
<component name="ChangeListManager">
|
4 |
-
<list default="true" id="658d276d-bb11-426c-bf41-b1de1f52d7f6" name="Default Changelist" comment="" />
|
5 |
-
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
6 |
-
<option name="SHOW_DIALOG" value="false" />
|
7 |
-
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
8 |
-
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
9 |
-
<option name="LAST_RESOLUTION" value="IGNORE" />
|
10 |
-
</component>
|
11 |
-
<component name="ComposerSettings">
|
12 |
-
<execution>
|
13 |
-
<executable />
|
14 |
-
</execution>
|
15 |
-
</component>
|
16 |
-
<component name="DatabaseView">
|
17 |
-
<option name="SHOW_INTERMEDIATE" value="true" />
|
18 |
-
<option name="GROUP_DATA_SOURCES" value="true" />
|
19 |
-
<option name="GROUP_SCHEMA" value="true" />
|
20 |
-
<option name="GROUP_CONTENTS" value="false" />
|
21 |
-
<option name="SORT_POSITIONED" value="false" />
|
22 |
-
<option name="SHOW_EMPTY_GROUPS" value="false" />
|
23 |
-
<option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
|
24 |
-
<option name="HIDDEN_KINDS">
|
25 |
-
<set />
|
26 |
-
</option>
|
27 |
-
<expand />
|
28 |
-
<select />
|
29 |
-
</component>
|
30 |
-
<component name="ProjectId" id="1Q3jb4hpa0g4BTVCOUZwMdXhH6b" />
|
31 |
-
<component name="PropertiesComponent">
|
32 |
-
<property name="WebServerToolWindowFactoryState" value="true" />
|
33 |
-
<property name="WebServerToolWindowPanel.toolwindow.highlight.mappings" value="true" />
|
34 |
-
<property name="WebServerToolWindowPanel.toolwindow.highlight.symlinks" value="true" />
|
35 |
-
<property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
|
36 |
-
<property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
|
37 |
-
<property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
|
38 |
-
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
39 |
-
<property name="node.js.detected.package.eslint" value="true" />
|
40 |
-
<property name="node.js.detected.package.tslint" value="true" />
|
41 |
-
<property name="node.js.path.for.package.eslint" value="project" />
|
42 |
-
<property name="node.js.path.for.package.tslint" value="project" />
|
43 |
-
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
44 |
-
<property name="node.js.selected.package.tslint" value="(autodetect)" />
|
45 |
-
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
46 |
-
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
47 |
-
</component>
|
48 |
-
<component name="RunDashboard">
|
49 |
-
<option name="ruleStates">
|
50 |
-
<list>
|
51 |
-
<RuleState>
|
52 |
-
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
53 |
-
</RuleState>
|
54 |
-
<RuleState>
|
55 |
-
<option name="name" value="StatusDashboardGroupingRule" />
|
56 |
-
</RuleState>
|
57 |
-
</list>
|
58 |
-
</option>
|
59 |
-
</component>
|
60 |
-
<component name="SvnConfiguration">
|
61 |
-
<configuration />
|
62 |
-
</component>
|
63 |
-
<component name="TaskManager">
|
64 |
-
<task active="true" id="Default" summary="Default task">
|
65 |
-
<changelist id="658d276d-bb11-426c-bf41-b1de1f52d7f6" name="Default Changelist" comment="" />
|
66 |
-
<created>1567006241287</created>
|
67 |
-
<option name="number" value="Default" />
|
68 |
-
<option name="presentableId" value="Default" />
|
69 |
-
<updated>1567006241287</updated>
|
70 |
-
<workItem from="1567006242850" duration="1872000" />
|
71 |
-
<workItem from="1569337570169" duration="4253000" />
|
72 |
-
<workItem from="1571843104065" duration="1508000" />
|
73 |
-
<workItem from="1572463332457" duration="478000" />
|
74 |
-
<workItem from="1572538474503" duration="6301000" />
|
75 |
-
<workItem from="1572550103057" duration="691000" />
|
76 |
-
</task>
|
77 |
-
<servers />
|
78 |
-
</component>
|
79 |
-
<component name="TypeScriptGeneratedFilesManager">
|
80 |
-
<option name="version" value="1" />
|
81 |
-
</component>
|
82 |
-
</project>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.txt
CHANGED
@@ -3,11 +3,11 @@ Contributors: ryanhungate, Mailchimp
|
|
3 |
Tags: ecommerce,email,workflows,mailchimp
|
4 |
Donate link: https://mailchimp.com
|
5 |
Requires at least: 4.9
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.3
|
8 |
Requires PHP: 7.0
|
9 |
WC requires at least: 3.5
|
10 |
-
WC tested up to: 3.
|
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.
|
@@ -63,6 +63,17 @@ The Mailchimp for WooCommerce supports Wordpress Multi Sites and below are a few
|
|
63 |
- Deleting removes the connection between Mailchimp and WooCommerce, and uninstalls the plugin from your site.
|
64 |
Refer to the Wordpress Codex for more information about [Multisite Network Administration](https://codex.wordpress.org/Multisite_Network_Administration)
|
65 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
= 2.3 =
|
67 |
* adds action scheduler queue system
|
68 |
* documentation for Custom Merge Tags
|
3 |
Tags: ecommerce,email,workflows,mailchimp
|
4 |
Donate link: https://mailchimp.com
|
5 |
Requires at least: 4.9
|
6 |
+
Tested up to: 5.3
|
7 |
+
Stable tag: 2.3.1
|
8 |
Requires PHP: 7.0
|
9 |
WC requires at least: 3.5
|
10 |
+
WC tested up to: 3.8
|
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.
|
63 |
- Deleting removes the connection between Mailchimp and WooCommerce, and uninstalls the plugin from your site.
|
64 |
Refer to the Wordpress Codex for more information about [Multisite Network Administration](https://codex.wordpress.org/Multisite_Network_Administration)
|
65 |
== Changelog ==
|
66 |
+
= 2.3.1 =
|
67 |
+
* adds fallback for mb_strpos if extension is not installed
|
68 |
+
* implements communications box on sync page
|
69 |
+
* adds account create for Mailchimp
|
70 |
+
* fixes Pending Payment and On-hold status orders passed to Mailchimp
|
71 |
+
* fixes for WooCommerce Fatal-errors
|
72 |
+
* support for WooCommerce vendor feature
|
73 |
+
* support for Shop Manager role by Woocommerce
|
74 |
+
* update to Text Domain for wp translation
|
75 |
+
* adds banner to review plugin after audience is synced
|
76 |
+
* support for user language based on wp get_locale() at order placement
|
77 |
= 2.3 =
|
78 |
* adds action scheduler queue system
|
79 |
* documentation for Custom Merge Tags
|
admin/class-mailchimp-woocommerce-admin.php
CHANGED
@@ -95,8 +95,12 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
95 |
*/
|
96 |
public function enqueue_styles($hook) {
|
97 |
wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin.css', array(), $this->version, 'all' );
|
|
|
98 |
|
99 |
if ( $hook === 'toplevel_page_mailchimp-woocommerce' ) {
|
|
|
|
|
|
|
100 |
wp_enqueue_style( $this->plugin_name."-settings", plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings.css', array(), $this->version, 'all' );
|
101 |
}
|
102 |
}
|
@@ -120,14 +124,21 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
120 |
*/
|
121 |
public function add_plugin_admin_menu() {
|
122 |
add_menu_page(
|
123 |
-
__('Mailchimp - WooCommerce Setup', '
|
124 |
'Mailchimp',
|
125 |
-
|
126 |
$this->plugin_name,
|
127 |
array($this, 'display_plugin_setup_page'), 'data:image/svg+xml;base64,'.$this->mailchimp_svg()
|
128 |
);
|
129 |
}
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
/**
|
132 |
* Setup Feedback Survey Form
|
133 |
*
|
@@ -179,10 +190,14 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
179 |
public function options_update() {
|
180 |
|
181 |
$this->handle_abandoned_cart_table();
|
182 |
-
|
183 |
$this->update_db_check();
|
184 |
|
185 |
register_setting($this->plugin_name, $this->plugin_name, array($this, 'validate'));
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
|
188 |
/**
|
@@ -256,10 +271,10 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
256 |
$constants_used[] = 'MAILCHIMP_REST_IP';
|
257 |
}
|
258 |
|
259 |
-
$text = __('Mailchimp for Woocommerce','
|
260 |
-
'<p id="http-worker-deprecated-message">'.__('We dectected that this site has the following constants defined, likely at wp-config.php file' ,'
|
261 |
implode(' | ', $constants_used).'<br/>'.
|
262 |
-
__('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.' ,'
|
263 |
|
264 |
add_settings_error('mailchimp-woocommerce_notice', $this->plugin_name, $text, 'notice-info');
|
265 |
|
@@ -306,6 +321,46 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
306 |
$data = $this->mailchimp_set_store_currency_code($new_currency_code);
|
307 |
return $this->syncStore($data);
|
308 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
|
310 |
/**
|
311 |
* We need to do a tidy up function on the mailchimp_carts table to
|
@@ -379,11 +434,11 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
379 |
if ($this->is_disconnecting()) {
|
380 |
// Disconnect store!
|
381 |
if ($data = $this->disconnect_store()) {
|
382 |
-
add_settings_error('mailchimp_store_settings', '', __('Store Disconnected', '
|
383 |
}
|
384 |
else {
|
385 |
$data['active_tab'] = 'sync';
|
386 |
-
add_settings_error('mailchimp_store_settings', '', __('Store Disconnect Failed', '
|
387 |
}
|
388 |
}
|
389 |
//case sync
|
@@ -526,6 +581,74 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
526 |
|
527 |
}
|
528 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
/**
|
530 |
* STEP 2.
|
531 |
*
|
@@ -559,6 +682,10 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
559 |
return $input;
|
560 |
}
|
561 |
|
|
|
|
|
|
|
|
|
562 |
$this->setData('validation.store_info', true);
|
563 |
|
564 |
$data['active_tab'] = 'campaign_defaults';
|
@@ -576,7 +703,13 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
576 |
* @return array
|
577 |
*/
|
578 |
protected function compileStoreInfoData($input)
|
579 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
return array(
|
581 |
// store basics
|
582 |
'store_name' => trim((isset($input['store_name']) ? $input['store_name'] : get_option('blogname'))),
|
@@ -590,6 +723,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
590 |
'store_locale' => isset($input['store_locale']) ? $input['store_locale'] : false,
|
591 |
'store_timezone' => isset($input['store_timezone']) ? $input['store_timezone'] : false,
|
592 |
'admin_email' => isset($input['admin_email']) && is_email($input['admin_email']) ? $input['admin_email'] : $this->getOption('admin_email', false),
|
|
|
593 |
);
|
594 |
}
|
595 |
|
@@ -647,7 +781,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
647 |
*/
|
648 |
protected function addInvalidAddressAlert()
|
649 |
{
|
650 |
-
add_settings_error('mailchimp_store_settings', '', __('As part of the Mailchimp Terms of Use, we require a contact email and a physical mailing address.', '
|
651 |
}
|
652 |
|
653 |
/**
|
@@ -655,7 +789,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
655 |
*/
|
656 |
protected function addInvalidPhoneAlert()
|
657 |
{
|
658 |
-
add_settings_error('mailchimp_store_settings', '', __('As part of the Mailchimp Terms of Use, we require a valid phone number for your store.', '
|
659 |
}
|
660 |
|
661 |
/**
|
@@ -663,7 +797,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
663 |
*/
|
664 |
protected function addInvalidStoreNameAlert()
|
665 |
{
|
666 |
-
add_settings_error('mailchimp_store_settings', '', __('Mailchimp for WooCommerce requires a Store Name to connect your store.', '
|
667 |
}
|
668 |
|
669 |
/**
|
@@ -681,12 +815,12 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
681 |
'campaign_from_email' => isset($input['campaign_from_email']) && is_email($input['campaign_from_email']) ? $input['campaign_from_email'] : false,
|
682 |
'campaign_subject' => isset($input['campaign_subject']) ? $input['campaign_subject'] : get_option('blogname'),
|
683 |
'campaign_language' => isset($input['campaign_language']) ? $input['campaign_language'] : 'en',
|
684 |
-
'campaign_permission_reminder' => isset($input['campaign_permission_reminder']) ? $input['campaign_permission_reminder'] : sprintf(/* translators: %s - plugin name. */esc_html__( 'You were subscribed to the newsletter from %s', '
|
685 |
);
|
686 |
|
687 |
if (!$this->hasValidCampaignDefaults($data)) {
|
688 |
$this->setData('validation.campaign_defaults', false);
|
689 |
-
add_settings_error('mailchimp_list_settings', '', __('One or more fields were not updated', '
|
690 |
return array('active_tab' => 'campaign_defaults');
|
691 |
}
|
692 |
|
@@ -727,7 +861,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
727 |
|
728 |
$data = array(
|
729 |
'mailchimp_list' => isset($input['mailchimp_list']) ? $input['mailchimp_list'] : $this->getOption('mailchimp_list', ''),
|
730 |
-
'newsletter_label' => (isset($input['newsletter_label']) && $input['newsletter_label'] != '') ? wp_kses($input['newsletter_label'], $allowed_html) : $this->getOption('newsletter_label', __('Subscribe to our newsletter', '
|
731 |
'mailchimp_auto_subscribe' => isset($input['mailchimp_auto_subscribe']) ? (bool) $input['mailchimp_auto_subscribe'] : $this->getOption('mailchimp_auto_subscribe', '0'),
|
732 |
'mailchimp_checkbox_defaults' => $checkbox,
|
733 |
'mailchimp_checkbox_action' => isset($input['mailchimp_checkbox_action']) ? $input['mailchimp_checkbox_action'] : $this->getOption('mailchimp_checkbox_action', 'woocommerce_after_checkout_billing_form'),
|
@@ -791,7 +925,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
791 |
'store_name', 'store_street', 'store_city', 'store_state',
|
792 |
'store_postal_code', 'store_country', 'store_phone',
|
793 |
'store_locale', 'store_timezone',
|
794 |
-
'store_phone',
|
795 |
), $data);
|
796 |
}
|
797 |
|
@@ -837,7 +971,7 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
837 |
public function hasValidMailChimpList()
|
838 |
{
|
839 |
if (!$this->hasValidApiKey()) {
|
840 |
-
add_settings_error('mailchimp_api_key', '', __('You must supply your Mailchimp API key to pull the audiences.', '
|
841 |
return false;
|
842 |
}
|
843 |
|
@@ -1299,12 +1433,109 @@ class MailChimp_WooCommerce_Admin extends MailChimp_WooCommerce_Options {
|
|
1299 |
*/
|
1300 |
private function showSyncStartedMessage()
|
1301 |
{
|
1302 |
-
$text = __('Starting the sync process...', '
|
1303 |
'<p id="sync-status-message">'.
|
1304 |
-
__('The plugin has started the initial sync with your store, and the process will work in the background automatically.', '
|
1305 |
' ' .
|
1306 |
-
__('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.', '
|
1307 |
'</p>';
|
1308 |
add_settings_error('mailchimp-woocommerce_notice', $this->plugin_name, $text, 'updated');
|
1309 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1310 |
}
|
95 |
*/
|
96 |
public function enqueue_styles($hook) {
|
97 |
wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin.css', array(), $this->version, 'all' );
|
98 |
+
wp_enqueue_style( $this->plugin_name . 'checkbox', plugin_dir_url( __FILE__ ) . 'css/checkbox.min.css', array(), $this->version, 'all' );
|
99 |
|
100 |
if ( $hook === 'toplevel_page_mailchimp-woocommerce' ) {
|
101 |
+
if ( get_bloginfo( 'version' ) < '5.3') {
|
102 |
+
wp_enqueue_style( $this->plugin_name."-settings", plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings-5.2.css', array(), $this->version, 'all' );
|
103 |
+
}
|
104 |
wp_enqueue_style( $this->plugin_name."-settings", plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings.css', array(), $this->version, 'all' );
|
105 |
}
|
106 |
}
|
124 |
*/
|
125 |
public function add_plugin_admin_menu() {
|
126 |
add_menu_page(
|
127 |
+
__('Mailchimp - WooCommerce Setup', 'mailchimp-for-woocommerce'),
|
128 |
'Mailchimp',
|
129 |
+
mailchimp_get_allowed_capability(),
|
130 |
$this->plugin_name,
|
131 |
array($this, 'display_plugin_setup_page'), 'data:image/svg+xml;base64,'.$this->mailchimp_svg()
|
132 |
);
|
133 |
}
|
134 |
|
135 |
+
/**
|
136 |
+
* check if current user can view options pages/ save plugin options
|
137 |
+
*/
|
138 |
+
public function mailchimp_woocommerce_option_page_capability() {
|
139 |
+
return mailchimp_get_allowed_capability();
|
140 |
+
}
|
141 |
+
|
142 |
/**
|
143 |
* Setup Feedback Survey Form
|
144 |
*
|
190 |
public function options_update() {
|
191 |
|
192 |
$this->handle_abandoned_cart_table();
|
193 |
+
|
194 |
$this->update_db_check();
|
195 |
|
196 |
register_setting($this->plugin_name, $this->plugin_name, array($this, 'validate'));
|
197 |
+
|
198 |
+
if (get_option('mailchimp-woocommerce-sync.initial_sync') == 1 && get_option('mailchimp-woocommerce-sync.completed_at') > 0 ) {
|
199 |
+
$this->mailchimp_show_initial_sync_message();
|
200 |
+
}
|
201 |
}
|
202 |
|
203 |
/**
|
271 |
$constants_used[] = 'MAILCHIMP_REST_IP';
|
272 |
}
|
273 |
|
274 |
+
$text = __('Mailchimp for Woocommerce','mailchimp-for-woocommerce').'<br/>'.
|
275 |
+
'<p id="http-worker-deprecated-message">'.__('We dectected that this site has the following constants defined, likely at wp-config.php file' ,'mailchimp-for-woocommerce').': '.
|
276 |
implode(' | ', $constants_used).'<br/>'.
|
277 |
+
__('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.' ,'mailchimp-for-woocommerce').'</p>';
|
278 |
|
279 |
add_settings_error('mailchimp-woocommerce_notice', $this->plugin_name, $text, 'notice-info');
|
280 |
|
321 |
$data = $this->mailchimp_set_store_currency_code($new_currency_code);
|
322 |
return $this->syncStore($data);
|
323 |
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* We were considering auto subscribing people that had just updated the plugin for the first time
|
327 |
+
* after releasing the marketing status block, but decided against that. The admin user must subscribe specifically.
|
328 |
+
*
|
329 |
+
* @return array|WP_Error|null
|
330 |
+
*/
|
331 |
+
protected function automatically_subscribe_admin_to_marketing()
|
332 |
+
{
|
333 |
+
$site_option = 'mailchimp_woocommerce_updated_marketing_status';
|
334 |
+
|
335 |
+
// if we've already done this, just return null.
|
336 |
+
if (get_site_option($site_option, false)) {
|
337 |
+
return null;
|
338 |
+
}
|
339 |
+
|
340 |
+
// if we've already set this value to something other than NULL, that means they've already done this.
|
341 |
+
if (($original_opt = $this->getData('comm.opt',null)) !== null) {
|
342 |
+
return null;
|
343 |
+
}
|
344 |
+
|
345 |
+
// if they have not set the admin_email yet during plugin setup, we will just return null
|
346 |
+
$admin_email = $this->getOption('admin_email');
|
347 |
+
|
348 |
+
if (empty($admin_email)) {
|
349 |
+
return null;
|
350 |
+
}
|
351 |
+
|
352 |
+
// tell the site options that we've already subscribed this person to marketing through the
|
353 |
+
// plugin update process.
|
354 |
+
update_site_option($site_option, true);
|
355 |
+
|
356 |
+
try {
|
357 |
+
// send the post to the mailchimp server
|
358 |
+
return $this->mailchimp_set_communications_status_on_server(true, $admin_email);
|
359 |
+
} catch (\Exception $e) {
|
360 |
+
mailchimp_error("initial_marketing_status", $e->getMessage());
|
361 |
+
return null;
|
362 |
+
}
|
363 |
+
}
|
364 |
|
365 |
/**
|
366 |
* We need to do a tidy up function on the mailchimp_carts table to
|
434 |
if ($this->is_disconnecting()) {
|
435 |
// Disconnect store!
|
436 |
if ($data = $this->disconnect_store()) {
|
437 |
+
add_settings_error('mailchimp_store_settings', '', __('Store Disconnected', 'mailchimp-for-woocommerce'),'notice-info');
|
438 |
}
|
439 |
else {
|
440 |
$data['active_tab'] = 'sync';
|
441 |
+
add_settings_error('mailchimp_store_settings', '', __('Store Disconnect Failed', 'mailchimp-for-woocommerce'),'notice-warning');
|
442 |
}
|
443 |
}
|
444 |
//case sync
|
581 |
|
582 |
}
|
583 |
|
584 |
+
|
585 |
+
public function mailchimp_woocommerce_ajax_create_account_check_username () {
|
586 |
+
$user = $_POST['username'];
|
587 |
+
$response = wp_remote_get( 'https://woocommerce.mailchimpapp.com/api/usernames/available/' . $_POST['username']);
|
588 |
+
$response_body = json_decode($response['body']);
|
589 |
+
if ($response['response']['code'] == 200 && $response_body->success == true ){
|
590 |
+
wp_send_json_success($response);
|
591 |
+
}
|
592 |
+
|
593 |
+
else if ($response['response']['code'] == 404 ){
|
594 |
+
wp_send_json_error(array(
|
595 |
+
'success' => false,
|
596 |
+
));
|
597 |
+
}
|
598 |
+
|
599 |
+
else {
|
600 |
+
$suggestion = wp_remote_get( 'https://woocommerce.mailchimpapp.com/api/usernames/suggestions/' . $_POST['username']);
|
601 |
+
$suggested_username = json_decode($suggestion['body'])->data;
|
602 |
+
wp_send_json_error( array(
|
603 |
+
'success' => false,
|
604 |
+
'suggestion' => $suggested_username[0]
|
605 |
+
));
|
606 |
+
}
|
607 |
+
}
|
608 |
+
|
609 |
+
public function mailchimp_woocommerce_ajax_create_account_signup() {
|
610 |
+
$data = $_POST['data'];
|
611 |
+
|
612 |
+
// try to figure out user IP address
|
613 |
+
if ($_SERVER['REMOTE_ADDR'] == '::1' || $_SERVER['REMOTE_ADDR'] == '127.0.0.1' ) {
|
614 |
+
$data['ip_address'] = '127.0.0.1';
|
615 |
+
}
|
616 |
+
else {
|
617 |
+
$data['ip_address'] = isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
|
618 |
+
}
|
619 |
+
|
620 |
+
$pload = array(
|
621 |
+
'headers' => array(
|
622 |
+
'Content-type' => 'application/json',
|
623 |
+
),
|
624 |
+
'body' => json_encode($data),
|
625 |
+
'timeout' => 30,
|
626 |
+
);
|
627 |
+
|
628 |
+
|
629 |
+
$response = wp_remote_post( 'https://woocommerce.mailchimpapp.com/api/signup/', $pload);
|
630 |
+
$response_body = json_decode($response['body']);
|
631 |
+
if ($response['response']['code'] == 200 && $response_body->success == true ){
|
632 |
+
|
633 |
+
wp_send_json_success($response_body);
|
634 |
+
}
|
635 |
+
|
636 |
+
else if ($response['response']['code'] == 404 ){
|
637 |
+
wp_send_json_error(array(
|
638 |
+
'success' => false,
|
639 |
+
));
|
640 |
+
}
|
641 |
+
|
642 |
+
else {
|
643 |
+
$suggestion = wp_remote_get( 'https://woocommerce.mailchimpapp.com/api/usernames/suggestions/' . $_POST['username']);
|
644 |
+
$suggested_username = json_decode($suggestion['body'])->data;
|
645 |
+
wp_send_json_error( array(
|
646 |
+
'success' => false,
|
647 |
+
'suggestion' => $suggested_username[0]
|
648 |
+
));
|
649 |
+
}
|
650 |
+
}
|
651 |
+
|
652 |
/**
|
653 |
* STEP 2.
|
654 |
*
|
682 |
return $input;
|
683 |
}
|
684 |
|
685 |
+
// change communication status options
|
686 |
+
$comm_opt = get_option('mailchimp-woocommerce-comm.opt', 0);
|
687 |
+
$this->mailchimp_set_communications_status_on_server($comm_opt, $data['admin_email']);
|
688 |
+
|
689 |
$this->setData('validation.store_info', true);
|
690 |
|
691 |
$data['active_tab'] = 'campaign_defaults';
|
703 |
* @return array
|
704 |
*/
|
705 |
protected function compileStoreInfoData($input)
|
706 |
+
{
|
707 |
+
$checkbox = $this->getOption('mailchimp_permission_cap', 'check');
|
708 |
+
|
709 |
+
// see if it's posted in the form.
|
710 |
+
if (isset($input['mailchimp_permission_cap']) && !empty($input['mailchimp_permission_cap'])) {
|
711 |
+
$checkbox = $input['mailchimp_permission_cap'];
|
712 |
+
}
|
713 |
return array(
|
714 |
// store basics
|
715 |
'store_name' => trim((isset($input['store_name']) ? $input['store_name'] : get_option('blogname'))),
|
723 |
'store_locale' => isset($input['store_locale']) ? $input['store_locale'] : false,
|
724 |
'store_timezone' => isset($input['store_timezone']) ? $input['store_timezone'] : false,
|
725 |
'admin_email' => isset($input['admin_email']) && is_email($input['admin_email']) ? $input['admin_email'] : $this->getOption('admin_email', false),
|
726 |
+
'mailchimp_permission_cap' => $checkbox,
|
727 |
);
|
728 |
}
|
729 |
|
781 |
*/
|
782 |
protected function addInvalidAddressAlert()
|
783 |
{
|
784 |
+
add_settings_error('mailchimp_store_settings', '', __('As part of the Mailchimp Terms of Use, we require a contact email and a physical mailing address.', 'mailchimp-for-woocommerce'));
|
785 |
}
|
786 |
|
787 |
/**
|
789 |
*/
|
790 |
protected function addInvalidPhoneAlert()
|
791 |
{
|
792 |
+
add_settings_error('mailchimp_store_settings', '', __('As part of the Mailchimp Terms of Use, we require a valid phone number for your store.', 'mailchimp-for-woocommerce'));
|
793 |
}
|
794 |
|
795 |
/**
|
797 |
*/
|
798 |
protected function addInvalidStoreNameAlert()
|
799 |
{
|
800 |
+
add_settings_error('mailchimp_store_settings', '', __('Mailchimp for WooCommerce requires a Store Name to connect your store.', 'mailchimp-for-woocommerce'));
|
801 |
}
|
802 |
|
803 |
/**
|
815 |
'campaign_from_email' => isset($input['campaign_from_email']) && is_email($input['campaign_from_email']) ? $input['campaign_from_email'] : false,
|
816 |
'campaign_subject' => isset($input['campaign_subject']) ? $input['campaign_subject'] : get_option('blogname'),
|
817 |
'campaign_language' => isset($input['campaign_language']) ? $input['campaign_language'] : 'en',
|
818 |
+
'campaign_permission_reminder' => isset($input['campaign_permission_reminder']) ? $input['campaign_permission_reminder'] : sprintf(/* translators: %s - plugin name. */esc_html__( 'You were subscribed to the newsletter from %s', 'mailchimp-for-woocommerce' ),get_option('blogname')),
|
819 |
);
|
820 |
|
821 |
if (!$this->hasValidCampaignDefaults($data)) {
|
822 |
$this->setData('validation.campaign_defaults', false);
|
823 |
+
add_settings_error('mailchimp_list_settings', '', __('One or more fields were not updated', 'mailchimp-for-woocommerce'));
|
824 |
return array('active_tab' => 'campaign_defaults');
|
825 |
}
|
826 |
|
861 |
|
862 |
$data = array(
|
863 |
'mailchimp_list' => isset($input['mailchimp_list']) ? $input['mailchimp_list'] : $this->getOption('mailchimp_list', ''),
|
864 |
+
'newsletter_label' => (isset($input['newsletter_label']) && $input['newsletter_label'] != '') ? wp_kses($input['newsletter_label'], $allowed_html) : $this->getOption('newsletter_label', __('Subscribe to our newsletter', 'mailchimp-for-woocommerce')),
|
865 |
'mailchimp_auto_subscribe' => isset($input['mailchimp_auto_subscribe']) ? (bool) $input['mailchimp_auto_subscribe'] : $this->getOption('mailchimp_auto_subscribe', '0'),
|
866 |
'mailchimp_checkbox_defaults' => $checkbox,
|
867 |
'mailchimp_checkbox_action' => isset($input['mailchimp_checkbox_action']) ? $input['mailchimp_checkbox_action'] : $this->getOption('mailchimp_checkbox_action', 'woocommerce_after_checkout_billing_form'),
|
925 |
'store_name', 'store_street', 'store_city', 'store_state',
|
926 |
'store_postal_code', 'store_country', 'store_phone',
|
927 |
'store_locale', 'store_timezone',
|
928 |
+
'store_phone','mailchimp_permission_cap',
|
929 |
), $data);
|
930 |
}
|
931 |
|
971 |
public function hasValidMailChimpList()
|
972 |
{
|
973 |
if (!$this->hasValidApiKey()) {
|
974 |
+
add_settings_error('mailchimp_api_key', '', __('You must supply your Mailchimp API key to pull the audiences.', 'mailchimp-for-woocommerce'));
|
975 |
return false;
|
976 |
}
|
977 |
|
1433 |
*/
|
1434 |
private function showSyncStartedMessage()
|
1435 |
{
|
1436 |
+
$text = __('Starting the sync process...', 'mailchimp-for-woocommerce').'<br/>'.
|
1437 |
'<p id="sync-status-message">'.
|
1438 |
+
__('The plugin has started the initial sync with your store, and the process will work in the background automatically.', 'mailchimp-for-woocommerce') .
|
1439 |
' ' .
|
1440 |
+
__('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.', 'mailchimp-for-woocommerce') .
|
1441 |
'</p>';
|
1442 |
add_settings_error('mailchimp-woocommerce_notice', $this->plugin_name, $text, 'updated');
|
1443 |
}
|
1444 |
+
|
1445 |
+
/**
|
1446 |
+
* Show the review banner.
|
1447 |
+
*/
|
1448 |
+
private function mailchimp_show_initial_sync_message()
|
1449 |
+
{
|
1450 |
+
try {
|
1451 |
+
$order_count = mailchimp_get_api()->getOrderCount(mailchimp_get_store_id());
|
1452 |
+
} catch (\Exception $e) {
|
1453 |
+
$order_count = mailchimp_get_order_count();
|
1454 |
+
}
|
1455 |
+
|
1456 |
+
$text = __('Your store is synced with Mailchimp!', 'mailchimp-for-woocommerce').'</br>'.
|
1457 |
+
'<p id="sync-status-message">'.
|
1458 |
+
/* translators: %1$s: Number of synced orders %2$s: Audience name */
|
1459 |
+
sprintf(__('We\'ve successfully synced %1$s orders to your Audience %2$s, that\'s awesome!', 'mailchimp-for-woocommerce'),
|
1460 |
+
$order_count,
|
1461 |
+
$this->getListName()
|
1462 |
+
).
|
1463 |
+
'</p>'.
|
1464 |
+
|
1465 |
+
'<p id="sync-status-message">'.
|
1466 |
+
/* translators: %s - Wordpress.org plugin review URL. */
|
1467 |
+
sprintf(wp_kses( __( '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.', 'mailchimp-for-woocommerce' ), array( 'a' => array( 'href' => array(), 'target' => '_blank' ) ) ), esc_url( 'https://wordpress.org/support/plugin/mailchimp-for-woocommerce/reviews/' ) ).
|
1468 |
+
'</p>'.
|
1469 |
+
'<a style="display:inline align-right" class="button" href="https://wordpress.org/support/plugin/mailchimp-for-woocommerce/reviews/" target=_blank>'.
|
1470 |
+
esc_html__('Leave a Review', 'mailchimp-for-woocommerce').
|
1471 |
+
'</a>';
|
1472 |
+
|
1473 |
+
add_settings_error('mailchimp-woocommerce_notice', $this->plugin_name.'-initial-sync-end', $text, 'updated');
|
1474 |
+
}
|
1475 |
+
|
1476 |
+
/**
|
1477 |
+
* Remove review banner.
|
1478 |
+
*/
|
1479 |
+
public function mailchimp_woocommerce_remove_review_banner() {
|
1480 |
+
$this->removeData('sync.initial_sync');
|
1481 |
+
wp_die();
|
1482 |
+
}
|
1483 |
+
|
1484 |
+
/**
|
1485 |
+
* set Communications status via sync page.
|
1486 |
+
*/
|
1487 |
+
public function mailchimp_woocommerce_communication_status() {
|
1488 |
+
$original_opt = $this->getData('comm.opt',0);
|
1489 |
+
$opt = $_POST['opt'];
|
1490 |
+
$admin_email = $this->getOptions()['admin_email'];
|
1491 |
+
|
1492 |
+
mailchimp_debug('communication_status', "setting to {$opt}");
|
1493 |
+
|
1494 |
+
// try to set the info on the server
|
1495 |
+
// post to communications api
|
1496 |
+
$response = $this->mailchimp_set_communications_status_on_server($opt, $admin_email);
|
1497 |
+
|
1498 |
+
// if success, set internal option to check for opt and display on sync page
|
1499 |
+
if ($response['response']['code'] == 200) {
|
1500 |
+
$response_body = json_decode($response['body']);
|
1501 |
+
if (isset($response_body) && $response_body->success == true) {
|
1502 |
+
$this->setData('comm.opt', $opt);
|
1503 |
+
wp_send_json_success(__('Saved', 'mailchimp-for-woocommerce'));
|
1504 |
+
}
|
1505 |
+
}
|
1506 |
+
else {
|
1507 |
+
//if error, keep option to original value
|
1508 |
+
wp_send_json_error(array('error' => __('Error setting communications status', 'mailchimp-for-woocommerce'), 'opt' => $original_opt));
|
1509 |
+
}
|
1510 |
+
|
1511 |
+
wp_die();
|
1512 |
+
}
|
1513 |
+
|
1514 |
+
/**
|
1515 |
+
* set Communications box status.
|
1516 |
+
*/
|
1517 |
+
public function mailchimp_set_communications_status_on_server($opt, $admin_email) {
|
1518 |
+
$env = mailchimp_environment_variables();
|
1519 |
+
|
1520 |
+
$post_data = array(
|
1521 |
+
'store_id' => mailchimp_get_store_id(),
|
1522 |
+
'email' => $admin_email,
|
1523 |
+
'domain' => site_url(),
|
1524 |
+
'marketing_status' => $opt,
|
1525 |
+
'plugin_version' => "MailChimp for WooCommerce/{$env->version}; PHP/{$env->php_version}; WordPress/{$env->wp_version}; Woo/{$env->wc_version};"
|
1526 |
+
);
|
1527 |
+
|
1528 |
+
$route = "https://woocommerce.mailchimpapp.com/api/opt_in_status";
|
1529 |
+
|
1530 |
+
return wp_remote_post(esc_url_raw($route), array(
|
1531 |
+
'timeout' => 12,
|
1532 |
+
'cache-control' => 'no-cache',
|
1533 |
+
'blocking' => true,
|
1534 |
+
'method' => 'POST',
|
1535 |
+
'data_format' => 'body',
|
1536 |
+
'headers' => array('Content-Type' => 'application/json; charset=utf-8'),
|
1537 |
+
'body' => json_encode($post_data),
|
1538 |
+
));
|
1539 |
+
}
|
1540 |
+
|
1541 |
}
|
admin/css/checkbox.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.el-radio,.el-checkbox{position:relative;font-size:100%}label.el-radio,label.el-checkbox{display:block;cursor:pointer}.el-radio>input[type="radio"],.el-checkbox>input[type="checkbox"]{display:none}.el-radio>input[type="radio"][disabled],.el-checkbox>input[type="checkbox"][disabled]{cursor:not-allowed}.el-radio>input[type="radio"]+.el-radio-style,.el-checkbox>input[type="checkbox"]+.el-checkbox-style{position:relative;display:inline-block;width:1.4em;height:1.4em;vertical-align:middle;cursor:pointer}.el-radio>input[type="radio"]+.el-radio-style:hover:before,.el-checkbox>input[type="checkbox"]+.el-checkbox-style:hover:before{border-color:#20a0ff}.el-radio>input[type="radio"]+.el-radio-style:before,.el-checkbox>input[type="checkbox"]+.el-checkbox-style:before{position:absolute;top:0;left:0;display:inline-block;width:1.4em;height:1.4em;content:'';border:1px solid #C0CCDA}.el-radio>input[type="radio"]+.el-radio-style:after,.el-checkbox>input[type="checkbox"]+.el-checkbox-style:after{position:absolute;display:none;content:''}.el-radio>input[type="radio"][disabled]+.el-radio-style,.el-checkbox>input[type="checkbox"][disabled]+.el-checkbox-style{cursor:not-allowed;color:#D3DCE6}.el-radio>input[type="radio"][disabled]+.el-radio-style:hover,.el-radio>input[type="radio"][disabled]+.el-radio-style:before,.el-radio>input[type="radio"][disabled]+.el-radio-style:after,.el-checkbox>input[type="checkbox"][disabled]+.el-checkbox-style:hover,.el-checkbox>input[type="checkbox"][disabled]+.el-checkbox-style:before,.el-checkbox>input[type="checkbox"][disabled]+.el-checkbox-style:after{cursor:not-allowed}.el-radio>input[type="radio"][disabled]+.el-radio-style:hover:before,.el-checkbox>input[type="checkbox"][disabled]+.el-checkbox-style:hover:before{border:1px solid #D3DCE6;animation-name:none}.el-radio>input[type="radio"][disabled]+.el-radio-style:before,.el-checkbox>input[type="checkbox"][disabled]+.el-checkbox-style:before{border-color:#D3DCE6}.el-radio>input[type="radio"]:checked+.el-radio-style:before,.el-checkbox>input[type="checkbox"]:checked+.el-checkbox-style:before{animation-name:none}.el-radio>input[type="radio"]:checked+.el-radio-style:after,.el-checkbox>input[type="checkbox"]:checked+.el-checkbox-style:after{display:block}.el-radio>input[type="radio"]+.el-radio-style:before{border-radius:50%}.el-radio>input[type="radio"]+.el-radio-style:after{top:.4em;left:.4em;width:.6em;height:.6em;border-radius:50%;background:#20a0ff}.el-radio>input[type="radio"]:checked+.el-radio-style:before{border:1px solid #20a0ff}.el-radio>input[type="radio"]:checked[disabled]+.el-radio-style:before{border:1px solid #b0d7f5}.el-radio>input[type="radio"]:checked[disabled]+.el-radio-style:after{background:#b0d7f5}.el-checkbox>input[type="checkbox"]+.el-checkbox-style:before{border-radius:3px}.el-checkbox>input[type="checkbox"]+.el-checkbox-style:after{top:.15em;left:.5em;box-sizing:border-box;width:.4em;height:.85em;transform:rotate(45deg);border-right:2px solid #fff;border-bottom:2px solid #fff}.el-checkbox>input[type="checkbox"]:checked+.el-checkbox-style:before{border:#20a0ff;background:#20a0ff}.el-checkbox>input[type="checkbox"]:checked[disabled]+.el-checkbox-style:before{border:#b0d7f5;background:#b0d7f5}.el-radio.el-radio-blue>input[type="radio"]+label:hover:before,.el-checkbox.el-checkbox-blue>input[type="checkbox"]+label:hover:before,.el-radio.el-radio-blue>input[type="radio"]:checked+label:before,.el-checkbox.el-checkbox-blue>input[type="checkbox"]:checked+label:before{border-color:#20a0ff}.el-checkbox.el-checkbox-blue>input[type="checkbox"]:checked+label:before,.el-radio.el-radio-blue>input[type="radio"]+label:after{background:#20a0ff}.el-radio.el-radio-blue>input[type="radio"][disabled]+label:hover:before,.el-checkbox.el-checkbox-blue>input[type="checkbox"][disabled]+label:hover:before{border-color:#D3DCE6}.el-checkbox.el-checkbox-blue>input[type="checkbox"]:checked[disabled]+label:before,.el-radio.el-radio-blue>input[type="radio"]:checked[disabled]+label:before{border-color:#b0d7f5}.el-checkbox.el-checkbox-blue>input[type="checkbox"][disabled]:checked+label:before,.el-radio.el-radio-blue>input[type="radio"]:checked[disabled]+label:after{background:#b0d7f5}.el-radio.el-radio-green>input[type="radio"]+label:hover:before,.el-checkbox.el-checkbox-green>input[type="checkbox"]+label:hover:before,.el-radio.el-radio-green>input[type="radio"]:checked+label:before,.el-checkbox.el-checkbox-green>input[type="checkbox"]:checked+label:before{border-color:#13ce66}.el-checkbox.el-checkbox-green>input[type="checkbox"]:checked+label:before,.el-radio.el-radio-green>input[type="radio"]+label:after{background:#13ce66}.el-radio.el-radio-green>input[type="radio"][disabled]+label:hover:before,.el-checkbox.el-checkbox-green>input[type="checkbox"][disabled]+label:hover:before{border-color:#D3DCE6}.el-checkbox.el-checkbox-green>input[type="checkbox"]:checked[disabled]+label:before,.el-radio.el-radio-green>input[type="radio"]:checked[disabled]+label:before{border-color:#a1efc4}.el-checkbox.el-checkbox-green>input[type="checkbox"][disabled]:checked+label:before,.el-radio.el-radio-green>input[type="radio"]:checked[disabled]+label:after{background:#a1efc4}.el-radio.el-radio-red>input[type="radio"]+label:hover:before,.el-checkbox.el-checkbox-red>input[type="checkbox"]+label:hover:before,.el-radio.el-radio-red>input[type="radio"]:checked+label:before,.el-checkbox.el-checkbox-red>input[type="checkbox"]:checked+label:before{border-color:#ff4949}.el-checkbox.el-checkbox-red>input[type="checkbox"]:checked+label:before,.el-radio.el-radio-red>input[type="radio"]+label:after{background:#ff4949}.el-radio.el-radio-red>input[type="radio"][disabled]+label:hover:before,.el-checkbox.el-checkbox-red>input[type="checkbox"][disabled]+label:hover:before{border-color:#D3DCE6}.el-checkbox.el-checkbox-red>input[type="checkbox"]:checked[disabled]+label:before,.el-radio.el-radio-red>input[type="radio"]:checked[disabled]+label:before{border-color:#f9b3b3}.el-checkbox.el-checkbox-red>input[type="checkbox"][disabled]:checked+label:before,.el-radio.el-radio-red>input[type="radio"]:checked[disabled]+label:after{background:#f9b3b3}.el-radio.el-radio-yellow>input[type="radio"]+label:hover:before,.el-checkbox.el-checkbox-yellow>input[type="checkbox"]+label:hover:before,.el-radio.el-radio-yellow>input[type="radio"]:checked+label:before,.el-checkbox.el-checkbox-yellow>input[type="checkbox"]:checked+label:before{border-color:#f7ba2a}.el-checkbox.el-checkbox-yellow>input[type="checkbox"]:checked+label:before,.el-radio.el-radio-yellow>input[type="radio"]+label:after{background:#f7ba2a}.el-radio.el-radio-yellow>input[type="radio"][disabled]+label:hover:before,.el-checkbox.el-checkbox-yellow>input[type="checkbox"][disabled]+label:hover:before{border-color:#D3DCE6}.el-checkbox.el-checkbox-yellow>input[type="checkbox"]:checked[disabled]+label:before,.el-radio.el-radio-yellow>input[type="radio"]:checked[disabled]+label:before{border-color:#fbeac1}.el-checkbox.el-checkbox-yellow>input[type="checkbox"][disabled]:checked+label:before,.el-radio.el-radio-yellow>input[type="radio"]:checked[disabled]+label:after{background:#fbeac1}.el-switch,.el-switch-style,.el-switch-style:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.el-switch{display:inline-block;font-size:100%;height:1.6em;position:relative}.el-switch .el-switch-style{height:1.6em;left:0;background:#C0CCDA;-webkit-border-radius:.8em;border-radius:.8em;display:inline-block;position:relative;top:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;width:3em;cursor:pointer}.el-switch .el-switch-style:before{display:block;content:'';height:1.4em;position:absolute;width:1.4em;background-color:#fff;-webkit-border-radius:50%;border-radius:50%;left:.1em;top:.1em;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.el-switch>input[type="checkbox"]{display:none}.el-switch>input[type="checkbox"][disabled]+.el-switch-style{cursor:not-allowed;background-color:#D3DCE6}.el-switch>input[type="checkbox"]:checked+.el-switch-style{background-color:#20a0ff}.el-switch>input[type="checkbox"]:checked+.el-switch-style:before{left:50%}.el-switch>input[type="checkbox"]:checked[disabled]+.el-switch-style{background-color:#b0d7f5}.el-switch.el-switch-blue>input[type="checkbox"]:checked+.el-switch-style{background-color:#20a0ff}.el-switch.el-switch-blue>input[type="checkbox"]:checked[disabled]+.el-switch-style{background-color:#b0d7f5}.el-switch.el-switch-green>input[type="checkbox"]:checked+.el-switch-style{background-color:#13ce66}.el-switch.el-switch-green>input[type="checkbox"]:checked[disabled]+.el-switch-style{background-color:#a1efc4}.el-switch.el-switch-red>input[type="checkbox"]:checked+.el-switch-style{background-color:#ff4949}.el-switch.el-switch-red>input[type="checkbox"]:checked[disabled]+.el-switch-style{background-color:#f9b3b3}.el-switch.el-switch-yellow>input[type="checkbox"]:checked+.el-switch-style{background-color:#f7ba2a}.el-switch.el-switch-yellow>input[type="checkbox"]:checked[disabled]+.el-switch-style{background-color:#fbeac1}.el-radio.el-radio-sm,.el-checkbox.el-checkbox-sm,.el-switch.el-switch-sm{font-size:85%}.el-radio.el-radio-lg,.el-checkbox.el-checkbox-lg,.el-switch.el-switch-lg{font-size:125%}
|
admin/css/mailchimp-woocommerce-admin-settings-5.2.css
ADDED
@@ -0,0 +1,999 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
.mc-woocommerce-settings {
|
14 |
+
width:90%;
|
15 |
+
margin: 4em auto 0 auto;
|
16 |
+
font-family: "proxima-nova", Arial, Helvetica, sans-serif;
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
.mc-woocommerce-settings p {
|
21 |
+
font-size: 14px;
|
22 |
+
font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif;
|
23 |
+
}
|
24 |
+
|
25 |
+
.mc-woocommerce-settings-subtitles {
|
26 |
+
font-family: "proxima-nova", Arial, Helvetica, sans-serif;
|
27 |
+
font-size: 22px !important;
|
28 |
+
line-height: 32px;
|
29 |
+
color: #3C3C3C;
|
30 |
+
}
|
31 |
+
|
32 |
+
.description {
|
33 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
34 |
+
font-size: 12px !important;
|
35 |
+
line-height: 16px !important;
|
36 |
+
color: #B3B3B3 !important;
|
37 |
+
}
|
38 |
+
/* .notice {
|
39 |
+
background: rgba(127, 173, 69, 0.1) !important;
|
40 |
+
mix-blend-mode: normal !important;
|
41 |
+
border: 1px solid rgba(127, 173, 69, 0.5) !important;
|
42 |
+
box-sizing: border-box !important;
|
43 |
+
border-radius: 4px !important;
|
44 |
+
}
|
45 |
+
|
46 |
+
.notice.notice-error {
|
47 |
+
background: rgba(250, 50, 50, 0.1) !important;
|
48 |
+
border: 1px solid rgba(250, 50, 50, 0.5) !important;
|
49 |
+
}
|
50 |
+
|
51 |
+
.notice.notice-info {
|
52 |
+
background: rgba(0, 160, 210, 0.1) !important;
|
53 |
+
border: 1px solid rgba(0, 160, 210, 0.5) !important;
|
54 |
+
}
|
55 |
+
|
56 |
+
.notice.notice-warning {
|
57 |
+
background: rgba(255, 185, 0, 0.1) !important;
|
58 |
+
border: 1px solid rgba(255, 185, 0, 0.5) !important;
|
59 |
+
} */
|
60 |
+
|
61 |
+
|
62 |
+
.nav-wizard-wrapper {
|
63 |
+
cursor: default;
|
64 |
+
margin-bottom: 110px !important;
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
.nav-wizard-wrapper .wizard-tab {
|
69 |
+
display: inline-block;
|
70 |
+
height: 13px;
|
71 |
+
width: 57px;
|
72 |
+
margin-right: 0.5em;
|
73 |
+
border-bottom: 3px solid #E6E6E6;
|
74 |
+
position: relative;
|
75 |
+
align-items: center;
|
76 |
+
text-align: center;
|
77 |
+
text-transform: uppercase;
|
78 |
+
}
|
79 |
+
|
80 |
+
.nav-wizard-wrapper .wizard-tab-active,
|
81 |
+
.nav-wizard-wrapper a.wizard-tab:hover {
|
82 |
+
border-bottom: 3px solid #212121;
|
83 |
+
}
|
84 |
+
|
85 |
+
.nav-wizard-wrapper .wizard-tab .wizard-tab-tooltip{
|
86 |
+
display: none;
|
87 |
+
}
|
88 |
+
|
89 |
+
.nav-wizard-wrapper .wizard-tab-active .wizard-tab-tooltip{
|
90 |
+
display: block;
|
91 |
+
}
|
92 |
+
|
93 |
+
.nav-wizard-wrapper .wizard-tab .wizard-tab-tooltip {
|
94 |
+
position: absolute;
|
95 |
+
left: 0;
|
96 |
+
top: 40px;
|
97 |
+
width: 150px;
|
98 |
+
background: white;
|
99 |
+
border-radius: 6px;
|
100 |
+
padding: 20px 30px;
|
101 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
102 |
+
font-size: 14px;
|
103 |
+
line-height: 17px;
|
104 |
+
color: #3C3C3C;
|
105 |
+
}
|
106 |
+
|
107 |
+
.nav-wizard-wrapper .wizard-tab .wizard-tab-tooltip svg{
|
108 |
+
position: absolute;
|
109 |
+
left: 13px;
|
110 |
+
top: -13px;
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
.nav-tab-wrapper {
|
115 |
+
border-bottom: 2px solid white !important;
|
116 |
+
margin-bottom: 25px !important;
|
117 |
+
}
|
118 |
+
|
119 |
+
.nav-tab-wrapper .nav-tab {
|
120 |
+
background: #F1F1F1;
|
121 |
+
border-radius: 4px 4px 0px 0px;
|
122 |
+
border: 1px solid #F1F1F1;
|
123 |
+
border-bottom: none;
|
124 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
125 |
+
font-size: 14px;
|
126 |
+
line-height: 24px;
|
127 |
+
text-align: center;
|
128 |
+
color: #212121;
|
129 |
+
padding: 20px 35px;
|
130 |
+
-webkit-transition: padding 0.1s ease-out;
|
131 |
+
-moz-transition: padding 0.1s ease-out;
|
132 |
+
-o-transition: padding 0.1s ease-out;
|
133 |
+
transition: padding 0.1s ease-out;
|
134 |
+
}
|
135 |
+
|
136 |
+
.nav-tab-wrapper .nav-tab:first-of-type {
|
137 |
+
margin-left: 0;
|
138 |
+
}
|
139 |
+
|
140 |
+
.nav-tab-wrapper .nav-tab:focus {
|
141 |
+
outline: none !important;
|
142 |
+
box-shadow: none !important;
|
143 |
+
}
|
144 |
+
|
145 |
+
.nav-tab-wrapper .nav-tab:hover:not(.nav-tab-active) {
|
146 |
+
background: #F5F5F5;
|
147 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
148 |
+
font-size: 14px;
|
149 |
+
line-height: 24px;
|
150 |
+
text-align: center;
|
151 |
+
color: #212121;
|
152 |
+
padding: 18px 35px 22px 35px;
|
153 |
+
-webkit-transition: padding 0.1s ease-out;
|
154 |
+
-moz-transition: padding 0.1s ease-out;
|
155 |
+
-o-transition: padding 0.1s ease-out;
|
156 |
+
transition: padding 0.1s ease-out;
|
157 |
+
}
|
158 |
+
|
159 |
+
.nav-tab-wrapper .nav-tab-active {
|
160 |
+
background: white;
|
161 |
+
padding: 18px 35px 22px 35px;
|
162 |
+
border-radius: 4px 4px 0px 0px;
|
163 |
+
border: 1px solid #F1F1F1;
|
164 |
+
border-bottom: none;
|
165 |
+
}
|
166 |
+
|
167 |
+
.tab-content-wrapper {
|
168 |
+
background: white;
|
169 |
+
padding: 0;
|
170 |
+
margin: 0;
|
171 |
+
-webkit-box-sizing: border-box;
|
172 |
+
-moz-box-sizing: border-box;
|
173 |
+
box-sizing: border-box;
|
174 |
+
}
|
175 |
+
|
176 |
+
.tab-content-wrapper *,
|
177 |
+
.sync-content-wrapper {
|
178 |
+
margin: 0;
|
179 |
+
padding: 0;
|
180 |
+
border: 0;
|
181 |
+
-webkit-box-sizing: border-box;
|
182 |
+
-moz-box-sizing: border-box;
|
183 |
+
box-sizing: border-box;
|
184 |
+
}
|
185 |
+
|
186 |
+
.tab-content-wrapper a {
|
187 |
+
color: #8D5C87;
|
188 |
+
text-decoration: none;
|
189 |
+
}
|
190 |
+
.tab-content-wrapper a:hover {
|
191 |
+
text-decoration: underline;
|
192 |
+
}
|
193 |
+
|
194 |
+
.tab-content-wrapper form {
|
195 |
+
margin: 0 auto;
|
196 |
+
padding: 3em;
|
197 |
+
}
|
198 |
+
|
199 |
+
.tab-content-wrapper fieldset{
|
200 |
+
background: white;
|
201 |
+
width: 100%;
|
202 |
+
}
|
203 |
+
|
204 |
+
.tab-content-wrapper fieldset .fieldset-header{
|
205 |
+
float: left;
|
206 |
+
padding-top: 3em;
|
207 |
+
width: 100%;
|
208 |
+
font-size: 18px;
|
209 |
+
}
|
210 |
+
|
211 |
+
.tab-content-wrapper p.submit {
|
212 |
+
margin-top: 0 !important;
|
213 |
+
padding-top: 0 !important;
|
214 |
+
margin-bottom: 45px !important;
|
215 |
+
font-weight: 600;
|
216 |
+
}
|
217 |
+
|
218 |
+
.tab-content-wrapper p.submit:focus {
|
219 |
+
margin-top: 10px !important;
|
220 |
+
}
|
221 |
+
|
222 |
+
.tab-content-submit,
|
223 |
+
.mc-woocommerce-resync-button,
|
224 |
+
.mc-woocommerce-copy-log-button {
|
225 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif !important;
|
226 |
+
font-size: 14px !important;
|
227 |
+
line-height: 16px !important;
|
228 |
+
padding: 15px 35px 27px 35px !important;
|
229 |
+
|
230 |
+
/* identical to box height */
|
231 |
+
text-transform: uppercase !important;
|
232 |
+
color: #FFFFFF !important;
|
233 |
+
border-radius: 100px !important;
|
234 |
+
border: none !important;
|
235 |
+
|
236 |
+
}
|
237 |
+
|
238 |
+
.oauth-description {
|
239 |
+
display: none;
|
240 |
+
}
|
241 |
+
|
242 |
+
#mailchimp-oauth-connected {
|
243 |
+
color: #7FAD45;
|
244 |
+
}
|
245 |
+
|
246 |
+
.mc-woocommerce-copy-log-button {
|
247 |
+
padding-bottom: 15px !important;
|
248 |
+
text-decoration: none;
|
249 |
+
}
|
250 |
+
|
251 |
+
.tab-content-submit {
|
252 |
+
float:right;
|
253 |
+
background: #7FAD45 !important;
|
254 |
+
box-shadow:0 1px 0 #7FAD45 !important;
|
255 |
+
text-shadow: 0 -1px 1px #7FAD45,1px 0 1px #7FAD45,0 1px 1px #7FAD45,-1px 0 1px #7FAD45 !important;
|
256 |
+
-webkit-transition: background-color 0.3s ease-out,
|
257 |
+
text-shadow 0.3s ease-out,
|
258 |
+
box-shadow 0.3s ease-out;
|
259 |
+
-moz-transition: background-color 0.3s ease-out,
|
260 |
+
text-shadow 0.3s ease-out,
|
261 |
+
box-shadow 0.3s ease-out;
|
262 |
+
-o-transition: background-color 0.3s ease-out,
|
263 |
+
text-shadow 0.3s ease-out,
|
264 |
+
box-shadow 0.3s ease-out;
|
265 |
+
transition: background-color 0.3s ease-out,
|
266 |
+
text-shadow 0.3s ease-out,
|
267 |
+
box-shadow 0.3s ease-out;
|
268 |
+
}
|
269 |
+
|
270 |
+
.disconnect-button {
|
271 |
+
width:180px;
|
272 |
+
margin: 0 0.5em !important;
|
273 |
+
}
|
274 |
+
|
275 |
+
.tab-content-submit:hover {
|
276 |
+
float:right;
|
277 |
+
background: #9EC769 !important;
|
278 |
+
box-shadow:0 1px 0 #9EC769 !important;
|
279 |
+
text-shadow: 0 -1px 1px #9EC769,1px 0 1px #9EC769,0 1px 1px #9EC769,-1px 0 1px #9EC769 !important;
|
280 |
+
-webkit-transition: background-color 0.3s ease-out,
|
281 |
+
text-shadow 0.3s ease-out,
|
282 |
+
box-shadow 0.3s ease-out;
|
283 |
+
-moz-transition: background-color 0.3s ease-out,
|
284 |
+
text-shadow 0.3s ease-out,
|
285 |
+
box-shadow 0.3s ease-out;
|
286 |
+
-o-transition: background-color 0.3s ease-out,
|
287 |
+
text-shadow 0.3s ease-out,
|
288 |
+
box-shadow 0.3s ease-out;
|
289 |
+
transition: background-color 0.3s ease-out,
|
290 |
+
text-shadow 0.3s ease-out,
|
291 |
+
box-shadow 0.3s ease-out;
|
292 |
+
text-decoration: none !important;
|
293 |
+
}
|
294 |
+
|
295 |
+
.mc-woocommerce-resync-button,
|
296 |
+
.mc-woocommerce-copy-log-button {
|
297 |
+
color: #3C3C3C !important;
|
298 |
+
background: #E6E6E6 !important;
|
299 |
+
box-shadow:0 1px 0 #E6E6E6 !important;
|
300 |
+
text-shadow: 0 -1px 1px #E6E6E6,1px 0 1px #E6E6E6,0 1px 1px #E6E6E6,-1px 0 1px #E6E6E6 !important;
|
301 |
+
-webkit-transition: background-color 0.3s ease-out,
|
302 |
+
text-shadow 0.3s ease-out,
|
303 |
+
box-shadow 0.3s ease-out;
|
304 |
+
-moz-transition: background-color 0.3s ease-out,
|
305 |
+
text-shadow 0.3s ease-out,
|
306 |
+
box-shadow 0.3s ease-out;
|
307 |
+
-o-transition: background-color 0.3s ease-out,
|
308 |
+
text-shadow 0.3s ease-out,
|
309 |
+
box-shadow 0.3s ease-out;
|
310 |
+
transition: background-color 0.3s ease-out,
|
311 |
+
text-shadow 0.3s ease-out,
|
312 |
+
box-shadow 0.3s ease-out;
|
313 |
+
|
314 |
+
}
|
315 |
+
|
316 |
+
.mc-woocommerce-resync-button:hover,
|
317 |
+
.mc-woocommerce-copy-log-button:hover {
|
318 |
+
color: #3C3C3C !important;
|
319 |
+
background: #DADADA !important;
|
320 |
+
box-shadow:0 1px 0 #DADADA !important;
|
321 |
+
text-shadow: 0 -1px 1px #DADADA,1px 0 1px #DADADA,0 1px 1px #DADADA,-1px 0 1px #DADADA !important;
|
322 |
+
-webkit-transition: background-color 0.3s ease-out,
|
323 |
+
text-shadow 0.3s ease-out,
|
324 |
+
box-shadow 0.3s ease-out;
|
325 |
+
-moz-transition: background-color 0.3s ease-out,
|
326 |
+
text-shadow 0.3s ease-out,
|
327 |
+
box-shadow 0.3s ease-out;
|
328 |
+
-o-transition: background-color 0.3s ease-out,
|
329 |
+
text-shadow 0.3s ease-out,
|
330 |
+
box-shadow 0.3s ease-out;
|
331 |
+
transition: background-color 0.3s ease-out,
|
332 |
+
text-shadow 0.3s ease-out,
|
333 |
+
box-shadow 0.3s ease-out;
|
334 |
+
}
|
335 |
+
|
336 |
+
.tab-content-submit:focus,.tab-content-submit:hover{
|
337 |
+
background: rgb(149, 189, 101);
|
338 |
+
border-color: rgb(149, 189, 101);
|
339 |
+
color:#fff;
|
340 |
+
box-shadow:0 1px 0 rgb(149, 189, 101);
|
341 |
+
}
|
342 |
+
|
343 |
+
.tab-content-wrapper label {
|
344 |
+
display: block;
|
345 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
346 |
+
font-size: 14px;
|
347 |
+
font-weight: 600 !important;
|
348 |
+
line-height: 30px;
|
349 |
+
width: 100%;
|
350 |
+
color: #3C3C3C;
|
351 |
+
}
|
352 |
+
|
353 |
+
.tab-content-wrapper h4 {
|
354 |
+
margin-top: 0;
|
355 |
+
}
|
356 |
+
|
357 |
+
.sync-content-wrapper {
|
358 |
+
display: table;
|
359 |
+
width: 100%;
|
360 |
+
}
|
361 |
+
|
362 |
+
.sync-comm-wrapper {
|
363 |
+
position:relative;
|
364 |
+
background-color: white;
|
365 |
+
padding: 4px 2em;
|
366 |
+
margin-top: 26px;
|
367 |
+
-webkit-border-radius: 4px;
|
368 |
+
-moz-border-radius: 4px;
|
369 |
+
border-radius: 4px;
|
370 |
+
height: 164px;
|
371 |
+
}
|
372 |
+
|
373 |
+
.sync-comm-wrapper .comm_box_status {
|
374 |
+
font-weight: 700;
|
375 |
+
}
|
376 |
+
|
377 |
+
.el-switch > input[type="checkbox"]:checked + .el-switch-style {
|
378 |
+
background-color: #4DD463;
|
379 |
+
}
|
380 |
+
|
381 |
+
.comm_box_wrapper fieldset {
|
382 |
+
border: 2px solid #E0E0E0;
|
383 |
+
padding: 0 1em 0 1em;
|
384 |
+
margin: 1em 0;
|
385 |
+
}
|
386 |
+
|
387 |
+
.comm_box_wrapper .el-switch,
|
388 |
+
.comm_box_wrapper .mc-comm-save{
|
389 |
+
float: right;
|
390 |
+
}
|
391 |
+
|
392 |
+
.comm_box_wrapper .mc-comm-save {
|
393 |
+
margin-right: 10px;
|
394 |
+
}
|
395 |
+
|
396 |
+
.sync-content-wrapper .sync-stats-wrapper {
|
397 |
+
position:relative;
|
398 |
+
background-color: white;
|
399 |
+
padding: 4px 2em 0 2em;
|
400 |
+
margin-right: 2em;
|
401 |
+
-webkit-border-radius: 4px;
|
402 |
+
-moz-border-radius: 4px;
|
403 |
+
border-radius: 4px;
|
404 |
+
}
|
405 |
+
|
406 |
+
.sync-content-wrapper .sync-stats-card {
|
407 |
+
width: 100%;
|
408 |
+
border-bottom: 1px solid #E6E6E6;
|
409 |
+
padding: 2em 0;
|
410 |
+
min-height: 20px;
|
411 |
+
}
|
412 |
+
|
413 |
+
.sync-content-wrapper .sync-stats-card:last-child {
|
414 |
+
border-bottom: none;
|
415 |
+
}
|
416 |
+
|
417 |
+
.sync-content-wrapper .sync-stats-card .sync-stats-card-content{
|
418 |
+
position:relative;
|
419 |
+
}
|
420 |
+
|
421 |
+
.sync-content-wrapper .sync-stats-card span.card_label,
|
422 |
+
.sync-content-wrapper .sync-stats-card span.card_label{
|
423 |
+
padding-left: 0.7em;
|
424 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
425 |
+
font-size: 14px;
|
426 |
+
line-height: 14px;
|
427 |
+
}
|
428 |
+
|
429 |
+
.sync-content-wrapper .sync-stats-card span.card_count,
|
430 |
+
.sync-content-wrapper .sync-stats-card span.card_count{
|
431 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
432 |
+
font-size: 22px;
|
433 |
+
line-height: 22px;
|
434 |
+
position: absolute;
|
435 |
+
right: 1em;
|
436 |
+
margin: 0;
|
437 |
+
}
|
438 |
+
|
439 |
+
|
440 |
+
.sync-content-wrapper .sync-stats-card .card_count_label {
|
441 |
+
position: absolute;
|
442 |
+
top: -1.3em;
|
443 |
+
right: 0;
|
444 |
+
color: #E6E6E6;
|
445 |
+
}
|
446 |
+
|
447 |
+
.sync-content-wrapper .sync-stats-card .sync-loader {
|
448 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
449 |
+
font-size: 22px;
|
450 |
+
line-height: 22px;
|
451 |
+
position: absolute;
|
452 |
+
right: 1em;
|
453 |
+
margin: 8px 0px;
|
454 |
+
visibility: hidden;
|
455 |
+
}
|
456 |
+
|
457 |
+
.progress-bar-wrapper {
|
458 |
+
position: absolute;
|
459 |
+
top: 0.6em;
|
460 |
+
right: 1.8em;
|
461 |
+
background: #F7F7F7;
|
462 |
+
width: 50%;
|
463 |
+
height: 3px;
|
464 |
+
display: none;
|
465 |
+
}
|
466 |
+
|
467 |
+
.progress-bar {
|
468 |
+
background: #8D5C87;
|
469 |
+
width: 0%;
|
470 |
+
height: 3px;
|
471 |
+
}
|
472 |
+
|
473 |
+
.sync-content-wrapper .sync-controls-wrapper {
|
474 |
+
background-color: #E6E6E6;
|
475 |
+
-webkit-border-radius: 4px;
|
476 |
+
-moz-border-radius: 4px;
|
477 |
+
border-radius: 4px;
|
478 |
+
display: table-cell;
|
479 |
+
width: 60%;
|
480 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
481 |
+
font-size: 14px ;
|
482 |
+
line-height: 14px;
|
483 |
+
}
|
484 |
+
|
485 |
+
.sync-content-wrapper .sync-controls {
|
486 |
+
padding: 1em 1em 1em 3em;
|
487 |
+
font-size: 14px;
|
488 |
+
line-height: 14px;
|
489 |
+
}
|
490 |
+
|
491 |
+
.sync-content-wrapper .sync-controls .mc-woocommerce-last-sync{
|
492 |
+
margin-top: 14em;
|
493 |
+
}
|
494 |
+
|
495 |
+
.sync-content-wrapper .mc-woocommerce-disconnect-button,
|
496 |
+
.mc-woocommerce-delete-log-button {
|
497 |
+
cursor: pointer;
|
498 |
+
padding-top: 1em;
|
499 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
500 |
+
font-size: 14px;
|
501 |
+
line-height: 17px;
|
502 |
+
font-weight: 600;
|
503 |
+
display: flex;
|
504 |
+
align-items: center;
|
505 |
+
text-transform: uppercase;
|
506 |
+
text-decoration: none;
|
507 |
+
color: #3C3C3C;
|
508 |
+
border: none;
|
509 |
+
border-radius: 100px;
|
510 |
+
padding: 1em 2em 1em 1em;
|
511 |
+
background: #E6E6E6;
|
512 |
+
-webkit-transition: background-color 0.3s ease-out;
|
513 |
+
-moz-transition: background-color 0.3s ease-out;
|
514 |
+
-o-transition: background-color 0.3s ease-out;
|
515 |
+
transition: background-color 0.3s ease-out;
|
516 |
+
|
517 |
+
}
|
518 |
+
.sync-content-wrapper .mc-woocommerce-disconnect-button {
|
519 |
+
float: right;
|
520 |
+
}
|
521 |
+
|
522 |
+
.mc-woocommerce-delete-log-button {
|
523 |
+
float: right;
|
524 |
+
background: white;
|
525 |
+
}
|
526 |
+
.sync-content-wrapper .mc-woocommerce-disconnect-button:hover,
|
527 |
+
.mc-woocommerce-delete-log-button:hover {
|
528 |
+
color: #3C3C3C;
|
529 |
+
background-color: #DADADA;
|
530 |
+
-webkit-transition: background-color 0.3s ease-out;
|
531 |
+
-moz-transition: background-color 0.3s ease-out;
|
532 |
+
-o-transition: background-color 0.3s ease-out;
|
533 |
+
transition: background-color 0.3s ease-out;
|
534 |
+
}
|
535 |
+
|
536 |
+
.sync-content-wrapper .mc-woocommerce-disconnect-button svg,
|
537 |
+
.mc-woocommerce-delete-log-button svg {
|
538 |
+
margin-right: 2em;
|
539 |
+
}
|
540 |
+
|
541 |
+
|
542 |
+
.tab-content-wrapper .box {
|
543 |
+
padding: 0.5rem 1rem;
|
544 |
+
margin: 0;
|
545 |
+
clear:both;
|
546 |
+
}
|
547 |
+
|
548 |
+
.sync-comm-wrapper .box {
|
549 |
+
padding: 0.5rem 0rem;
|
550 |
+
margin: 0;
|
551 |
+
}
|
552 |
+
|
553 |
+
.tab-content-wrapper .box.box-half,
|
554 |
+
.sync-content-wrapper .box.box-half {
|
555 |
+
float: left;
|
556 |
+
clear: none;
|
557 |
+
width: 50%;
|
558 |
+
|
559 |
+
}
|
560 |
+
|
561 |
+
.sync-content-wrapper .box.box-half {
|
562 |
+
height: 100%;
|
563 |
+
}
|
564 |
+
|
565 |
+
.tab-content-wrapper .box.box-half.margin-large {
|
566 |
+
margin-top: 3em;
|
567 |
+
}
|
568 |
+
|
569 |
+
.tab-content-wrapper .box.box-third {
|
570 |
+
float: left;
|
571 |
+
clear:none;
|
572 |
+
width: 33%;
|
573 |
+
}
|
574 |
+
|
575 |
+
.tab-content-wrapper fieldset label {
|
576 |
+
font-weight: 500;
|
577 |
+
}
|
578 |
+
|
579 |
+
.tab-content-wrapper fieldset label p{
|
580 |
+
font-weight: 400;
|
581 |
+
}
|
582 |
+
|
583 |
+
.tab-content-wrapper fieldset input[type="text"],
|
584 |
+
.tab-content-wrapper fieldset input[type="password"],
|
585 |
+
.tab-content-wrapper fieldset input[type="email"],
|
586 |
+
.tab-content-wrapper fieldset textarea {
|
587 |
+
border: 1px solid #E6E6E6;
|
588 |
+
box-sizing: border-box;
|
589 |
+
border-radius: 4px;
|
590 |
+
padding: 1em 1.5em;
|
591 |
+
width: 100%;
|
592 |
+
font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif
|
593 |
+
|
594 |
+
}
|
595 |
+
|
596 |
+
.tab-content-wrapper .mailchimp-select-wrapper {
|
597 |
+
border: 1px solid #E6E6E6;
|
598 |
+
padding: 9px 20px 8px 20px;
|
599 |
+
-webkit-border-radius: 4px;
|
600 |
+
-moz-border-radius: 4px;
|
601 |
+
border-radius: 4px;
|
602 |
+
box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
|
603 |
+
}
|
604 |
+
|
605 |
+
.tab-content-wrapper .mailchimp-select-wrapper select {
|
606 |
+
padding: 0;
|
607 |
+
background: transparent;
|
608 |
+
font-size: 14px;
|
609 |
+
font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif;
|
610 |
+
border: none;
|
611 |
+
-webkit-appearance: none;
|
612 |
+
box-shadow: none;
|
613 |
+
outline: none;
|
614 |
+
width: 100%;
|
615 |
+
background: no-repeat right 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 ");
|
616 |
+
}
|
617 |
+
|
618 |
+
.tab-content-wrapper .mailchimp-select-wrapper select:disabled {
|
619 |
+
color: #aaa;
|
620 |
+
background: none;
|
621 |
+
}
|
622 |
+
|
623 |
+
.tab-content-wrapper fieldset select:focus {
|
624 |
+
outline: none;
|
625 |
+
}
|
626 |
+
|
627 |
+
.tab-content-wrapper fieldset input[type='checkbox'] {
|
628 |
+
width: 2em;
|
629 |
+
height: 2em;
|
630 |
+
border-radius: 4px;
|
631 |
+
border: 1px solid #E6E6E6;
|
632 |
+
}
|
633 |
+
.tab-content-wrapper fieldset input[type='checkbox']:checked::before {
|
634 |
+
color: #7FAD45;
|
635 |
+
margin: -3px 0px 0px 5px;
|
636 |
+
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 ");
|
637 |
+
|
638 |
+
}
|
639 |
+
|
640 |
+
|
641 |
+
.tab-content-wrapper fieldset input[type='radio'],
|
642 |
+
.sync-content-wrapper fieldset input[type='radio'] {
|
643 |
+
width: 2em;
|
644 |
+
height: 2em;
|
645 |
+
border: 1px solid #E6E6E6;
|
646 |
+
margin-right: 10px;
|
647 |
+
}
|
648 |
+
|
649 |
+
.tab-content-wrapper fieldset input[type='radio']:checked::before,
|
650 |
+
.sync-content-wrapper fieldset input[type='radio']:checked::before {
|
651 |
+
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 ");
|
652 |
+
background-repeat: none;
|
653 |
+
width: 13px;
|
654 |
+
height: 9px;
|
655 |
+
margin: 8px 0 0 7px;
|
656 |
+
}
|
657 |
+
|
658 |
+
.tab-content-wrapper fieldset .radio-label,
|
659 |
+
.sync-content-wrapper fieldset .radio-label {
|
660 |
+
margin-bottom: 10px;
|
661 |
+
}
|
662 |
+
|
663 |
+
.mc-comm-save {
|
664 |
+
display:none;
|
665 |
+
color: #628735;
|
666 |
+
margin-left: 10px;
|
667 |
+
}
|
668 |
+
|
669 |
+
.tab-content-wrapper fieldset textarea {
|
670 |
+
border: 1px solid #E6E6E6;
|
671 |
+
box-sizing: border-box;
|
672 |
+
border-radius: 4px;
|
673 |
+
padding: 15px 20px;
|
674 |
+
width: 100%;
|
675 |
+
|
676 |
+
}
|
677 |
+
|
678 |
+
.tab-content-wrapper .optional-settings-button {
|
679 |
+
margin-top: 3em;
|
680 |
+
font-weight: 600;
|
681 |
+
}
|
682 |
+
|
683 |
+
.tab-content-wrapper .optional-settings-button:hover span {
|
684 |
+
color: #628735;
|
685 |
+
}
|
686 |
+
.tab-content-wrapper .optional-settings-button span {
|
687 |
+
text-transform: uppercase;
|
688 |
+
color: #7FAD45 ;
|
689 |
+
padding-left: 2em;
|
690 |
+
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 ");
|
691 |
+
font-size: 14px;
|
692 |
+
cursor: pointer;
|
693 |
+
}
|
694 |
+
|
695 |
+
.tab-content-wrapper .optional-settings-button span.active {
|
696 |
+
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 ");
|
697 |
+
}
|
698 |
+
|
699 |
+
.tab-content-wrapper .optional-settings-content {
|
700 |
+
display: none;
|
701 |
+
}
|
702 |
+
|
703 |
+
/* Old styles from tabs.php */
|
704 |
+
|
705 |
+
#sync-status-message strong,
|
706 |
+
#http-worker-deprecated-message strong {
|
707 |
+
font-weight:inherit;
|
708 |
+
}
|
709 |
+
|
710 |
+
.view-log-select {
|
711 |
+
width: 80%;
|
712 |
+
display: inline-block;
|
713 |
+
}
|
714 |
+
|
715 |
+
.view-log-submit {
|
716 |
+
width: 15%;
|
717 |
+
display: inline-block;
|
718 |
+
}
|
719 |
+
|
720 |
+
#log-viewer {
|
721 |
+
background: #fff;
|
722 |
+
border: 1px solid #e5e5e5;
|
723 |
+
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
724 |
+
padding: 15px 20px;
|
725 |
+
}
|
726 |
+
|
727 |
+
#log-viewer pre {
|
728 |
+
font-family: monospace;
|
729 |
+
white-space: pre-wrap;
|
730 |
+
}
|
731 |
+
|
732 |
+
|
733 |
+
/* account create modal */
|
734 |
+
#mc-woocommerce-create-account-link {
|
735 |
+
padding-top: 20px;
|
736 |
+
}
|
737 |
+
|
738 |
+
#mc-woocommerce-create-account {
|
739 |
+
width: 100%;
|
740 |
+
display: flex;
|
741 |
+
align-items: center;
|
742 |
+
justify-content: center;
|
743 |
+
position: absolute;
|
744 |
+
top: 0;
|
745 |
+
left: 0;
|
746 |
+
visibility: hidden;
|
747 |
+
display: none;
|
748 |
+
padding-top: 20px;
|
749 |
+
/* background: red;
|
750 |
+
opacity: 0.5; */
|
751 |
+
}
|
752 |
+
|
753 |
+
#mc-woocommerce-create-account .terms {
|
754 |
+
padding-top: 20px;
|
755 |
+
padding-bottom: 20px;
|
756 |
+
}
|
757 |
+
|
758 |
+
#mc-woocommerce-create-account .terms a {
|
759 |
+
color: #7FAD45 !important;
|
760 |
+
}
|
761 |
+
|
762 |
+
#mc-woocommerce-create-account h2 {
|
763 |
+
padding-bottom: 20px;
|
764 |
+
}
|
765 |
+
|
766 |
+
#mc-woocommerce-create-account .notices {
|
767 |
+
background:#fff;
|
768 |
+
border-left: 4px solid#fff;
|
769 |
+
border-left-color: rgb(255, 255, 255);
|
770 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
771 |
+
margin: 5px 15px 2px;
|
772 |
+
padding: 1px 12px;
|
773 |
+
padding-right: 12px;
|
774 |
+
}
|
775 |
+
|
776 |
+
#mc-woocommerce-create-account:target {
|
777 |
+
visibility: visible;
|
778 |
+
display: block;
|
779 |
+
}
|
780 |
+
|
781 |
+
#mc-woocommerce-create-account .reveal-modal {
|
782 |
+
position: relative;
|
783 |
+
margin: 0 auto;
|
784 |
+
width: 70%;
|
785 |
+
max-width: 580px;
|
786 |
+
background-color: #ffffff;
|
787 |
+
box-shadow: 5px 10px 40px rgba(0, 0, 0, 0.1);
|
788 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
789 |
+
line-height: 17px;
|
790 |
+
}
|
791 |
+
|
792 |
+
#mc-woocommerce-create-account .close-modal {
|
793 |
+
position: absolute;
|
794 |
+
left: 10px;
|
795 |
+
top: 10px;
|
796 |
+
}
|
797 |
+
|
798 |
+
.mc-woocommerce-create-account-modal-header {
|
799 |
+
text-align: center;
|
800 |
+
padding-top: 30px;
|
801 |
+
}
|
802 |
+
|
803 |
+
.mc-woocommerce-create-account-modal-header h2{
|
804 |
+
text-align: center;
|
805 |
+
padding-top: 30px;
|
806 |
+
font-size: 2em;
|
807 |
+
}
|
808 |
+
|
809 |
+
.mc-woocommerce-create-account-modal-footer {
|
810 |
+
padding: 35px;
|
811 |
+
bottom: 0px;
|
812 |
+
color: #B0B4BD;
|
813 |
+
font-size: 10px;
|
814 |
+
}
|
815 |
+
|
816 |
+
.mc-woocommerce-create-account-step {
|
817 |
+
padding: 5px 35px 10px 35px;
|
818 |
+
}
|
819 |
+
|
820 |
+
.mc-woocommerce-create-account-step .spinner{
|
821 |
+
float:right;
|
822 |
+
background-size: 16px 16px;
|
823 |
+
width: 16px;
|
824 |
+
height: 16px;
|
825 |
+
margin: 15px 10px;
|
826 |
+
}
|
827 |
+
|
828 |
+
#mc-woocommerce-create-account-step-2 {
|
829 |
+
display: none;
|
830 |
+
}
|
831 |
+
|
832 |
+
.mc-woocommerce-create-account-step-error p{
|
833 |
+
display: none;
|
834 |
+
|
835 |
+
background:#fff;
|
836 |
+
border-left: 4px solid#fff;
|
837 |
+
border-left-color: red;
|
838 |
+
box-shadow: 1px 1px 1px 1px rgba(0,0,0,.1);
|
839 |
+
margin: 5px 15px 2px;
|
840 |
+
padding: 4px 12px;
|
841 |
+
padding-right: 12px;
|
842 |
+
}
|
843 |
+
|
844 |
+
.mc-woocommerce-create-account-step-error #connecting{
|
845 |
+
border-left-color: #7FAD45;
|
846 |
+
}
|
847 |
+
|
848 |
+
.mc-woocommerce-create-account-step #username_suggestion {
|
849 |
+
visibility: hidden;
|
850 |
+
}
|
851 |
+
|
852 |
+
.mc-woocommerce-create-account-step #username_suggestion span{
|
853 |
+
color: #7FAD45;
|
854 |
+
text-decoration: none;
|
855 |
+
cursor: pointer;
|
856 |
+
}
|
857 |
+
|
858 |
+
.mc-woocommerce-create-account-step #username_suggestion span:hover{
|
859 |
+
text-decoration: underline;
|
860 |
+
}
|
861 |
+
|
862 |
+
.mc-woocommerce-create-account-step .whitebtn{
|
863 |
+
color: #3C3C3C !important;
|
864 |
+
background: white !important;
|
865 |
+
box-shadow: 0 1px 0 #E6E6E6 !important;
|
866 |
+
text-shadow: 0 -1px 1px #E6E6E6,1px 0 1px #E6E6E6,0 1px 1px #E6E6E6,-1px 0 1px #E6E6E6 !important;
|
867 |
+
border: 1px solid #E6E6E6 !important;
|
868 |
+
}
|
869 |
+
|
870 |
+
#mc-woocommerce-create-account-next {
|
871 |
+
}
|
872 |
+
|
873 |
+
#mc-woocommerce-create-account-prev {
|
874 |
+
float: none;
|
875 |
+
}
|
876 |
+
|
877 |
+
#mc-woocommerce-create-account-step-1 .tab-content-submit:hover{
|
878 |
+
background: #F7F7F7;
|
879 |
+
}
|
880 |
+
|
881 |
+
#mc-woocommerce-create-account-step-1 ul{
|
882 |
+
list-style: disc !important;
|
883 |
+
margin-left: 13px;
|
884 |
+
}
|
885 |
+
|
886 |
+
|
887 |
+
@media screen and (max-width: 782px) {
|
888 |
+
.tab-content-submit,
|
889 |
+
.mc-woocommerce-resync-button,
|
890 |
+
.mc-woocommerce-copy-log-button,
|
891 |
+
.mc-woocommerce-delete-log-button {
|
892 |
+
padding: 15px 35px 15px 35px !important;
|
893 |
+
}
|
894 |
+
|
895 |
+
.mc-woocommerce-copy-log-button,
|
896 |
+
.mc-woocommerce-delete-log-button {
|
897 |
+
width: 100%;
|
898 |
+
padding: 15px 35px 15px 35px !important;
|
899 |
+
text-align: center;
|
900 |
+
}
|
901 |
+
|
902 |
+
.tab-content-wrapper form{
|
903 |
+
padding: 1em;
|
904 |
+
}
|
905 |
+
|
906 |
+
.tab-content-wrapper .box.box-half,
|
907 |
+
.tab-content-wrapper .box.box-third,
|
908 |
+
.sync-comm-wrapper .box.box-half {
|
909 |
+
width: 100%;
|
910 |
+
}
|
911 |
+
|
912 |
+
.sync-content-wrapper .sync-stats-wrapper {
|
913 |
+
display: block;
|
914 |
+
width: 90%;
|
915 |
+
position:relative;
|
916 |
+
margin-bottom: 2em;
|
917 |
+
}
|
918 |
+
|
919 |
+
.sync-content-wrapper .sync-stats-content-wrapper {
|
920 |
+
margin-right: 0;
|
921 |
+
width: 100%;
|
922 |
+
margin: 0;
|
923 |
+
}
|
924 |
+
|
925 |
+
.sync-content-wrapper .sync-stats-wrapper .sync-stats-card-content{
|
926 |
+
margin-right: 0;
|
927 |
+
margin-bottom: 0;
|
928 |
+
}
|
929 |
+
|
930 |
+
.sync-content-wrapper .sync-controls-wrapper {
|
931 |
+
display: block;
|
932 |
+
width: 100%;
|
933 |
+
position:relative;
|
934 |
+
}
|
935 |
+
|
936 |
+
.sync-content-wrapper .sync-controls .mc-woocommerce-last-sync{
|
937 |
+
margin-top: 3em;
|
938 |
+
}
|
939 |
+
|
940 |
+
|
941 |
+
.sync-content-wrapper .sync-controls .spinner {
|
942 |
+
margin: -3px 10px 0 5px;
|
943 |
+
}
|
944 |
+
|
945 |
+
.sync-comm-wrapper {
|
946 |
+
padding-bottom: 20px;
|
947 |
+
}
|
948 |
+
|
949 |
+
.view-log-select,
|
950 |
+
.view-log-submit {
|
951 |
+
width: 100%;
|
952 |
+
display: block;
|
953 |
+
margin-bottom: 1em;
|
954 |
+
}
|
955 |
+
|
956 |
+
#mc-woocommerce-create-account {
|
957 |
+
padding-top: 60px;
|
958 |
+
}
|
959 |
+
#mc-woocommerce-create-account .reveal-modal{
|
960 |
+
width: 80%;
|
961 |
+
}
|
962 |
+
|
963 |
+
}
|
964 |
+
|
965 |
+
|
966 |
+
@media screen and (max-width: 482px) {
|
967 |
+
.nav-tab-wrapper {
|
968 |
+
border-bottom: none !important;
|
969 |
+
}
|
970 |
+
.nav-tab {
|
971 |
+
width: 100%;
|
972 |
+
padding: 2em 0 !important;
|
973 |
+
margin-left: 0;
|
974 |
+
border: none;
|
975 |
+
border-bottom: 1px solid white !important;
|
976 |
+
-webkit-border-radius: 0 !important;
|
977 |
+
-moz-border-radius: 0 !important;
|
978 |
+
border-radius: 0 !important;
|
979 |
+
}
|
980 |
+
|
981 |
+
.nav-tab:last-child {
|
982 |
+
border: none;
|
983 |
+
}
|
984 |
+
|
985 |
+
.nav-tab.nav-tab-active {
|
986 |
+
border: 1px solid white !important;
|
987 |
+
}
|
988 |
+
.disconnect-button {
|
989 |
+
margin: 0.5em 0em !important;
|
990 |
+
}
|
991 |
+
|
992 |
+
#mc-woocommerce-create-account .reveal-modal{
|
993 |
+
width: 100%;
|
994 |
+
}
|
995 |
+
|
996 |
+
.mc-woocommerce-create-account-step {
|
997 |
+
padding: 5px 5px 10px 5px;
|
998 |
+
}
|
999 |
+
}
|
admin/css/mailchimp-woocommerce-admin-settings.css
CHANGED
@@ -225,7 +225,7 @@
|
|
225 |
font-family: proxima-nova, Arial, Helvetica, sans-serif !important;
|
226 |
font-size: 14px !important;
|
227 |
line-height: 16px !important;
|
228 |
-
padding: 15px 35px
|
229 |
|
230 |
/* identical to box height */
|
231 |
text-transform: uppercase !important;
|
@@ -359,6 +359,40 @@
|
|
359 |
width: 100%;
|
360 |
}
|
361 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
.sync-content-wrapper .sync-stats-wrapper {
|
363 |
position:relative;
|
364 |
background-color: white;
|
@@ -511,6 +545,11 @@
|
|
511 |
clear:both;
|
512 |
}
|
513 |
|
|
|
|
|
|
|
|
|
|
|
514 |
.tab-content-wrapper .box.box-half,
|
515 |
.sync-content-wrapper .box.box-half {
|
516 |
float: left;
|
@@ -548,7 +587,7 @@
|
|
548 |
border: 1px solid #E6E6E6;
|
549 |
box-sizing: border-box;
|
550 |
border-radius: 4px;
|
551 |
-
padding:
|
552 |
width: 100%;
|
553 |
font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif
|
554 |
|
@@ -564,16 +603,20 @@
|
|
564 |
}
|
565 |
|
566 |
.tab-content-wrapper .mailchimp-select-wrapper select {
|
567 |
-
padding:
|
568 |
-
background: transparent;
|
569 |
font-size: 14px;
|
570 |
font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif;
|
571 |
border: none;
|
572 |
-webkit-appearance: none;
|
573 |
box-shadow: none;
|
574 |
outline: none;
|
575 |
-
width: 100
|
576 |
-
|
|
|
|
|
|
|
|
|
|
|
577 |
}
|
578 |
|
579 |
.tab-content-wrapper .mailchimp-select-wrapper select:disabled {
|
@@ -593,20 +636,22 @@
|
|
593 |
}
|
594 |
.tab-content-wrapper fieldset input[type='checkbox']:checked::before {
|
595 |
color: #7FAD45;
|
596 |
-
margin:
|
597 |
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 ");
|
598 |
|
599 |
}
|
600 |
|
601 |
|
602 |
-
.tab-content-wrapper fieldset input[type='radio']
|
|
|
603 |
width: 2em;
|
604 |
height: 2em;
|
605 |
border: 1px solid #E6E6E6;
|
606 |
margin-right: 10px;
|
607 |
}
|
608 |
|
609 |
-
.tab-content-wrapper fieldset input[type='radio']:checked::before
|
|
|
610 |
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 ");
|
611 |
background-repeat: none;
|
612 |
width: 13px;
|
@@ -614,10 +659,17 @@
|
|
614 |
margin: 8px 0 0 7px;
|
615 |
}
|
616 |
|
617 |
-
.tab-content-wrapper fieldset .radio-label
|
|
|
618 |
margin-bottom: 10px;
|
619 |
}
|
620 |
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
.tab-content-wrapper fieldset textarea {
|
622 |
border: 1px solid #E6E6E6;
|
623 |
box-sizing: border-box;
|
@@ -682,6 +734,160 @@
|
|
682 |
}
|
683 |
|
684 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
@media screen and (max-width: 782px) {
|
686 |
.tab-content-submit,
|
687 |
.mc-woocommerce-resync-button,
|
@@ -702,7 +908,8 @@
|
|
702 |
}
|
703 |
|
704 |
.tab-content-wrapper .box.box-half,
|
705 |
-
.tab-content-wrapper .box.box-third
|
|
|
706 |
width: 100%;
|
707 |
}
|
708 |
|
@@ -739,6 +946,10 @@
|
|
739 |
margin: -3px 10px 0 5px;
|
740 |
}
|
741 |
|
|
|
|
|
|
|
|
|
742 |
.view-log-select,
|
743 |
.view-log-submit {
|
744 |
width: 100%;
|
@@ -746,6 +957,13 @@
|
|
746 |
margin-bottom: 1em;
|
747 |
}
|
748 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
749 |
}
|
750 |
|
751 |
|
@@ -774,6 +992,12 @@
|
|
774 |
.disconnect-button {
|
775 |
margin: 0.5em 0em !important;
|
776 |
}
|
777 |
-
}
|
778 |
|
779 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
font-family: proxima-nova, Arial, Helvetica, sans-serif !important;
|
226 |
font-size: 14px !important;
|
227 |
line-height: 16px !important;
|
228 |
+
padding: 15px 35px 15px 35px !important;
|
229 |
|
230 |
/* identical to box height */
|
231 |
text-transform: uppercase !important;
|
359 |
width: 100%;
|
360 |
}
|
361 |
|
362 |
+
.sync-comm-wrapper {
|
363 |
+
position:relative;
|
364 |
+
background-color: white;
|
365 |
+
padding: 4px 2em;
|
366 |
+
margin-top: 26px;
|
367 |
+
-webkit-border-radius: 4px;
|
368 |
+
-moz-border-radius: 4px;
|
369 |
+
border-radius: 4px;
|
370 |
+
height: 164px;
|
371 |
+
}
|
372 |
+
|
373 |
+
.sync-comm-wrapper .comm_box_status {
|
374 |
+
font-weight: 700;
|
375 |
+
}
|
376 |
+
|
377 |
+
.el-switch > input[type="checkbox"]:checked + .el-switch-style {
|
378 |
+
background-color: #4DD463;
|
379 |
+
}
|
380 |
+
|
381 |
+
.comm_box_wrapper fieldset {
|
382 |
+
border: 2px solid #E0E0E0;
|
383 |
+
padding: 0 1em 0 1em;
|
384 |
+
margin: 1em 0;
|
385 |
+
}
|
386 |
+
|
387 |
+
.comm_box_wrapper .el-switch,
|
388 |
+
.comm_box_wrapper .mc-comm-save{
|
389 |
+
float: right;
|
390 |
+
}
|
391 |
+
|
392 |
+
.comm_box_wrapper .mc-comm-save {
|
393 |
+
margin-right: 10px;
|
394 |
+
}
|
395 |
+
|
396 |
.sync-content-wrapper .sync-stats-wrapper {
|
397 |
position:relative;
|
398 |
background-color: white;
|
545 |
clear:both;
|
546 |
}
|
547 |
|
548 |
+
.sync-comm-wrapper .box {
|
549 |
+
padding: 0.5rem 0rem;
|
550 |
+
margin: 0;
|
551 |
+
}
|
552 |
+
|
553 |
.tab-content-wrapper .box.box-half,
|
554 |
.sync-content-wrapper .box.box-half {
|
555 |
float: left;
|
587 |
border: 1px solid #E6E6E6;
|
588 |
box-sizing: border-box;
|
589 |
border-radius: 4px;
|
590 |
+
padding: 0.6em 1.5em;
|
591 |
width: 100%;
|
592 |
font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif
|
593 |
|
603 |
}
|
604 |
|
605 |
.tab-content-wrapper .mailchimp-select-wrapper select {
|
606 |
+
padding: 3px 24px 3px 0px;
|
|
|
607 |
font-size: 14px;
|
608 |
font-family: "Proxima Nova Alt Light", Arial, Helvetica, sans-serif;
|
609 |
border: none;
|
610 |
-webkit-appearance: none;
|
611 |
box-shadow: none;
|
612 |
outline: none;
|
613 |
+
width: 100% !important;
|
614 |
+
max-width: 10000px;
|
615 |
+
color: #32373c;
|
616 |
+
}
|
617 |
+
|
618 |
+
.tab-content-wrapper .mailchimp-select-wrapper select option{
|
619 |
+
outline: none;
|
620 |
}
|
621 |
|
622 |
.tab-content-wrapper .mailchimp-select-wrapper select:disabled {
|
636 |
}
|
637 |
.tab-content-wrapper fieldset input[type='checkbox']:checked::before {
|
638 |
color: #7FAD45;
|
639 |
+
margin: 0.6em 0px 0px 0.2em;
|
640 |
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 ");
|
641 |
|
642 |
}
|
643 |
|
644 |
|
645 |
+
.tab-content-wrapper fieldset input[type='radio'],
|
646 |
+
.sync-content-wrapper fieldset input[type='radio'] {
|
647 |
width: 2em;
|
648 |
height: 2em;
|
649 |
border: 1px solid #E6E6E6;
|
650 |
margin-right: 10px;
|
651 |
}
|
652 |
|
653 |
+
.tab-content-wrapper fieldset input[type='radio']:checked::before,
|
654 |
+
.sync-content-wrapper fieldset input[type='radio']:checked::before {
|
655 |
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 ");
|
656 |
background-repeat: none;
|
657 |
width: 13px;
|
659 |
margin: 8px 0 0 7px;
|
660 |
}
|
661 |
|
662 |
+
.tab-content-wrapper fieldset .radio-label,
|
663 |
+
.sync-content-wrapper fieldset .radio-label {
|
664 |
margin-bottom: 10px;
|
665 |
}
|
666 |
|
667 |
+
.mc-comm-save {
|
668 |
+
display:none;
|
669 |
+
color: #628735;
|
670 |
+
margin-left: 10px;
|
671 |
+
}
|
672 |
+
|
673 |
.tab-content-wrapper fieldset textarea {
|
674 |
border: 1px solid #E6E6E6;
|
675 |
box-sizing: border-box;
|
734 |
}
|
735 |
|
736 |
|
737 |
+
/* account create modal */
|
738 |
+
#mc-woocommerce-create-account-link {
|
739 |
+
padding-top: 20px;
|
740 |
+
}
|
741 |
+
|
742 |
+
#mc-woocommerce-create-account {
|
743 |
+
width: 100%;
|
744 |
+
display: flex;
|
745 |
+
align-items: center;
|
746 |
+
justify-content: center;
|
747 |
+
position: absolute;
|
748 |
+
top: 0;
|
749 |
+
left: 0;
|
750 |
+
visibility: hidden;
|
751 |
+
display: none;
|
752 |
+
padding-top: 20px;
|
753 |
+
/* background: red;
|
754 |
+
opacity: 0.5; */
|
755 |
+
}
|
756 |
+
|
757 |
+
#mc-woocommerce-create-account .terms {
|
758 |
+
padding-top: 20px;
|
759 |
+
padding-bottom: 20px;
|
760 |
+
}
|
761 |
+
|
762 |
+
#mc-woocommerce-create-account .terms a {
|
763 |
+
color: #7FAD45 !important;
|
764 |
+
}
|
765 |
+
|
766 |
+
#mc-woocommerce-create-account h2 {
|
767 |
+
padding-bottom: 20px;
|
768 |
+
}
|
769 |
+
|
770 |
+
#mc-woocommerce-create-account .notices {
|
771 |
+
background:#fff;
|
772 |
+
border-left: 4px solid#fff;
|
773 |
+
border-left-color: rgb(255, 255, 255);
|
774 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
775 |
+
margin: 5px 15px 2px;
|
776 |
+
padding: 1px 12px;
|
777 |
+
padding-right: 12px;
|
778 |
+
}
|
779 |
+
|
780 |
+
#mc-woocommerce-create-account:target {
|
781 |
+
visibility: visible;
|
782 |
+
display: block;
|
783 |
+
}
|
784 |
+
|
785 |
+
#mc-woocommerce-create-account .reveal-modal {
|
786 |
+
position: relative;
|
787 |
+
margin: 0 auto;
|
788 |
+
width: 70%;
|
789 |
+
max-width: 580px;
|
790 |
+
background-color: #ffffff;
|
791 |
+
box-shadow: 5px 10px 40px rgba(0, 0, 0, 0.1);
|
792 |
+
font-family: proxima-nova, Arial, Helvetica, sans-serif;
|
793 |
+
line-height: 17px;
|
794 |
+
}
|
795 |
+
|
796 |
+
#mc-woocommerce-create-account .close-modal {
|
797 |
+
position: absolute;
|
798 |
+
left: 10px;
|
799 |
+
top: 10px;
|
800 |
+
}
|
801 |
+
|
802 |
+
.mc-woocommerce-create-account-modal-header {
|
803 |
+
text-align: center;
|
804 |
+
padding-top: 30px;
|
805 |
+
}
|
806 |
+
|
807 |
+
.mc-woocommerce-create-account-modal-header h2{
|
808 |
+
text-align: center;
|
809 |
+
padding-top: 30px;
|
810 |
+
font-size: 2em;
|
811 |
+
}
|
812 |
+
|
813 |
+
.mc-woocommerce-create-account-modal-footer {
|
814 |
+
padding: 35px;
|
815 |
+
bottom: 0px;
|
816 |
+
color: #B0B4BD;
|
817 |
+
font-size: 10px;
|
818 |
+
}
|
819 |
+
|
820 |
+
.mc-woocommerce-create-account-step {
|
821 |
+
padding: 5px 35px 10px 35px;
|
822 |
+
}
|
823 |
+
|
824 |
+
#mc-woocommerce-create-account-step-2 {
|
825 |
+
display: none;
|
826 |
+
}
|
827 |
+
|
828 |
+
.mc-woocommerce-create-account-step .spinner{
|
829 |
+
float:right;
|
830 |
+
background-size: 16px 16px;
|
831 |
+
width: 16px;
|
832 |
+
height: 16px;
|
833 |
+
margin: 15px 10px;
|
834 |
+
}
|
835 |
+
|
836 |
+
.mc-woocommerce-create-account-step-error p{
|
837 |
+
display: none;
|
838 |
+
|
839 |
+
background:#fff;
|
840 |
+
border-left: 4px solid#fff;
|
841 |
+
border-left-color: red;
|
842 |
+
box-shadow: 1px 1px 1px 1px rgba(0,0,0,.1);
|
843 |
+
margin: 5px 15px 2px;
|
844 |
+
padding: 4px 12px;
|
845 |
+
padding-right: 12px;
|
846 |
+
}
|
847 |
+
|
848 |
+
.mc-woocommerce-create-account-step-error #connecting{
|
849 |
+
border-left-color: #7FAD45;
|
850 |
+
}
|
851 |
+
|
852 |
+
.mc-woocommerce-create-account-step #username_suggestion {
|
853 |
+
visibility: hidden;
|
854 |
+
}
|
855 |
+
|
856 |
+
.mc-woocommerce-create-account-step #username_suggestion span{
|
857 |
+
color: #7FAD45;
|
858 |
+
text-decoration: none;
|
859 |
+
cursor: pointer;
|
860 |
+
}
|
861 |
+
|
862 |
+
.mc-woocommerce-create-account-step #username_suggestion span:hover{
|
863 |
+
text-decoration: underline;
|
864 |
+
}
|
865 |
+
|
866 |
+
.mc-woocommerce-create-account-step .whitebtn{
|
867 |
+
color: #3C3C3C !important;
|
868 |
+
background: white !important;
|
869 |
+
box-shadow: 0 1px 0 #E6E6E6 !important;
|
870 |
+
text-shadow: 0 -1px 1px #E6E6E6,1px 0 1px #E6E6E6,0 1px 1px #E6E6E6,-1px 0 1px #E6E6E6 !important;
|
871 |
+
border: 1px solid #E6E6E6 !important;
|
872 |
+
}
|
873 |
+
|
874 |
+
#mc-woocommerce-create-account-next {
|
875 |
+
}
|
876 |
+
|
877 |
+
#mc-woocommerce-create-account-prev {
|
878 |
+
float: none;
|
879 |
+
}
|
880 |
+
|
881 |
+
#mc-woocommerce-create-account-step-1 .tab-content-submit:hover{
|
882 |
+
background: #F7F7F7;
|
883 |
+
}
|
884 |
+
|
885 |
+
#mc-woocommerce-create-account-step-1 ul{
|
886 |
+
list-style: disc !important;
|
887 |
+
margin-left: 13px;
|
888 |
+
}
|
889 |
+
|
890 |
+
|
891 |
@media screen and (max-width: 782px) {
|
892 |
.tab-content-submit,
|
893 |
.mc-woocommerce-resync-button,
|
908 |
}
|
909 |
|
910 |
.tab-content-wrapper .box.box-half,
|
911 |
+
.tab-content-wrapper .box.box-third,
|
912 |
+
.sync-comm-wrapper .box.box-half {
|
913 |
width: 100%;
|
914 |
}
|
915 |
|
946 |
margin: -3px 10px 0 5px;
|
947 |
}
|
948 |
|
949 |
+
.sync-comm-wrapper {
|
950 |
+
padding-bottom: 20px;
|
951 |
+
}
|
952 |
+
|
953 |
.view-log-select,
|
954 |
.view-log-submit {
|
955 |
width: 100%;
|
957 |
margin-bottom: 1em;
|
958 |
}
|
959 |
|
960 |
+
#mc-woocommerce-create-account {
|
961 |
+
padding-top: 60px;
|
962 |
+
}
|
963 |
+
#mc-woocommerce-create-account .reveal-modal{
|
964 |
+
width: 80%;
|
965 |
+
}
|
966 |
+
|
967 |
}
|
968 |
|
969 |
|
992 |
.disconnect-button {
|
993 |
margin: 0.5em 0em !important;
|
994 |
}
|
|
|
995 |
|
996 |
+
#mc-woocommerce-create-account .reveal-modal{
|
997 |
+
width: 100%;
|
998 |
+
}
|
999 |
+
|
1000 |
+
.mc-woocommerce-create-account-step {
|
1001 |
+
padding: 5px 5px 10px 5px;
|
1002 |
+
}
|
1003 |
+
}
|
admin/js/mailchimp-woocommerce-admin.js
CHANGED
@@ -232,6 +232,274 @@
|
|
232 |
}
|
233 |
// While the popup is open, wait. when closed, try to get status=accepted
|
234 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
});
|
236 |
-
|
237 |
})( jQuery );
|
|
232 |
}
|
233 |
// While the popup is open, wait. when closed, try to get status=accepted
|
234 |
}
|
235 |
+
|
236 |
+
// Mailchimp OAuth connection (tab "connect")
|
237 |
+
$('#setting-error-mailchimp-woocommerce-initial-sync-end .notice-dismiss').click(function(e){
|
238 |
+
var data = {action:'mailchimp_woocommerce_remove_review_banner'};
|
239 |
+
$.get(ajaxurl, data);
|
240 |
+
});
|
241 |
+
$('#comm_box_switch').change(function (e){
|
242 |
+
var switch_button = this;
|
243 |
+
var opt = this.checked ? 1 : 0;
|
244 |
+
|
245 |
+
var data = {
|
246 |
+
action: 'mailchimp_woocommerce_communication_status',
|
247 |
+
opt: opt
|
248 |
+
}
|
249 |
+
|
250 |
+
$('.comm_box_status').hide();
|
251 |
+
$('#comm_box_status_' + opt).show();
|
252 |
+
|
253 |
+
$.post(ajaxurl, data, function(response) {
|
254 |
+
if (response.success) {
|
255 |
+
$('#mc-comm-save').html(response.data);
|
256 |
+
$('#mc-comm-save').css('color', '#628735').show().fadeOut(5000);
|
257 |
+
switch_button.checked = opt;
|
258 |
+
}
|
259 |
+
else {
|
260 |
+
$('#mc-comm-save').html(response.data.error);
|
261 |
+
$('#mc-comm-save').css('color', 'red').show().fadeOut(5000);
|
262 |
+
switch_button.checked = 1 - opt;
|
263 |
+
$('.comm_box_status').hide();
|
264 |
+
$('#comm_box_status_' + (1 - opt)).show();
|
265 |
+
}
|
266 |
+
});
|
267 |
+
});
|
268 |
+
// communications box radio ajax call
|
269 |
+
$('input.comm-box-input').change(function(e){
|
270 |
+
var data = {
|
271 |
+
action: 'mailchimp_woocommerce_communication_status',
|
272 |
+
opt: this.value
|
273 |
+
}
|
274 |
+
var opt = this.value;
|
275 |
+
|
276 |
+
$.post(ajaxurl, data, function(response) {
|
277 |
+
if (response.success) {
|
278 |
+
$('#mc-comm-save-'+opt).html(response.data);
|
279 |
+
$('#mc-comm-save-'+opt).css('color', '#628735').show().fadeOut(5000);
|
280 |
+
$('#swi').checked = true;
|
281 |
+
}
|
282 |
+
else {
|
283 |
+
$('#mc-comm-save-'+opt).html(response.data.error);
|
284 |
+
$('#mc-comm-save-'+opt).css('color', 'red').show().fadeOut(5000);
|
285 |
+
$('#mc-comm-input-'+response.data.opt).prop('checked', true);
|
286 |
+
$('#swi').checked = false;
|
287 |
+
}
|
288 |
+
});
|
289 |
+
});
|
290 |
+
|
291 |
+
// Account create functionality
|
292 |
+
$('#mc-woocommerce-create-account-next').click(function () {
|
293 |
+
var next_button = $(this);
|
294 |
+
var spinner = $(this).next('.spinner');
|
295 |
+
spinner.css('visibility', 'visible')
|
296 |
+
|
297 |
+
$('.mc-woocommerce-create-account-step-error > p').hide();
|
298 |
+
$('#username_suggestion').css('visibility', 'hidden');
|
299 |
+
var email = $('input#email');
|
300 |
+
var username = $('input#username');
|
301 |
+
|
302 |
+
var isValid= true;
|
303 |
+
|
304 |
+
if (! email[0].checkValidity()) {
|
305 |
+
$('#email_error').show();
|
306 |
+
isValid= false;
|
307 |
+
}
|
308 |
+
else {
|
309 |
+
$('#email_error').hide();
|
310 |
+
}
|
311 |
+
|
312 |
+
if (! username[0].checkValidity()) {
|
313 |
+
$('#username_invalid_error').show();
|
314 |
+
spinner.css('visibility', 'hidden');
|
315 |
+
}
|
316 |
+
else {
|
317 |
+
$('#username_invalid_error').hide();
|
318 |
+
var data = {
|
319 |
+
action:'mailchimp_woocommerce_create_account_check_username',
|
320 |
+
username: username.val(),
|
321 |
+
};
|
322 |
+
|
323 |
+
$.post(ajaxurl, data, function(response) {
|
324 |
+
if (response.success) {
|
325 |
+
$('#username_exists_error').hide();
|
326 |
+
if ( isValid == true) {
|
327 |
+
spinner.css('visibility', 'hidden');
|
328 |
+
$('.mc-woocommerce-settings').css('height', '900px');
|
329 |
+
$('#mc-woocommerce-create-account-step-1').hide();
|
330 |
+
$('#mc-woocommerce-create-account-step-2').show();
|
331 |
+
$('#step_count').html('2');
|
332 |
+
}
|
333 |
+
}
|
334 |
+
else {
|
335 |
+
$('#username_exists_error').show();
|
336 |
+
$('#username_suggestion').css('visibility', 'visible');
|
337 |
+
$('#username_suggestion span').html(response.data.suggestion);
|
338 |
+
spinner.css('visibility', 'hidden');
|
339 |
+
}
|
340 |
+
});
|
341 |
+
}
|
342 |
+
});
|
343 |
+
|
344 |
+
$('#mc-woocommerce-create-account-prev').click(function () {
|
345 |
+
$('#mc-woocommerce-create-account-step-1').show();
|
346 |
+
$('#mc-woocommerce-create-account-step-2').hide();
|
347 |
+
$('#step_count').html('1');
|
348 |
+
|
349 |
+
});
|
350 |
+
|
351 |
+
$('#mc-woocommerce-create-account-go').click(function () {
|
352 |
+
var email = $('input#email');
|
353 |
+
var firstName = $('input#first_name');
|
354 |
+
var lastName = $('input#last_name');
|
355 |
+
var org = $('input#org');
|
356 |
+
var timezone = $('select#timezone');
|
357 |
+
|
358 |
+
var username = $('input#username');
|
359 |
+
|
360 |
+
var address = $('input#address');
|
361 |
+
var address2 = $('input#address2');
|
362 |
+
var city = $('input#city');
|
363 |
+
var state = $('input#state');
|
364 |
+
var zip = $('input#zip');
|
365 |
+
var country = $('select#country');
|
366 |
+
var phone = $('input#phone');
|
367 |
+
|
368 |
+
var isValid = true;
|
369 |
+
|
370 |
+
var spinner = $(this).next('.spinner');
|
371 |
+
spinner.css('visibility', 'visible');
|
372 |
+
|
373 |
+
if (! address[0].checkValidity() || ! address2[0].checkValidity()) {
|
374 |
+
$('#address_error').show();
|
375 |
+
isValid= false;
|
376 |
+
}
|
377 |
+
else {
|
378 |
+
$('#address_error').hide();
|
379 |
+
}
|
380 |
+
|
381 |
+
if (! city[0].checkValidity()) {
|
382 |
+
$('#city_error').show();
|
383 |
+
isValid= false;
|
384 |
+
}
|
385 |
+
else {
|
386 |
+
$('#city_error').hide();
|
387 |
+
}
|
388 |
+
|
389 |
+
if (! state[0].checkValidity()) {
|
390 |
+
$('#state_error').show();
|
391 |
+
isValid= false;
|
392 |
+
}
|
393 |
+
else {
|
394 |
+
$('#state_error').hide();
|
395 |
+
}
|
396 |
+
|
397 |
+
if (! zip[0].checkValidity()) {
|
398 |
+
$('#zip_error').show();
|
399 |
+
isValid= false;
|
400 |
+
}
|
401 |
+
else {
|
402 |
+
$('#zip_error').hide();
|
403 |
+
}
|
404 |
+
|
405 |
+
if (! country[0].checkValidity()) {
|
406 |
+
$('#country_error').show();
|
407 |
+
isValid= false;
|
408 |
+
}
|
409 |
+
else {
|
410 |
+
$('#country_error').hide();
|
411 |
+
}
|
412 |
+
|
413 |
+
if (! phone[0].checkValidity()) {
|
414 |
+
$('#phone_error').show();
|
415 |
+
isValid= false;
|
416 |
+
}
|
417 |
+
else {
|
418 |
+
$('#phone_error').hide();
|
419 |
+
}
|
420 |
+
|
421 |
+
if (! timezone[0].checkValidity()) {
|
422 |
+
$('#timezone_error').show();
|
423 |
+
isValid= false;
|
424 |
+
}
|
425 |
+
else {
|
426 |
+
$('#timezone_error').hide();
|
427 |
+
}
|
428 |
+
|
429 |
+
if (isValid) {
|
430 |
+
var data = {
|
431 |
+
action:'mailchimp_woocommerce_create_account_signup',
|
432 |
+
data: {
|
433 |
+
email: email.val(),
|
434 |
+
first_name: firstName.val(),
|
435 |
+
last_name: lastName.val(),
|
436 |
+
org: org.val(),
|
437 |
+
timezone: timezone.val(),
|
438 |
+
username: username.val(),
|
439 |
+
address: {
|
440 |
+
address1: address.val(),
|
441 |
+
city: city.val(),
|
442 |
+
state: state.val(),
|
443 |
+
zip: zip.val(),
|
444 |
+
country: country.val()
|
445 |
+
}
|
446 |
+
},
|
447 |
+
};
|
448 |
+
|
449 |
+
// add optional address 2 only if it's filled out
|
450 |
+
if (address2.val() != '') {
|
451 |
+
data.data.address.address2 = address2.val();
|
452 |
+
}
|
453 |
+
|
454 |
+
$.post(ajaxurl, data, function(response) {
|
455 |
+
if (response.success) {
|
456 |
+
$('#connecting').show();
|
457 |
+
spinner.css('visibility', 'hidden');
|
458 |
+
|
459 |
+
// get access_token and fill api-key field value including data_center
|
460 |
+
var accessToken = response.data.data.oauth_token + '-' + response.data.data.dc
|
461 |
+
|
462 |
+
$('#mailchimp-woocommerce-mailchimp-api-key').val(accessToken);
|
463 |
+
|
464 |
+
// always go to next step on success, so change url of wp_http_referer
|
465 |
+
if ($('input[name=mailchimp_woocommerce_wizard_on]').val() == 1) {
|
466 |
+
var query = window.location.href.match(/^(.*)\&/);
|
467 |
+
if (query){
|
468 |
+
history.replaceState({}, "", query[1]);
|
469 |
+
$('input[name=_wp_http_referer]').val(query[1]);
|
470 |
+
}
|
471 |
+
}
|
472 |
+
// submit api_key/access_token form
|
473 |
+
$('#mailchimp_woocommerce_options').submit();
|
474 |
+
}
|
475 |
+
}).fail(function (err) {
|
476 |
+
console.log('FAIL:' , err);
|
477 |
+
});
|
478 |
+
}
|
479 |
+
else {
|
480 |
+
spinner.css('visibility', 'hidden')
|
481 |
+
}
|
482 |
+
});
|
483 |
+
|
484 |
+
$('#username_suggestion span').click(function (){
|
485 |
+
$('input#username').val($(this).html());
|
486 |
+
});
|
487 |
+
|
488 |
+
$('#mc-woocommerce-create-account-step-1').keypress(function(event){
|
489 |
+
event.stopPropagation();
|
490 |
+
var keycode = (event.keyCode ? event.keyCode : event.which);
|
491 |
+
if ( keycode == '13' ){
|
492 |
+
$("#mc-woocommerce-create-account-next").click();
|
493 |
+
}
|
494 |
+
});
|
495 |
+
|
496 |
+
$('#mc-woocommerce-create-account-step-2').keypress(function(event){
|
497 |
+
event.stopPropagation();
|
498 |
+
var keycode = (event.keyCode ? event.keyCode : event.which);
|
499 |
+
if ( keycode == '13' ){
|
500 |
+
$("#mc-woocommerce-create-account-go").click();
|
501 |
+
}
|
502 |
+
});
|
503 |
});
|
|
|
504 |
})( jQuery );
|
505 |
+
|
admin/partials/mailchimp-woocommerce-admin-tabs.php
CHANGED
@@ -62,13 +62,13 @@ else {
|
|
62 |
|
63 |
<?php if (!defined('PHP_VERSION_ID') || (PHP_VERSION_ID < 70000)): ?>
|
64 |
<div data-dismissible="notice-php-version" class="error notice notice-error">
|
65 |
-
<p><?php esc_html_e('Mailchimp says: Please upgrade your PHP version to a minimum of 7.0', '
|
66 |
</div>
|
67 |
<?php endif; ?>
|
68 |
|
69 |
<?php if (!empty($has_api_error)): ?>
|
70 |
<div data-dismissible="notice-api-error" class="error notice notice-error is-dismissible">
|
71 |
-
<p><?php esc_html_e("Mailchimp says: API Request Error - ".$has_api_error, '
|
72 |
</div>
|
73 |
<?php endif; ?>
|
74 |
|
@@ -100,33 +100,33 @@ else {
|
|
100 |
);
|
101 |
|
102 |
if ($active_tab == 'api_key' ) {
|
103 |
-
wp_kses(_e('Add Mailchimp for WooCommerce to build custom segments,<br/>send automations, and track purchase activity in Mailchimp', '
|
104 |
}
|
105 |
|
106 |
if ($active_tab == 'store_info' && $has_valid_api_key) {
|
107 |
-
wp_kses(_e('Please provide a bit of information<br/>about your WooCommerce store', '
|
108 |
}
|
109 |
|
110 |
if ($active_tab == 'campaign_defaults' ) {
|
111 |
-
wp_kses(_e('Please fill out the audience default<br/>campaign information', '
|
112 |
}
|
113 |
|
114 |
if ($active_tab == 'newsletter_settings' ) {
|
115 |
-
wp_kses(_e('Please apply your audience settings. If you don’t<br/>have an audience, you can choose to create one', '
|
116 |
}
|
117 |
if ($active_tab == 'sync' && $show_sync_tab) {
|
118 |
-
wp_kses(_e('Connect your WooCommerce store to a<br/>Mailchimp audience in less than 60 seconds', '
|
119 |
}
|
120 |
|
121 |
if ($active_tab == 'logs' && $show_sync_tab) {
|
122 |
-
wp_kses(_e('Log events from the <br/>Mailchimp plugin', '
|
123 |
}
|
124 |
?>
|
125 |
</p>
|
126 |
<?php if($show_wizard): ?>
|
127 |
<div class="nav-wizard-wrapper">
|
128 |
<a href="?page=mailchimp-woocommerce&tab=api_key" class="wizard-tab <?php echo $active_tab == 'api_key' ? 'wizard-tab-active' : ''; ?>">
|
129 |
-
<div class="wizard-tab-tooltip wizard-tab-tooltip-api-key "><?= esc_html_e('Connect', '
|
130 |
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
131 |
<rect x="14.498" width="20" height="20" transform="rotate(45 14.498 0)" fill="white"/>
|
132 |
</svg>
|
@@ -135,7 +135,7 @@ else {
|
|
135 |
|
136 |
<?php if ($has_valid_api_key) : ?>
|
137 |
<a href="?page=mailchimp-woocommerce&tab=store_info" class="wizard-tab <?php echo $active_tab == 'store_info' ? 'wizard-tab-active' : ''; ?>">
|
138 |
-
<div class="wizard-tab-tooltip wizard-tab-tooltip-store-info "><?= esc_html_e('Store Settings', '
|
139 |
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
140 |
<rect x="14.498" width="20" height="20" transform="rotate(45 14.498 0)" fill="white"/>
|
141 |
</svg>
|
@@ -147,7 +147,7 @@ else {
|
|
147 |
|
148 |
<?php if ($handler->hasValidStoreInfo() && $show_campaign_defaults && $this->getData('validation.store_info', false)) : ?>
|
149 |
<a href="?page=mailchimp-woocommerce&tab=campaign_defaults" class="wizard-tab <?php echo $active_tab == 'campaign_defaults' ? 'wizard-tab-active' : ''; ?>">
|
150 |
-
<div class="wizard-tab-tooltip wizard-tab-tooltip-store-info "><?= esc_html_e('Audience Defaults', '
|
151 |
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
152 |
<rect x="14.498" width="20" height="20" transform="rotate(45 14.498 0)" fill="white"/>
|
153 |
</svg>
|
@@ -159,7 +159,7 @@ else {
|
|
159 |
|
160 |
<?php if ($handler->hasValidCampaignDefaults() && $this->getData('validation.campaign_defaults', false)) : ?>
|
161 |
<a href="?page=mailchimp-woocommerce&tab=newsletter_settings" class="wizard-tab <?php echo $active_tab == 'newsletter_settings' ? 'wizard-tab-active' : ''; ?>">
|
162 |
-
<div class="wizard-tab-tooltip wizard-tab-tooltip-store-info "><?= esc_html_e('Audience Settings', '
|
163 |
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
164 |
<rect x="14.498" width="20" height="20" transform="rotate(45 14.498 0)" fill="white"/>
|
165 |
</svg>
|
@@ -173,19 +173,19 @@ else {
|
|
173 |
<div class="nav-tab-wrapper">
|
174 |
<?php if($has_valid_api_key): ?>
|
175 |
<?php if ($active_tab == 'api_key'): ?>
|
176 |
-
<a href="?page=mailchimp-woocommerce&tab=api_key" class="nav-tab <?php echo $active_tab == 'api_key' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Connect', '
|
177 |
<?php endif ;?>
|
178 |
-
<a href="?page=mailchimp-woocommerce&tab=sync" class="nav-tab <?php echo $active_tab == 'sync' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Overview', '
|
179 |
-
<a href="?page=mailchimp-woocommerce&tab=store_info" class="nav-tab <?php echo $active_tab == 'store_info' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Store Settings', '
|
180 |
<?php if ($handler->hasValidStoreInfo()) : ?>
|
181 |
<?php if($show_campaign_defaults): ?>
|
182 |
-
<a href="?page=mailchimp-woocommerce&tab=campaign_defaults" class="nav-tab <?php echo $active_tab == 'campaign_defaults' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Audience Defaults', '
|
183 |
<?php endif; ?>
|
184 |
<?php if($handler->hasValidCampaignDefaults()): ?>
|
185 |
-
<a href="?page=mailchimp-woocommerce&tab=newsletter_settings" class="nav-tab <?php echo $active_tab == 'newsletter_settings' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Audience Settings', '
|
186 |
<?php endif; ?>
|
187 |
<?php endif;?>
|
188 |
-
<a href="?page=mailchimp-woocommerce&tab=logs" class="nav-tab <?php echo $active_tab == 'logs' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Logs', '
|
189 |
<?php endif; ?>
|
190 |
</div>
|
191 |
<?php endif; ?>
|
@@ -199,7 +199,7 @@ else {
|
|
199 |
<?php
|
200 |
if ($active_tab !== 'api_key' && $active_tab !== 'sync') {
|
201 |
if ($active_tab == 'newsletter_settings' && !mailchimp_is_configured()) {
|
202 |
-
$submit_button_label = __('Start sync','
|
203 |
}
|
204 |
else $submit_button_label = !$show_wizard ? __('Save all changes') : __('Next');
|
205 |
submit_button($submit_button_label, 'primary tab-content-submit','mailchimp_submit', TRUE);
|
@@ -249,6 +249,11 @@ else {
|
|
249 |
<?php endif; ?>
|
250 |
|
251 |
</form>
|
|
|
|
|
|
|
|
|
|
|
252 |
<?php if ($active_tab != 'sync'): ?>
|
253 |
</div>
|
254 |
<?php endif; ?>
|
62 |
|
63 |
<?php if (!defined('PHP_VERSION_ID') || (PHP_VERSION_ID < 70000)): ?>
|
64 |
<div data-dismissible="notice-php-version" class="error notice notice-error">
|
65 |
+
<p><?php esc_html_e('Mailchimp says: Please upgrade your PHP version to a minimum of 7.0', 'mailchimp-for-woocommerce'); ?></p>
|
66 |
</div>
|
67 |
<?php endif; ?>
|
68 |
|
69 |
<?php if (!empty($has_api_error)): ?>
|
70 |
<div data-dismissible="notice-api-error" class="error notice notice-error is-dismissible">
|
71 |
+
<p><?php esc_html_e("Mailchimp says: API Request Error - ".$has_api_error, 'mailchimp-for-woocommerce'); ?></p>
|
72 |
</div>
|
73 |
<?php endif; ?>
|
74 |
|
100 |
);
|
101 |
|
102 |
if ($active_tab == 'api_key' ) {
|
103 |
+
wp_kses(_e('Add Mailchimp for WooCommerce to build custom segments,<br/>send automations, and track purchase activity in Mailchimp', 'mailchimp-for-woocommerce'), $allowed_html);
|
104 |
}
|
105 |
|
106 |
if ($active_tab == 'store_info' && $has_valid_api_key) {
|
107 |
+
wp_kses(_e('Please provide a bit of information<br/>about your WooCommerce store', 'mailchimp-for-woocommerce'), $allowed_html);
|
108 |
}
|
109 |
|
110 |
if ($active_tab == 'campaign_defaults' ) {
|
111 |
+
wp_kses(_e('Please fill out the audience default<br/>campaign information', 'mailchimp-for-woocommerce'), $allowed_html);
|
112 |
}
|
113 |
|
114 |
if ($active_tab == 'newsletter_settings' ) {
|
115 |
+
wp_kses(_e('Please apply your audience settings. If you don’t<br/>have an audience, you can choose to create one', 'mailchimp-for-woocommerce'), $allowed_html);
|
116 |
}
|
117 |
if ($active_tab == 'sync' && $show_sync_tab) {
|
118 |
+
wp_kses(_e('Connect your WooCommerce store to a<br/>Mailchimp audience in less than 60 seconds', 'mailchimp-for-woocommerce'), $allowed_html);
|
119 |
}
|
120 |
|
121 |
if ($active_tab == 'logs' && $show_sync_tab) {
|
122 |
+
wp_kses(_e('Log events from the <br/>Mailchimp plugin', 'mailchimp-for-woocommerce'), $allowed_html);
|
123 |
}
|
124 |
?>
|
125 |
</p>
|
126 |
<?php if($show_wizard): ?>
|
127 |
<div class="nav-wizard-wrapper">
|
128 |
<a href="?page=mailchimp-woocommerce&tab=api_key" class="wizard-tab <?php echo $active_tab == 'api_key' ? 'wizard-tab-active' : ''; ?>">
|
129 |
+
<div class="wizard-tab-tooltip wizard-tab-tooltip-api-key "><?= esc_html_e('Connect', 'mailchimp-for-woocommerce');?>
|
130 |
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
131 |
<rect x="14.498" width="20" height="20" transform="rotate(45 14.498 0)" fill="white"/>
|
132 |
</svg>
|
135 |
|
136 |
<?php if ($has_valid_api_key) : ?>
|
137 |
<a href="?page=mailchimp-woocommerce&tab=store_info" class="wizard-tab <?php echo $active_tab == 'store_info' ? 'wizard-tab-active' : ''; ?>">
|
138 |
+
<div class="wizard-tab-tooltip wizard-tab-tooltip-store-info "><?= esc_html_e('Store Settings', 'mailchimp-for-woocommerce');?>
|
139 |
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
140 |
<rect x="14.498" width="20" height="20" transform="rotate(45 14.498 0)" fill="white"/>
|
141 |
</svg>
|
147 |
|
148 |
<?php if ($handler->hasValidStoreInfo() && $show_campaign_defaults && $this->getData('validation.store_info', false)) : ?>
|
149 |
<a href="?page=mailchimp-woocommerce&tab=campaign_defaults" class="wizard-tab <?php echo $active_tab == 'campaign_defaults' ? 'wizard-tab-active' : ''; ?>">
|
150 |
+
<div class="wizard-tab-tooltip wizard-tab-tooltip-store-info "><?= esc_html_e('Audience Defaults', 'mailchimp-for-woocommerce');?>
|
151 |
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
152 |
<rect x="14.498" width="20" height="20" transform="rotate(45 14.498 0)" fill="white"/>
|
153 |
</svg>
|
159 |
|
160 |
<?php if ($handler->hasValidCampaignDefaults() && $this->getData('validation.campaign_defaults', false)) : ?>
|
161 |
<a href="?page=mailchimp-woocommerce&tab=newsletter_settings" class="wizard-tab <?php echo $active_tab == 'newsletter_settings' ? 'wizard-tab-active' : ''; ?>">
|
162 |
+
<div class="wizard-tab-tooltip wizard-tab-tooltip-store-info "><?= esc_html_e('Audience Settings', 'mailchimp-for-woocommerce');?>
|
163 |
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
164 |
<rect x="14.498" width="20" height="20" transform="rotate(45 14.498 0)" fill="white"/>
|
165 |
</svg>
|
173 |
<div class="nav-tab-wrapper">
|
174 |
<?php if($has_valid_api_key): ?>
|
175 |
<?php if ($active_tab == 'api_key'): ?>
|
176 |
+
<a href="?page=mailchimp-woocommerce&tab=api_key" class="nav-tab <?php echo $active_tab == 'api_key' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Connect', 'mailchimp-for-woocommerce');?></a>
|
177 |
<?php endif ;?>
|
178 |
+
<a href="?page=mailchimp-woocommerce&tab=sync" class="nav-tab <?php echo $active_tab == 'sync' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Overview', 'mailchimp-for-woocommerce');?></a>
|
179 |
+
<a href="?page=mailchimp-woocommerce&tab=store_info" class="nav-tab <?php echo $active_tab == 'store_info' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Store Settings', 'mailchimp-for-woocommerce');?></a>
|
180 |
<?php if ($handler->hasValidStoreInfo()) : ?>
|
181 |
<?php if($show_campaign_defaults): ?>
|
182 |
+
<a href="?page=mailchimp-woocommerce&tab=campaign_defaults" class="nav-tab <?php echo $active_tab == 'campaign_defaults' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Audience Defaults', 'mailchimp-for-woocommerce');?></a>
|
183 |
<?php endif; ?>
|
184 |
<?php if($handler->hasValidCampaignDefaults()): ?>
|
185 |
+
<a href="?page=mailchimp-woocommerce&tab=newsletter_settings" class="nav-tab <?php echo $active_tab == 'newsletter_settings' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Audience Settings', 'mailchimp-for-woocommerce');?></a>
|
186 |
<?php endif; ?>
|
187 |
<?php endif;?>
|
188 |
+
<a href="?page=mailchimp-woocommerce&tab=logs" class="nav-tab <?php echo $active_tab == 'logs' ? 'nav-tab-active' : ''; ?>"><?= esc_html_e('Logs', 'mailchimp-for-woocommerce');?></a>
|
189 |
<?php endif; ?>
|
190 |
</div>
|
191 |
<?php endif; ?>
|
199 |
<?php
|
200 |
if ($active_tab !== 'api_key' && $active_tab !== 'sync') {
|
201 |
if ($active_tab == 'newsletter_settings' && !mailchimp_is_configured()) {
|
202 |
+
$submit_button_label = __('Start sync','mailchimp-for-woocommerce');
|
203 |
}
|
204 |
else $submit_button_label = !$show_wizard ? __('Save all changes') : __('Next');
|
205 |
submit_button($submit_button_label, 'primary tab-content-submit','mailchimp_submit', TRUE);
|
249 |
<?php endif; ?>
|
250 |
|
251 |
</form>
|
252 |
+
|
253 |
+
<?php if ($active_tab == 'api_key'): ?>
|
254 |
+
<?php include_once 'tabs/api_key_create_account.php'; ?>
|
255 |
+
<?php endif; ?>
|
256 |
+
|
257 |
<?php if ($active_tab != 'sync'): ?>
|
258 |
</div>
|
259 |
<?php endif; ?>
|
admin/partials/tabs/api_key.php
CHANGED
@@ -3,19 +3,19 @@
|
|
3 |
<!-- remove some meta and generators from the <head> -->
|
4 |
<fieldset class="full">
|
5 |
<legend class="screen-reader-text">
|
6 |
-
<span><?php esc_html_e('Connect your store to Mailchimp', '
|
7 |
</legend>
|
8 |
|
9 |
|
10 |
-
<a id="mailchimp-oauth-connect" class="button button-primary tab-content-submit oauth-connect"><?php $has_valid_api_key ? esc_html_e('Reconnect', '
|
11 |
-
<h4><?php esc_html_e('Connect your store to Mailchimp', '
|
12 |
<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/>
|
13 |
<?php if ($has_valid_api_key) :?>
|
14 |
-
<p id="mailchimp-oauth-api-key-valid"><?php esc_html_e('Already connected. You can reconnect with another Mailchimp account if you want.' , '
|
15 |
<?php endif;?>
|
16 |
-
<p id="mailchimp-oauth-waiting" class="oauth-description"><?php esc_html_e('Connecting. A new window will open with Mailchimp\'s OAuth service. Please log-in an we will take care of the rest.' , '
|
17 |
-
<p id="mailchimp-oauth-error" class="oauth-description"><?php esc_html_e('Error, can\'t login.' , '
|
18 |
-
<p id="mailchimp-oauth-connecting" class="oauth-description"><?php esc_html_e('Connection in progress' , '
|
19 |
-
<p id="mailchimp-oauth-connected" class="oauth-description "><?php esc_html_e('Connected! Please wait while loading next step', '
|
20 |
</fieldset>
|
21 |
|
3 |
<!-- remove some meta and generators from the <head> -->
|
4 |
<fieldset class="full">
|
5 |
<legend class="screen-reader-text">
|
6 |
+
<span><?php esc_html_e('Connect your store to Mailchimp', 'mailchimp-for-woocommerce');?></span>
|
7 |
</legend>
|
8 |
|
9 |
|
10 |
+
<a id="mailchimp-oauth-connect" class="button button-primary tab-content-submit oauth-connect"><?php $has_valid_api_key ? esc_html_e('Reconnect', 'mailchimp-for-woocommerce') : esc_html_e('Connect', 'mailchimp-for-woocommerce');?></a>
|
11 |
+
<h4><?php esc_html_e('Connect your store to Mailchimp', 'mailchimp-for-woocommerce'); ?></h4>
|
12 |
<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/>
|
13 |
<?php if ($has_valid_api_key) :?>
|
14 |
+
<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>
|
15 |
<?php endif;?>
|
16 |
+
<p id="mailchimp-oauth-waiting" class="oauth-description"><?php esc_html_e('Connecting. A new window will open with Mailchimp\'s OAuth service. Please log-in an we will take care of the rest.' , 'mailchimp-for-woocommerce');?></p>
|
17 |
+
<p id="mailchimp-oauth-error" class="oauth-description"><?php esc_html_e('Error, can\'t login.' , 'mailchimp-for-woocommerce');?></p>
|
18 |
+
<p id="mailchimp-oauth-connecting" class="oauth-description"><?php esc_html_e('Connection in progress' , 'mailchimp-for-woocommerce');?></p>
|
19 |
+
<p id="mailchimp-oauth-connected" class="oauth-description "><?php esc_html_e('Connected! Please wait while loading next step', 'mailchimp-for-woocommerce');?></p>
|
20 |
</fieldset>
|
21 |
|
admin/partials/tabs/api_key_create_account.php
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p id="mc-woocommerce-create-account-link" class="create-account-link alignright">Don’t have a Mailchimp account yet? <a style="font-size: larger; font-weight:bold !important;" href='#mc-woocommerce-create-account'>Create one here</a></p>
|
2 |
+
<div id="mc-woocommerce-create-account">
|
3 |
+
<div id="exampleModal" class="reveal-modal">
|
4 |
+
<a href="#" class="close-modal"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
5 |
+
<path d="M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z" fill="black"/>
|
6 |
+
</svg>
|
7 |
+
</a>
|
8 |
+
<div class="mc-woocommerce-create-account-modal-header">
|
9 |
+
<svg width="100px" height="100px" viewBox="0 0 46 49" fill="none" xmlns="http://www.w3.org/2000/svg">
|
10 |
+
<path d="M34.5458 23.5193C34.8988 23.4778 35.2361 23.4759 35.5457 23.5193C35.7252 23.107 35.7568 22.397 35.5951 21.6239C35.3544 20.4741 35.029 19.7778 34.3584 19.8863C33.6859 19.9948 33.6622 20.8271 33.9028 21.9769C34.037 22.6238 34.2776 23.1761 34.5458 23.5193Z" fill="black"/>
|
11 |
+
<path d="M28.7763 24.4284C29.2575 24.6394 29.5534 24.7795 29.6678 24.6572C29.7427 24.5803 29.719 24.4363 29.6046 24.2489C29.368 23.8624 28.8788 23.4679 28.3621 23.249C27.303 22.7934 26.0407 22.9453 25.0664 23.6454C24.745 23.8801 24.4393 24.2075 24.4826 24.4047C24.4965 24.4698 24.5458 24.5172 24.6582 24.5329C24.9225 24.5625 25.8494 24.0951 26.9164 24.03C27.6718 23.9827 28.295 24.2174 28.7763 24.4284Z" fill="black"/>
|
12 |
+
<path d="M27.8105 24.9806C27.1852 25.0793 26.8381 25.2863 26.6172 25.4777C26.4279 25.6433 26.3115 25.8267 26.3115 25.9549C26.3115 26.0161 26.3391 26.0516 26.3589 26.0693C26.3865 26.095 26.422 26.1088 26.4614 26.1088C26.6034 26.1088 26.919 25.9826 26.919 25.9826C27.7907 25.6709 28.3647 25.7084 28.9346 25.7735C29.2502 25.809 29.3981 25.8287 29.4672 25.7202C29.4869 25.6887 29.5125 25.6216 29.4494 25.521C29.3054 25.2804 28.6723 24.8781 27.8105 24.9806Z" fill="black"/>
|
13 |
+
<path d="M32.5975 27.0061C33.0235 27.2152 33.4909 27.1324 33.6428 26.8227C33.7946 26.5131 33.5737 26.093 33.1497 25.8839C32.7237 25.6749 32.2563 25.7577 32.1044 26.0673C31.9506 26.377 32.1734 26.7971 32.5975 27.0061Z" fill="black"/>
|
14 |
+
<path d="M35.3306 24.6177C34.9854 24.6118 34.6995 24.9905 34.6916 25.4638C34.6837 25.9372 34.9578 26.3257 35.303 26.3317C35.6481 26.3376 35.9341 25.9589 35.942 25.4855C35.9499 25.0122 35.6757 24.6237 35.3306 24.6177Z" fill="black"/>
|
15 |
+
<path d="M12.1324 33.1577C12.0456 33.0492 11.9056 33.0827 11.7695 33.1143C11.6749 33.136 11.5664 33.1616 11.448 33.1596C11.1936 33.1557 10.9786 33.0452 10.8583 32.8598C10.7006 32.6192 10.7104 32.2583 10.884 31.8461C10.9076 31.7909 10.9353 31.7297 10.9648 31.6607C11.241 31.0394 11.7064 30 11.1857 29.008C10.7932 28.2625 10.1542 27.797 9.38702 27.7004C8.64939 27.6077 7.89006 27.8798 7.40685 28.4143C6.64358 29.2565 6.52328 30.4044 6.6712 30.8087C6.72445 30.9566 6.80925 30.998 6.87237 31.0059C7.00254 31.0237 7.19385 30.929 7.31416 30.6055C7.32205 30.5819 7.33388 30.5464 7.34769 30.501C7.40094 30.3294 7.50152 30.0099 7.66522 29.7555C7.86245 29.4478 8.17012 29.2348 8.53105 29.1579C8.89789 29.079 9.2746 29.15 9.58819 29.3551C10.1227 29.7062 10.3298 30.361 10.101 30.9862C9.98264 31.3096 9.79133 31.9289 9.83275 32.4378C9.91756 33.4673 10.5507 33.8795 11.1206 33.9249C11.6729 33.9466 12.0594 33.6349 12.1581 33.4081C12.2133 33.274 12.164 33.1932 12.1324 33.1577Z" fill="black"/>
|
16 |
+
<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"/>
|
17 |
+
</svg>
|
18 |
+
<h2>Create your mailchimp account (<span id="step_count">1</span> of 2)</h2>
|
19 |
+
|
20 |
+
</div>
|
21 |
+
|
22 |
+
|
23 |
+
<div id="mc-woocommerce-create-account-step-1" class="mc-woocommerce-create-account-step">
|
24 |
+
<fieldset>
|
25 |
+
<?php $user_id = get_current_user_id(); ?>
|
26 |
+
|
27 |
+
<input id="first_name" name="first_name" type="hidden" value="<?= get_user_meta( $user_id, 'first_name', true );?>">
|
28 |
+
<input id="last_name" name="last_name" type="hidden" value="<?= get_user_meta( $user_id, 'last_name', true );?>">
|
29 |
+
<input id="org" name="org" type="hidden" value="<?= get_bloginfo( 'name' );?>">
|
30 |
+
|
31 |
+
<div class="box" >
|
32 |
+
<label for="email">
|
33 |
+
<span> <?php esc_html_e('Email', 'mailchimp-for-woocommerce'); ?></span>
|
34 |
+
</label>
|
35 |
+
<input required type="email" id="email" name="email"/>
|
36 |
+
</div>
|
37 |
+
|
38 |
+
<div class="box" >
|
39 |
+
<label for="username">
|
40 |
+
<span> <?php esc_html_e('Username', 'mailchimp-for-woocommerce'); ?></span>
|
41 |
+
</label>
|
42 |
+
<input required type="text" id="username" name="username"/>
|
43 |
+
<p class="description" id ="username_suggestion"><?= esc_html__( 'Suggested username: ', 'mailchimp-for-woocommerce' ); ?><span></span></p>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
|
47 |
+
<div class="box " >
|
48 |
+
<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>
|
49 |
+
<span class="spinner"></span>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
<div class="box mc-woocommerce-create-account-step-error alignright" >
|
53 |
+
<p id ="email_error"><?= esc_html__( 'Invalid Email. Please double check.', 'mailchimp-for-woocommerce' ); ?></p>
|
54 |
+
<p id ="username_invalid_error">Username Invalid or already exists</p>
|
55 |
+
<p id ="username_exists_error">Username already exists</p>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
</fieldset>
|
61 |
+
</div>
|
62 |
+
|
63 |
+
<div id="mc-woocommerce-create-account-step-2" class="mc-woocommerce-create-account-step">
|
64 |
+
<fieldset>
|
65 |
+
<div class="box" >
|
66 |
+
<label for="address">
|
67 |
+
<span> <?php esc_html_e('Address Line 1', 'mailchimp-for-woocommerce'); ?></span>
|
68 |
+
</label>
|
69 |
+
<input required type="text" id="address" name="address"/>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<div class="box" >
|
73 |
+
<label for="address2">
|
74 |
+
<span> <?php esc_html_e('Address Line 2', 'mailchimp-for-woocommerce'); ?></span>
|
75 |
+
</label>
|
76 |
+
<input type="text" id="address2" name="address2"/>
|
77 |
+
</div>
|
78 |
+
|
79 |
+
|
80 |
+
<div class="box" >
|
81 |
+
<label for="city">
|
82 |
+
<span> <?php esc_html_e('City', 'mailchimp-for-woocommerce'); ?></span>
|
83 |
+
</label>
|
84 |
+
<input required type="text" id="city" name="city"/>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
<div class="box box-half" >
|
88 |
+
<label for="state">
|
89 |
+
<span> <?php esc_html_e('State', 'mailchimp-for-woocommerce'); ?></span>
|
90 |
+
</label>
|
91 |
+
<input required type="text" id="state" name="state"/>
|
92 |
+
</div>
|
93 |
+
|
94 |
+
<div class="box box-half" >
|
95 |
+
<label for="zip">
|
96 |
+
<span> <?php esc_html_e('Zip', 'mailchimp-for-woocommerce'); ?></span>
|
97 |
+
</label>
|
98 |
+
<input required type="text" id="zip" name="zip"/>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
<div class="box box-half" >
|
102 |
+
<label for="<?= $this->plugin_name ?>[store_country]">
|
103 |
+
<span> <?php esc_html_e('Country', 'mailchimp-for-woocommerce'); ?></span>
|
104 |
+
</label>
|
105 |
+
<?php global $woocommerce;
|
106 |
+
$countries_obj = new WC_Countries();
|
107 |
+
$countries = $countries_obj->__get('countries');
|
108 |
+
?>
|
109 |
+
|
110 |
+
<div class="mailchimp-select-wrapper">
|
111 |
+
<?php
|
112 |
+
woocommerce_form_field($this->plugin_name.'[store_country]', array(
|
113 |
+
'type' => 'select',
|
114 |
+
'id' => 'country',
|
115 |
+
'placeholder' => __('Select a Country'),
|
116 |
+
'options' => $countries,
|
117 |
+
'required' => true
|
118 |
+
),
|
119 |
+
isset($options['store_country']) ? $options['store_country'] : WC()->countries->get_base_country()
|
120 |
+
);
|
121 |
+
|
122 |
+
?>
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
|
126 |
+
<div class="box box-half" >
|
127 |
+
<label for="phone">
|
128 |
+
<span> <?php esc_html_e('Phone', 'mailchimp-for-woocommerce'); ?></span>
|
129 |
+
</label>
|
130 |
+
<input required type="text" id="phone" name="phone"/>
|
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 |
+
</label>
|
137 |
+
<div class="mailchimp-select-wrapper">
|
138 |
+
<select id="timezone" name="timezone" required>
|
139 |
+
<?php $selected_timezone = isset($options['store_timezone']) && !empty($options['store_timezone']) ? $options['store_timezone'] : get_option('timezone_string'); ?>
|
140 |
+
<?php
|
141 |
+
foreach(mailchimp_get_timezone_list() as $t) {
|
142 |
+
echo '<option value="' . esc_attr( $t['zone'] ) . '" ' . selected($t['zone'] === $selected_timezone, true, false ) . '>' . esc_html( $t['diff_from_GMT'] . ' - ' . $t['zone'] ) . '</option>';
|
143 |
+
}
|
144 |
+
?>
|
145 |
+
</select>
|
146 |
+
</div>
|
147 |
+
</div>
|
148 |
+
|
149 |
+
<div class="box terms" >
|
150 |
+
<p>
|
151 |
+
<?php
|
152 |
+
$allowed_html = array(
|
153 |
+
'a' => array(
|
154 |
+
'href' => array(),
|
155 |
+
'title' => array(),
|
156 |
+
'target' => array()
|
157 |
+
),
|
158 |
+
'br' => array()
|
159 |
+
);
|
160 |
+
?>
|
161 |
+
<?= 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=%s target=_blank>Terms of Use</a> and <a href=%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/' ) );?>
|
162 |
+
|
163 |
+
</p>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<div class="box box-half" >
|
167 |
+
<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>
|
168 |
+
</div>
|
169 |
+
|
170 |
+
<div class="box box-half" >
|
171 |
+
<a id="mc-woocommerce-create-account-go" class="button button-primary tab-content-submit"><?php esc_html_e('Get Started!', 'mailchimp-for-woocommerce'); ?></a>
|
172 |
+
<span class="spinner"></span>
|
173 |
+
</div>
|
174 |
+
|
175 |
+
<div class="box mc-woocommerce-create-account-step-error alignright" >
|
176 |
+
<p id ="address_error"><?= esc_html__( 'Invalid Address', 'mailchimp-for-woocommerce' ); ?></p>
|
177 |
+
<p id ="city_error"><?= esc_html__( 'Invalid City', 'mailchimp-for-woocommerce' ); ?></p>
|
178 |
+
<p id ="state_error"><?= esc_html__( 'Invalid State', 'mailchimp-for-woocommerce' ); ?></p>
|
179 |
+
<p id ="zip_error"><?= esc_html__( 'Invalid Zip', 'mailchimp-for-woocommerce' ); ?></p>
|
180 |
+
<p id ="country_error"><?= esc_html__( 'Invalid Country', 'mailchimp-for-woocommerce' ); ?></p>
|
181 |
+
<p id ="phone_error"><?= esc_html__( 'Invalid Phone', 'mailchimp-for-woocommerce' ); ?></p>
|
182 |
+
<p id ="timezone_error"><?= esc_html__( 'Invalid Timezone', 'mailchimp-for-woocommerce' ); ?></p>
|
183 |
+
<p id ="connecting"><?= esc_html__( 'Connecting...', 'mailchimp-for-woocommerce' ); ?></p>
|
184 |
+
</div>
|
185 |
+
</fieldset>
|
186 |
+
|
187 |
+
</div>
|
188 |
+
|
189 |
+
|
190 |
+
<div class="mc-woocommerce-create-account-modal-footer">
|
191 |
+
©2001–2019 All Rights Reserved. Mailchimp® is a registered trademark of The Rocket Science Group. Cookie Preferences, Privacy, and Terms.
|
192 |
+
</div>
|
193 |
+
|
194 |
+
</div>
|
195 |
+
</div>
|
admin/partials/tabs/campaign_defaults.php
CHANGED
@@ -16,33 +16,33 @@ if (!$handler->hasValidStoreInfo()) {
|
|
16 |
<fieldset class="">
|
17 |
<legend>
|
18 |
<legend class="screen-reader-text">
|
19 |
-
<span><?php esc_html_e('Audience Defaults', '
|
20 |
</legend>
|
21 |
</legend>
|
22 |
<div class="box box-half">
|
23 |
<label for="<?php echo $this->plugin_name; ?>-campaign-from-name-label">
|
24 |
-
<?php esc_html_e('Default from name', '
|
25 |
</label>
|
26 |
<input type="text" id="<?php echo $this->plugin_name; ?>-campaign-from-name-label" name="<?php echo $this->plugin_name; ?>[campaign_from_name]" value="<?php echo isset($options['campaign_from_name']) ? $options['campaign_from_name'] : get_option('blogname') ?>" required/>
|
27 |
</div>
|
28 |
|
29 |
<div class="box box-half">
|
30 |
<label for="<?php echo $this->plugin_name; ?>-campaign-from-email-label">
|
31 |
-
<?php esc_html_e('Default from email', '
|
32 |
</label>
|
33 |
<input type="email" id="<?php echo $this->plugin_name; ?>-campaign-from-email-label" name="<?php echo $this->plugin_name; ?>[campaign_from_email]" value="<?php echo isset($options['campaign_from_email']) ? $options['campaign_from_email'] : get_option('admin_email') ?>" required/>
|
34 |
</div>
|
35 |
|
36 |
<div class="box box-half">
|
37 |
<label for="<?php echo $this->plugin_name; ?>-campaign-subject-label">
|
38 |
-
<?php esc_html_e('Default subject', '
|
39 |
</label>
|
40 |
-
<input type="text" id="<?php echo $this->plugin_name; ?>-campaign-subject-label" name="<?php echo $this->plugin_name; ?>[campaign_subject]" value="<?php echo isset($options['campaign_subject']) ? $options['campaign_subject'] : esc_html__('Store Newsletter', '
|
41 |
</div>
|
42 |
|
43 |
<div class="box box-half">
|
44 |
<label for="<?php echo $this->plugin_name; ?>-campaign-language-label">
|
45 |
-
<?php esc_html_e('Default language', '
|
46 |
</label>
|
47 |
|
48 |
<div class="mailchimp-select-wrapper">
|
@@ -59,13 +59,13 @@ if (!$handler->hasValidStoreInfo()) {
|
|
59 |
|
60 |
<div class="box">
|
61 |
<label for="<?php echo $this->plugin_name; ?>-campaign-permission-reminder-label">
|
62 |
-
<?php esc_html_e('Permission reminder message', '
|
63 |
</label>
|
64 |
<textarea
|
65 |
rows="4"
|
66 |
id="<?php echo $this->plugin_name; ?>-campaign-permission-reminder-label"
|
67 |
name="<?php echo $this->plugin_name; ?>[campaign_permission_reminder]"
|
68 |
-
required><?php echo isset($options['campaign_permission_reminder']) ? $options['campaign_permission_reminder'] : sprintf(/* translators: %s - plugin name. */esc_html__( 'You were subscribed to the newsletter from %s', '
|
69 |
</textarea>
|
70 |
</div>
|
71 |
|
16 |
<fieldset class="">
|
17 |
<legend>
|
18 |
<legend class="screen-reader-text">
|
19 |
+
<span><?php esc_html_e('Audience Defaults', 'mailchimp-for-woocommerce');?></span>
|
20 |
</legend>
|
21 |
</legend>
|
22 |
<div class="box box-half">
|
23 |
<label for="<?php echo $this->plugin_name; ?>-campaign-from-name-label">
|
24 |
+
<?php esc_html_e('Default from name', 'mailchimp-for-woocommerce'); ?>
|
25 |
</label>
|
26 |
<input type="text" id="<?php echo $this->plugin_name; ?>-campaign-from-name-label" name="<?php echo $this->plugin_name; ?>[campaign_from_name]" value="<?php echo isset($options['campaign_from_name']) ? $options['campaign_from_name'] : get_option('blogname') ?>" required/>
|
27 |
</div>
|
28 |
|
29 |
<div class="box box-half">
|
30 |
<label for="<?php echo $this->plugin_name; ?>-campaign-from-email-label">
|
31 |
+
<?php esc_html_e('Default from email', 'mailchimp-for-woocommerce'); ?>
|
32 |
</label>
|
33 |
<input type="email" id="<?php echo $this->plugin_name; ?>-campaign-from-email-label" name="<?php echo $this->plugin_name; ?>[campaign_from_email]" value="<?php echo isset($options['campaign_from_email']) ? $options['campaign_from_email'] : get_option('admin_email') ?>" required/>
|
34 |
</div>
|
35 |
|
36 |
<div class="box box-half">
|
37 |
<label for="<?php echo $this->plugin_name; ?>-campaign-subject-label">
|
38 |
+
<?php esc_html_e('Default subject', 'mailchimp-for-woocommerce'); ?>
|
39 |
</label>
|
40 |
+
<input type="text" id="<?php echo $this->plugin_name; ?>-campaign-subject-label" name="<?php echo $this->plugin_name; ?>[campaign_subject]" value="<?php echo isset($options['campaign_subject']) ? $options['campaign_subject'] : esc_html__('Store Newsletter', 'mailchimp-for-woocommerce'); ?>" required/>
|
41 |
</div>
|
42 |
|
43 |
<div class="box box-half">
|
44 |
<label for="<?php echo $this->plugin_name; ?>-campaign-language-label">
|
45 |
+
<?php esc_html_e('Default language', 'mailchimp-for-woocommerce'); ?>
|
46 |
</label>
|
47 |
|
48 |
<div class="mailchimp-select-wrapper">
|
59 |
|
60 |
<div class="box">
|
61 |
<label for="<?php echo $this->plugin_name; ?>-campaign-permission-reminder-label">
|
62 |
+
<?php esc_html_e('Permission reminder message', 'mailchimp-for-woocommerce'); ?>
|
63 |
</label>
|
64 |
<textarea
|
65 |
rows="4"
|
66 |
id="<?php echo $this->plugin_name; ?>-campaign-permission-reminder-label"
|
67 |
name="<?php echo $this->plugin_name; ?>[campaign_permission_reminder]"
|
68 |
+
required><?php echo isset($options['campaign_permission_reminder']) ? $options['campaign_permission_reminder'] : sprintf(/* translators: %s - plugin name. */esc_html__( 'You were subscribed to the newsletter from %s', 'mailchimp-for-woocommerce' ),get_option('blogname'));?>
|
69 |
</textarea>
|
70 |
</div>
|
71 |
|
admin/partials/tabs/logs.php
CHANGED
@@ -35,11 +35,11 @@ $handle = !empty($viewed_log) ? substr($viewed_log, 0, strlen($viewed_log) > 37
|
|
35 |
|
36 |
<fieldset>
|
37 |
<legend class="screen-reader-text">
|
38 |
-
<span><?php esc_html_e('Logging Preference', '
|
39 |
</legend>
|
40 |
|
41 |
<div class="box fieldset-header" >
|
42 |
-
<label for="<?php echo $this->plugin_name; ?>-logging"><h2 style="padding-top: 1em;"><?php esc_html_e('Logging Preferences', '
|
43 |
</div>
|
44 |
|
45 |
<div class="box box-half">
|
@@ -47,7 +47,7 @@ $handle = !empty($viewed_log) ? substr($viewed_log, 0, strlen($viewed_log) > 37
|
|
47 |
<?php esc_html_e('Advanced troubleshooting can be conducted with the logging capability turned on.
|
48 |
By default, it’s set to “standard” and you may toggle to either “debug” or “none” as needed.
|
49 |
With standard logging, you can see basic information about the data submission to Mailchimp including any errors.
|
50 |
-
“Debug” gives a much deeper insight that is useful to share with support if problems arise.', '
|
51 |
?>
|
52 |
</p>
|
53 |
</div>
|
@@ -56,7 +56,7 @@ $handle = !empty($viewed_log) ? substr($viewed_log, 0, strlen($viewed_log) > 37
|
|
56 |
<select name="<?php echo $this->plugin_name; ?>[mailchimp_logging]" required>
|
57 |
<?php $logging_preference = mailchimp_environment_variables()->logging; ?>
|
58 |
<?php
|
59 |
-
foreach(array('none' => esc_html__('None', '
|
60 |
echo '<option value="'.esc_attr($log_value).'" '.selected($log_value === $logging_preference, true, false ) . '>' . esc_html($log_label) . '</option>';
|
61 |
}
|
62 |
?>
|
@@ -68,7 +68,7 @@ $handle = !empty($viewed_log) ? substr($viewed_log, 0, strlen($viewed_log) > 37
|
|
68 |
<fieldset>
|
69 |
<div class="box fieldset-header" >
|
70 |
<h2>
|
71 |
-
<?php esc_html_e('Recent Logs', '
|
72 |
</h2>
|
73 |
</div>
|
74 |
|
@@ -94,11 +94,11 @@ $handle = !empty($viewed_log) ? substr($viewed_log, 0, strlen($viewed_log) > 37
|
|
94 |
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
95 |
<path d="M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z" fill="#3C3C3C"/>
|
96 |
</svg>
|
97 |
-
<?php esc_html_e('Delete log', '
|
98 |
|
99 |
</a>
|
100 |
<a style="display:inline-block" class="mc-woocommerce-copy-log-button" href="#">
|
101 |
-
<?php esc_html_e('Copy log', '
|
102 |
</a>
|
103 |
<?php endif; ?>
|
104 |
</div>
|
35 |
|
36 |
<fieldset>
|
37 |
<legend class="screen-reader-text">
|
38 |
+
<span><?php esc_html_e('Logging Preference', 'mailchimp-for-woocommerce');?></span>
|
39 |
</legend>
|
40 |
|
41 |
<div class="box fieldset-header" >
|
42 |
+
<label for="<?php echo $this->plugin_name; ?>-logging"><h2 style="padding-top: 1em;"><?php esc_html_e('Logging Preferences', 'mailchimp-for-woocommerce');?></h2></label>
|
43 |
</div>
|
44 |
|
45 |
<div class="box box-half">
|
47 |
<?php esc_html_e('Advanced troubleshooting can be conducted with the logging capability turned on.
|
48 |
By default, it’s set to “standard” and you may toggle to either “debug” or “none” as needed.
|
49 |
With standard logging, you can see basic information about the data submission to Mailchimp including any errors.
|
50 |
+
“Debug” gives a much deeper insight that is useful to share with support if problems arise.', 'mailchimp-for-woocommerce');
|
51 |
?>
|
52 |
</p>
|
53 |
</div>
|
56 |
<select name="<?php echo $this->plugin_name; ?>[mailchimp_logging]" required>
|
57 |
<?php $logging_preference = mailchimp_environment_variables()->logging; ?>
|
58 |
<?php
|
59 |
+
foreach(array('none' => esc_html__('None', 'mailchimp-for-woocommerce'), 'debug' => esc_html__('Debug', 'mailchimp-for-woocommerce'), 'standard' => esc_html__('Standard', 'mailchimp-for-woocommerce')) as $log_value => $log_label) {
|
60 |
echo '<option value="'.esc_attr($log_value).'" '.selected($log_value === $logging_preference, true, false ) . '>' . esc_html($log_label) . '</option>';
|
61 |
}
|
62 |
?>
|
68 |
<fieldset>
|
69 |
<div class="box fieldset-header" >
|
70 |
<h2>
|
71 |
+
<?php esc_html_e('Recent Logs', 'mailchimp-for-woocommerce'); ?>
|
72 |
</h2>
|
73 |
</div>
|
74 |
|
94 |
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
95 |
<path d="M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z" fill="#3C3C3C"/>
|
96 |
</svg>
|
97 |
+
<?php esc_html_e('Delete log', 'mailchimp-for-woocommerce'); ?>
|
98 |
|
99 |
</a>
|
100 |
<a style="display:inline-block" class="mc-woocommerce-copy-log-button" href="#">
|
101 |
+
<?php esc_html_e('Copy log', 'mailchimp-for-woocommerce'); ?>
|
102 |
</a>
|
103 |
<?php endif; ?>
|
104 |
</div>
|
admin/partials/tabs/newsletter_settings.php
CHANGED
@@ -33,22 +33,22 @@ $list_is_configured = isset($options['mailchimp_list']) && (!empty($options['mai
|
|
33 |
<input type="hidden" name="mailchimp_active_settings_tab" value="newsletter_settings"/>
|
34 |
<fieldset>
|
35 |
<legend class="screen-reader-text">
|
36 |
-
<span><?php esc_html_e('Audience Settings', '
|
37 |
</legend>
|
38 |
|
39 |
<div class="box" >
|
40 |
<label for="<?php echo $this->plugin_name; ?>-mailchimp-list-label">
|
41 |
-
<strong><?php esc_html_e('Sync audience with your store', '
|
42 |
</label>
|
43 |
<div class="mailchimp-select-wrapper">
|
44 |
<select name="<?php echo $this->plugin_name; ?>[mailchimp_list]" required <?php if($list_is_configured): ?> disabled <?php endif; ?>>
|
45 |
|
46 |
<?php if(!isset($allow_new_list) || $allow_new_list === true): ?>
|
47 |
-
<option value="create_new"><?php esc_html_e('Create New Audience', '
|
48 |
<?php endif ?>
|
49 |
|
50 |
<?php if(isset($allow_new_list) && $allow_new_list === false): ?>
|
51 |
-
<option value="">-- <?php esc_html_e('Select Audience', '
|
52 |
<?php endif; ?>
|
53 |
|
54 |
<?php
|
@@ -73,35 +73,35 @@ $list_is_configured = isset($options['mailchimp_list']) && (!empty($options['mai
|
|
73 |
<?= $list_is_configured ? 'disabled': '' ?>
|
74 |
value=1
|
75 |
<?= $enable_auto_subscribe ? 'checked' : ''?>>
|
76 |
-
<strong><?php esc_html_e('During initial sync, auto subscribe the existing customers.', '
|
77 |
</label>
|
78 |
</div>
|
79 |
|
80 |
<div class="box optional-settings-button" >
|
81 |
-
<span><?php esc_html_e('Optional Audience Settings', '
|
82 |
</div>
|
83 |
|
84 |
<div class="optional-settings-content">
|
85 |
<div class="box fieldset-header" >
|
86 |
-
<h2><?php esc_html_e('Opt-in Settings', '
|
87 |
</div>
|
88 |
|
89 |
<div class="box box-half">
|
90 |
<label for="<?php echo $this->plugin_name; ?>-newsletter-checkbox-label">
|
91 |
-
<h4><?php esc_html_e('Message for the opt-in checkbox', '
|
92 |
-
<p><?php _e('Add text to go along with the other opt-in checkboxes. <br/>Customers can click a box at checkout to opt in to your newsletter.', '
|
93 |
</label>
|
94 |
</div>
|
95 |
|
96 |
<div class="box box-half">
|
97 |
-
<textarea rows="3" id="<?php echo $this->plugin_name; ?>-newsletter-checkbox-label" name="<?php echo $this->plugin_name; ?>[newsletter_label]"><?php echo isset($options['newsletter_label']) ? esc_html($options['newsletter_label']) : esc_html__('Subscribe to our newsletter', '
|
98 |
-
<p class="description"><?= esc_html(__('HTML tags allowed: <a href="" target="" title=""></a> and <br>', '
|
99 |
</div>
|
100 |
|
101 |
<div class="box box-half margin-large">
|
102 |
<label>
|
103 |
-
<h4><?php esc_html_e('Checkbox Display Options', '
|
104 |
-
<p><?php _e('Add text to go along with the other opt-in checkboxes. <br/>Customers can click a box at checkout to opt in to your newsletter.', '
|
105 |
</label>
|
106 |
</div>
|
107 |
|
@@ -109,59 +109,59 @@ $list_is_configured = isset($options['mailchimp_list']) && (!empty($options['mai
|
|
109 |
<div class="box box-half margin-large">
|
110 |
<?php $checkbox_default_settings = (array_key_exists('mailchimp_checkbox_defaults', $options) && !is_null($options['mailchimp_checkbox_defaults'])) ? $options['mailchimp_checkbox_defaults'] : 'check'; ?>
|
111 |
<label class="radio-label">
|
112 |
-
<input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="check"<?php if($checkbox_default_settings === 'check') echo ' checked="checked" '; ?>><?php esc_html_e('Visible, checked by default', '
|
113 |
</label>
|
114 |
<label class="radio-label">
|
115 |
-
<input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="uncheck"<?php if($checkbox_default_settings === 'uncheck') echo ' checked="checked" '; ?>><?php esc_html_e('Visible, unchecked by default', '
|
116 |
</label>
|
117 |
<label class="radio-label">
|
118 |
-
<input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="hide"<?php if($checkbox_default_settings === 'hide') echo ' checked="checked" '; ?>><?php esc_html_e('Hidden, unchecked by default', '
|
119 |
</label>
|
120 |
</div>
|
121 |
|
122 |
|
123 |
<div class="box box-half margin-large">
|
124 |
<label for="<?php echo $this->plugin_name; ?>-newsletter-checkbox-action">
|
125 |
-
<h4><?php esc_html_e('Advanced Checkbox Settings', '
|
126 |
-
<p><?= sprintf(/* translators: %s - Woocommerce Actions documentation URL. */wp_kses( __( '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>.', '
|
127 |
</label>
|
128 |
</div>
|
129 |
|
130 |
<div class="box box-half margin-large">
|
131 |
<input type="text" id="<?php echo $this->plugin_name; ?>-newsletter-checkbox-action" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_action]" value="<?php echo isset($options['mailchimp_checkbox_action']) ? $options['mailchimp_checkbox_action'] : 'woocommerce_after_checkout_billing_form' ?>" />
|
132 |
-
<p class="description"><?php esc_html_e('Enter a WooCommerce form action', '
|
133 |
</div>
|
134 |
|
135 |
<div class="box fieldset-header" >
|
136 |
-
<h2><?php esc_html_e('Subscriber Tags', '
|
137 |
</div>
|
138 |
|
139 |
<div class="box box-half" >
|
140 |
<label for="<?php echo $this->plugin_name; ?>-user-tags">
|
141 |
-
<h4><?php esc_html_e('Subscriber Tags', '
|
142 |
</label>
|
143 |
</div>
|
144 |
|
145 |
<div class="box box-half" >
|
146 |
<input type="text" id="<?php echo $this->plugin_name; ?>-user-tags" name="<?php echo $this->plugin_name; ?>[mailchimp_user_tags]" value="<?php echo isset($options['mailchimp_user_tags']) ? str_replace(',',', ',$options['mailchimp_user_tags']) : '' ?>" />
|
147 |
-
<p class="description"><?= __( 'Add a comma separated list of tags to add to the subscriber at Mailchimp', '
|
148 |
</div>
|
149 |
|
150 |
<div class="box fieldset-header" >
|
151 |
-
<h2><?php esc_html_e('Product Settings', '
|
152 |
</div>
|
153 |
|
154 |
|
155 |
<div class="box box-half">
|
156 |
<label for="<?php echo $this->plugin_name; ?>[mailchimp_product_image_key]">
|
157 |
-
<h4><?php esc_html_e('Product Image Size', '
|
158 |
-
<p><?= __( 'Define the product image size used by abandoned carts, order notifications, and product recommendations.', '
|
159 |
</label>
|
160 |
</div>
|
161 |
|
162 |
<div class="box box-half" >
|
163 |
<label for="<?php echo $this->plugin_name; ?>-mailchimp-product_image_key">
|
164 |
-
<span><?php esc_html_e('Size', '
|
165 |
</label>
|
166 |
<div class="mailchimp-select-wrapper">
|
167 |
<select name="<?php echo $this->plugin_name; ?>[mailchimp_product_image_key]">
|
33 |
<input type="hidden" name="mailchimp_active_settings_tab" value="newsletter_settings"/>
|
34 |
<fieldset>
|
35 |
<legend class="screen-reader-text">
|
36 |
+
<span><?php esc_html_e('Audience Settings', 'mailchimp-for-woocommerce');?></span>
|
37 |
</legend>
|
38 |
|
39 |
<div class="box" >
|
40 |
<label for="<?php echo $this->plugin_name; ?>-mailchimp-list-label">
|
41 |
+
<strong><?php esc_html_e('Sync audience with your store', 'mailchimp-for-woocommerce'); ?></strong>
|
42 |
</label>
|
43 |
<div class="mailchimp-select-wrapper">
|
44 |
<select name="<?php echo $this->plugin_name; ?>[mailchimp_list]" required <?php if($list_is_configured): ?> disabled <?php endif; ?>>
|
45 |
|
46 |
<?php if(!isset($allow_new_list) || $allow_new_list === true): ?>
|
47 |
+
<option value="create_new"><?php esc_html_e('Create New Audience', 'mailchimp-for-woocommerce');?></option>
|
48 |
<?php endif ?>
|
49 |
|
50 |
<?php if(isset($allow_new_list) && $allow_new_list === false): ?>
|
51 |
+
<option value="">-- <?php esc_html_e('Select Audience', 'mailchimp-for-woocommerce');?> --</option>
|
52 |
<?php endif; ?>
|
53 |
|
54 |
<?php
|
73 |
<?= $list_is_configured ? 'disabled': '' ?>
|
74 |
value=1
|
75 |
<?= $enable_auto_subscribe ? 'checked' : ''?>>
|
76 |
+
<strong><?php esc_html_e('During initial sync, auto subscribe the existing customers.', 'mailchimp-for-woocommerce'); ?></strong>
|
77 |
</label>
|
78 |
</div>
|
79 |
|
80 |
<div class="box optional-settings-button" >
|
81 |
+
<span><?php esc_html_e('Optional Audience Settings', 'mailchimp-for-woocommerce');?></span>
|
82 |
</div>
|
83 |
|
84 |
<div class="optional-settings-content">
|
85 |
<div class="box fieldset-header" >
|
86 |
+
<h2><?php esc_html_e('Opt-in Settings', 'mailchimp-for-woocommerce');?></h2>
|
87 |
</div>
|
88 |
|
89 |
<div class="box box-half">
|
90 |
<label for="<?php echo $this->plugin_name; ?>-newsletter-checkbox-label">
|
91 |
+
<h4><?php esc_html_e('Message for the opt-in checkbox', 'mailchimp-for-woocommerce'); ?></h4>
|
92 |
+
<p><?php _e('Add text to go along with the other opt-in checkboxes. <br/>Customers can click a box at checkout to opt in to your newsletter.', 'mailchimp-for-woocommerce');?> </p>
|
93 |
</label>
|
94 |
</div>
|
95 |
|
96 |
<div class="box box-half">
|
97 |
+
<textarea rows="3" id="<?php echo $this->plugin_name; ?>-newsletter-checkbox-label" name="<?php echo $this->plugin_name; ?>[newsletter_label]"><?php echo isset($options['newsletter_label']) ? esc_html($options['newsletter_label']) : esc_html__('Subscribe to our newsletter', 'mailchimp-for-woocommerce'); ?></textarea>
|
98 |
+
<p class="description"><?= esc_html(__('HTML tags allowed: <a href="" target="" title=""></a> and <br>', 'mailchimp-for-woocommerce')); ?></p>
|
99 |
</div>
|
100 |
|
101 |
<div class="box box-half margin-large">
|
102 |
<label>
|
103 |
+
<h4><?php esc_html_e('Checkbox Display Options', 'mailchimp-for-woocommerce');?></h4>
|
104 |
+
<p><?php _e('Add text to go along with the other opt-in checkboxes. <br/>Customers can click a box at checkout to opt in to your newsletter.', 'mailchimp-for-woocommerce');?> </p>
|
105 |
</label>
|
106 |
</div>
|
107 |
|
109 |
<div class="box box-half margin-large">
|
110 |
<?php $checkbox_default_settings = (array_key_exists('mailchimp_checkbox_defaults', $options) && !is_null($options['mailchimp_checkbox_defaults'])) ? $options['mailchimp_checkbox_defaults'] : 'check'; ?>
|
111 |
<label class="radio-label">
|
112 |
+
<input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="check"<?php if($checkbox_default_settings === 'check') echo ' checked="checked" '; ?>><?php esc_html_e('Visible, checked by default', 'mailchimp-for-woocommerce');?><br>
|
113 |
</label>
|
114 |
<label class="radio-label">
|
115 |
+
<input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="uncheck"<?php if($checkbox_default_settings === 'uncheck') echo ' checked="checked" '; ?>><?php esc_html_e('Visible, unchecked by default', 'mailchimp-for-woocommerce');?><br/>
|
116 |
</label>
|
117 |
<label class="radio-label">
|
118 |
+
<input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_defaults]" value="hide"<?php if($checkbox_default_settings === 'hide') echo ' checked="checked" '; ?>><?php esc_html_e('Hidden, unchecked by default', 'mailchimp-for-woocommerce');?><br/>
|
119 |
</label>
|
120 |
</div>
|
121 |
|
122 |
|
123 |
<div class="box box-half margin-large">
|
124 |
<label for="<?php echo $this->plugin_name; ?>-newsletter-checkbox-action">
|
125 |
+
<h4><?php esc_html_e('Advanced Checkbox Settings', 'mailchimp-for-woocommerce');?></h4>
|
126 |
+
<p><?= sprintf(/* translators: %s - Woocommerce Actions documentation URL. */wp_kses( __( '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>.', 'mailchimp-for-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://docs.woocommerce.com/wc-apidocs/hook-docs.html' ) ); ?></p>
|
127 |
</label>
|
128 |
</div>
|
129 |
|
130 |
<div class="box box-half margin-large">
|
131 |
<input type="text" id="<?php echo $this->plugin_name; ?>-newsletter-checkbox-action" name="<?php echo $this->plugin_name; ?>[mailchimp_checkbox_action]" value="<?php echo isset($options['mailchimp_checkbox_action']) ? $options['mailchimp_checkbox_action'] : 'woocommerce_after_checkout_billing_form' ?>" />
|
132 |
+
<p class="description"><?php esc_html_e('Enter a WooCommerce form action', 'mailchimp-for-woocommerce'); ?></p>
|
133 |
</div>
|
134 |
|
135 |
<div class="box fieldset-header" >
|
136 |
+
<h2><?php esc_html_e('Subscriber Tags', 'mailchimp-for-woocommerce');?></h2>
|
137 |
</div>
|
138 |
|
139 |
<div class="box box-half" >
|
140 |
<label for="<?php echo $this->plugin_name; ?>-user-tags">
|
141 |
+
<h4><?php esc_html_e('Subscriber Tags', 'mailchimp-for-woocommerce');?></h4>
|
142 |
</label>
|
143 |
</div>
|
144 |
|
145 |
<div class="box box-half" >
|
146 |
<input type="text" id="<?php echo $this->plugin_name; ?>-user-tags" name="<?php echo $this->plugin_name; ?>[mailchimp_user_tags]" value="<?php echo isset($options['mailchimp_user_tags']) ? str_replace(',',', ',$options['mailchimp_user_tags']) : '' ?>" />
|
147 |
+
<p class="description"><?= __( 'Add a comma separated list of tags to add to the subscriber at Mailchimp', 'mailchimp-for-woocommerce' ); ?></p>
|
148 |
</div>
|
149 |
|
150 |
<div class="box fieldset-header" >
|
151 |
+
<h2><?php esc_html_e('Product Settings', 'mailchimp-for-woocommerce');?></h2>
|
152 |
</div>
|
153 |
|
154 |
|
155 |
<div class="box box-half">
|
156 |
<label for="<?php echo $this->plugin_name; ?>[mailchimp_product_image_key]">
|
157 |
+
<h4><?php esc_html_e('Product Image Size', 'mailchimp-for-woocommerce');?></h4>
|
158 |
+
<p><?= __( 'Define the product image size used by abandoned carts, order notifications, and product recommendations.', 'mailchimp-for-woocommerce' ); ?></p>
|
159 |
</label>
|
160 |
</div>
|
161 |
|
162 |
<div class="box box-half" >
|
163 |
<label for="<?php echo $this->plugin_name; ?>-mailchimp-product_image_key">
|
164 |
+
<span><?php esc_html_e('Size', 'mailchimp-for-woocommerce'); ?></span>
|
165 |
</label>
|
166 |
<div class="mailchimp-select-wrapper">
|
167 |
<select name="<?php echo $this->plugin_name; ?>[mailchimp_product_image_key]">
|
admin/partials/tabs/notices.php
CHANGED
@@ -3,19 +3,19 @@
|
|
3 |
<?php
|
4 |
switch($_GET['error_notice']) {
|
5 |
case 'missing_api_key':
|
6 |
-
esc_html_e('Mailchimp says: You must enter in a valid API key.', '
|
7 |
break;
|
8 |
case 'missing_campaign_defaults':
|
9 |
-
esc_html_e('Mailchimp says: Sorry you must set up your campaign defaults before you proceed!', '
|
10 |
break;
|
11 |
case 'missing_list':
|
12 |
-
esc_html_e('Mailchimp says: You must select a marketing audience.', '
|
13 |
break;
|
14 |
case 'missing_store':
|
15 |
-
esc_html_e('Mailchimp says: Sorry you must set up your store before you proceed!', '
|
16 |
break;
|
17 |
case 'not_ready_for_sync':
|
18 |
-
esc_html_e('Mailchimp says: You are not fully ready to run the Store Sync, please verify your settings before proceeding.', '
|
19 |
break;
|
20 |
default:
|
21 |
|
@@ -29,7 +29,7 @@
|
|
29 |
<?php
|
30 |
switch($_GET['error_notice']) {
|
31 |
case 're-sync-started':
|
32 |
-
esc_html_e('Mailchimp says: Your re-sync has been started!', '
|
33 |
break;
|
34 |
default:
|
35 |
}
|
3 |
<?php
|
4 |
switch($_GET['error_notice']) {
|
5 |
case 'missing_api_key':
|
6 |
+
esc_html_e('Mailchimp says: You must enter in a valid API key.', 'mailchimp-for-woocommerce');
|
7 |
break;
|
8 |
case 'missing_campaign_defaults':
|
9 |
+
esc_html_e('Mailchimp says: Sorry you must set up your campaign defaults before you proceed!', 'mailchimp-for-woocommerce');
|
10 |
break;
|
11 |
case 'missing_list':
|
12 |
+
esc_html_e('Mailchimp says: You must select a marketing audience.', 'mailchimp-for-woocommerce');
|
13 |
break;
|
14 |
case 'missing_store':
|
15 |
+
esc_html_e('Mailchimp says: Sorry you must set up your store before you proceed!', 'mailchimp-for-woocommerce');
|
16 |
break;
|
17 |
case 'not_ready_for_sync':
|
18 |
+
esc_html_e('Mailchimp says: You are not fully ready to run the Store Sync, please verify your settings before proceeding.', 'mailchimp-for-woocommerce');
|
19 |
break;
|
20 |
default:
|
21 |
|
29 |
<?php
|
30 |
switch($_GET['error_notice']) {
|
31 |
case 're-sync-started':
|
32 |
+
esc_html_e('Mailchimp says: Your re-sync has been started!', 'mailchimp-for-woocommerce');
|
33 |
break;
|
34 |
default:
|
35 |
}
|
admin/partials/tabs/store_info.php
CHANGED
@@ -12,53 +12,53 @@ if (!$handler->hasValidApiKey()) {
|
|
12 |
|
13 |
<fieldset class="">
|
14 |
<legend class="screen-reader-text">
|
15 |
-
<span><?php esc_html_e('Store Settings', '
|
16 |
</legend>
|
17 |
<div class="box box-half" >
|
18 |
<label for="<?php echo $this->plugin_name; ?>-store-name-label">
|
19 |
-
<span> <?php esc_html_e('Name', '
|
20 |
</label>
|
21 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-name-label" name="<?php echo $this->plugin_name; ?>[store_name]" value="<?php echo isset($options['store_name']) ? $options['store_name'] : get_option('blogname') ?>" />
|
22 |
</div>
|
23 |
|
24 |
<div class="box box-half" >
|
25 |
<label for="<?php echo $this->plugin_name; ?>-admin-email-label">
|
26 |
-
<span> <?php esc_html_e('Email', '
|
27 |
</label>
|
28 |
<input required type="email" id="<?php echo $this->plugin_name; ?>-admin-email-label" name="<?php echo $this->plugin_name; ?>[admin_email]" value="<?php echo isset($options['admin_email']) ? $options['admin_email'] : get_option('admin_email') ?>" />
|
29 |
</div>
|
30 |
|
31 |
<div class="box box-half" >
|
32 |
<label for="<?php echo $this->plugin_name; ?>-store-address-label">
|
33 |
-
<span> <?php esc_html_e('Street address', '
|
34 |
</label>
|
35 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-address-label" name="<?php echo $this->plugin_name; ?>[store_street]" value="<?php echo isset($options['store_street']) ? $options['store_street'] : WC()->countries->get_base_address(); ?>" />
|
36 |
</div>
|
37 |
|
38 |
<div class="box box-half" >
|
39 |
<label for="<?php echo $this->plugin_name; ?>-store-city-label">
|
40 |
-
<span> <?php esc_html_e('City', '
|
41 |
</label>
|
42 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-city-label" name="<?php echo $this->plugin_name; ?>[store_city]" value="<?php echo isset($options['store_city']) ? $options['store_city'] : WC()->countries->get_base_city(); ?>" />
|
43 |
</div>
|
44 |
|
45 |
<div class="box box-half" >
|
46 |
<label for="<?php echo $this->plugin_name; ?>-store-state-label">
|
47 |
-
<span> <?php esc_html_e('State', '
|
48 |
</label>
|
49 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-state-label" name="<?php echo $this->plugin_name; ?>[store_state]" value="<?php echo isset($options['store_state']) ? $options['store_state'] : WC()->countries->get_base_state(); ?>" />
|
50 |
</div>
|
51 |
|
52 |
<div class="box box-half" >
|
53 |
<label for="<?php echo $this->plugin_name; ?>-store-postal-code-label">
|
54 |
-
<span> <?php esc_html_e('Postal Code', '
|
55 |
</label>
|
56 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-postal-code-label" name="<?php echo $this->plugin_name; ?>[store_postal_code]" value="<?php echo isset($options['store_postal_code']) ? $options['store_postal_code'] : WC()->countries->get_base_postcode(); ?>" />
|
57 |
</div>
|
58 |
|
59 |
<div class="box box-half" >
|
60 |
<label for="<?php echo $this->plugin_name; ?>-store-country-label">
|
61 |
-
<span> <?php esc_html_e('Country', '
|
62 |
</label>
|
63 |
|
64 |
<?php global $woocommerce;
|
@@ -84,24 +84,24 @@ if (!$handler->hasValidApiKey()) {
|
|
84 |
|
85 |
<div class="box box-half" >
|
86 |
<label for="<?php echo $this->plugin_name; ?>-store-phone-label">
|
87 |
-
<span> <?php esc_html_e('Phone Number', '
|
88 |
</label>
|
89 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-phone-label" name="<?php echo $this->plugin_name; ?>[store_phone]" value="<?php echo isset($options['store_phone']) ? $options['store_phone'] : '' ?>" />
|
90 |
</div>
|
91 |
|
92 |
<div class="box fieldset-header" >
|
93 |
-
<h2 style="padding-top: 1em;"><?= __('Locale Settings', '
|
94 |
<br/>
|
95 |
-
<p><?= __('Please apply your locale settings. If you\'re unsure about these, use the defaults.', '
|
96 |
</div>
|
97 |
|
98 |
<div class="box box-half" >
|
99 |
<label for="<?php echo $this->plugin_name; ?>-store-locale-label">
|
100 |
-
<span><?php esc_html_e('Locale', '
|
101 |
</label>
|
102 |
<div class="mailchimp-select-wrapper">
|
103 |
<select name="<?php echo $this->plugin_name; ?>[store_locale]" required>
|
104 |
-
<option disabled selected value="<?= __('','
|
105 |
<?php $selected_locale = isset($options['store_locale']) && !empty($options['store_locale']) ? $options['store_locale'] : substr(get_locale(), 0, 2); ?>
|
106 |
<?php foreach(MailChimp_Api_Locales::simple() as $locale_key => $local_value) : ?>
|
107 |
<option value="<?php echo esc_attr( $locale_key ) . '" ' . selected($locale_key === $selected_locale, true, false ); ?>"> <?php esc_html_e( $local_value ) ?> </option>;
|
@@ -116,18 +116,18 @@ if (!$handler->hasValidApiKey()) {
|
|
116 |
$current_currency_data = MailChimp_WooCommerce_CurrencyCodes::getCurrency($current_currency);
|
117 |
?>
|
118 |
<label for="<?php echo $this->plugin_name; ?>-store-currency-code-label">
|
119 |
-
<span><?php esc_html_e('Woocommerce Currency', '
|
120 |
</label>
|
121 |
<input type="text" value="<?php echo isset($current_currency_data) ? $current_currency . ' | ' . $current_currency_data['name']: $current_currency ?>" disabled/>
|
122 |
</div>
|
123 |
|
124 |
<div class="box" >
|
125 |
<label for="<?php echo $this->plugin_name; ?>-store-timezone-label">
|
126 |
-
<span><?php esc_html_e('Timezone', '
|
127 |
</label>
|
128 |
<div class="mailchimp-select-wrapper">
|
129 |
<select name="<?php echo $this->plugin_name; ?>[store_timezone]" required>
|
130 |
-
<option disabled selected value="<?= __('','
|
131 |
<?php $selected_timezone = isset($options['store_timezone']) && !empty($options['store_timezone']) ? $options['store_timezone'] : get_option('timezone_string'); ?>
|
132 |
<?php
|
133 |
foreach(mailchimp_get_timezone_list() as $t) {
|
@@ -137,4 +137,32 @@ if (!$handler->hasValidApiKey()) {
|
|
137 |
</select>
|
138 |
</div>
|
139 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
</fieldset>
|
12 |
|
13 |
<fieldset class="">
|
14 |
<legend class="screen-reader-text">
|
15 |
+
<span><?php esc_html_e('Store Settings', 'mailchimp-for-woocommerce');?></span>
|
16 |
</legend>
|
17 |
<div class="box box-half" >
|
18 |
<label for="<?php echo $this->plugin_name; ?>-store-name-label">
|
19 |
+
<span> <?php esc_html_e('Name', 'mailchimp-for-woocommerce'); ?></span>
|
20 |
</label>
|
21 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-name-label" name="<?php echo $this->plugin_name; ?>[store_name]" value="<?php echo isset($options['store_name']) ? $options['store_name'] : get_option('blogname') ?>" />
|
22 |
</div>
|
23 |
|
24 |
<div class="box box-half" >
|
25 |
<label for="<?php echo $this->plugin_name; ?>-admin-email-label">
|
26 |
+
<span> <?php esc_html_e('Email', 'mailchimp-for-woocommerce'); ?></span>
|
27 |
</label>
|
28 |
<input required type="email" id="<?php echo $this->plugin_name; ?>-admin-email-label" name="<?php echo $this->plugin_name; ?>[admin_email]" value="<?php echo isset($options['admin_email']) ? $options['admin_email'] : get_option('admin_email') ?>" />
|
29 |
</div>
|
30 |
|
31 |
<div class="box box-half" >
|
32 |
<label for="<?php echo $this->plugin_name; ?>-store-address-label">
|
33 |
+
<span> <?php esc_html_e('Street address', 'mailchimp-for-woocommerce'); ?></span>
|
34 |
</label>
|
35 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-address-label" name="<?php echo $this->plugin_name; ?>[store_street]" value="<?php echo isset($options['store_street']) ? $options['store_street'] : WC()->countries->get_base_address(); ?>" />
|
36 |
</div>
|
37 |
|
38 |
<div class="box box-half" >
|
39 |
<label for="<?php echo $this->plugin_name; ?>-store-city-label">
|
40 |
+
<span> <?php esc_html_e('City', 'mailchimp-for-woocommerce'); ?></span>
|
41 |
</label>
|
42 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-city-label" name="<?php echo $this->plugin_name; ?>[store_city]" value="<?php echo isset($options['store_city']) ? $options['store_city'] : WC()->countries->get_base_city(); ?>" />
|
43 |
</div>
|
44 |
|
45 |
<div class="box box-half" >
|
46 |
<label for="<?php echo $this->plugin_name; ?>-store-state-label">
|
47 |
+
<span> <?php esc_html_e('State', 'mailchimp-for-woocommerce'); ?></span>
|
48 |
</label>
|
49 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-state-label" name="<?php echo $this->plugin_name; ?>[store_state]" value="<?php echo isset($options['store_state']) ? $options['store_state'] : WC()->countries->get_base_state(); ?>" />
|
50 |
</div>
|
51 |
|
52 |
<div class="box box-half" >
|
53 |
<label for="<?php echo $this->plugin_name; ?>-store-postal-code-label">
|
54 |
+
<span> <?php esc_html_e('Postal Code', 'mailchimp-for-woocommerce'); ?></span>
|
55 |
</label>
|
56 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-postal-code-label" name="<?php echo $this->plugin_name; ?>[store_postal_code]" value="<?php echo isset($options['store_postal_code']) ? $options['store_postal_code'] : WC()->countries->get_base_postcode(); ?>" />
|
57 |
</div>
|
58 |
|
59 |
<div class="box box-half" >
|
60 |
<label for="<?php echo $this->plugin_name; ?>-store-country-label">
|
61 |
+
<span> <?php esc_html_e('Country', 'mailchimp-for-woocommerce'); ?></span>
|
62 |
</label>
|
63 |
|
64 |
<?php global $woocommerce;
|
84 |
|
85 |
<div class="box box-half" >
|
86 |
<label for="<?php echo $this->plugin_name; ?>-store-phone-label">
|
87 |
+
<span> <?php esc_html_e('Phone Number', 'mailchimp-for-woocommerce'); ?></span>
|
88 |
</label>
|
89 |
<input required type="text" id="<?php echo $this->plugin_name; ?>-store-phone-label" name="<?php echo $this->plugin_name; ?>[store_phone]" value="<?php echo isset($options['store_phone']) ? $options['store_phone'] : '' ?>" />
|
90 |
</div>
|
91 |
|
92 |
<div class="box fieldset-header" >
|
93 |
+
<h2 style="padding-top: 1em;"><?= __('Locale Settings', 'mailchimp-for-woocommerce');?></h2>
|
94 |
<br/>
|
95 |
+
<p><?= __('Please apply your locale settings. If you\'re unsure about these, use the defaults.', 'mailchimp-for-woocommerce');?></p>
|
96 |
</div>
|
97 |
|
98 |
<div class="box box-half" >
|
99 |
<label for="<?php echo $this->plugin_name; ?>-store-locale-label">
|
100 |
+
<span><?php esc_html_e('Locale', 'mailchimp-for-woocommerce'); ?></span>
|
101 |
</label>
|
102 |
<div class="mailchimp-select-wrapper">
|
103 |
<select name="<?php echo $this->plugin_name; ?>[store_locale]" required>
|
104 |
+
<option disabled selected value="<?= __('','mailchimp-for-woocommerce')?>"><?= __("Select store's locale",'mailchimp-for-woocommerce')?></option>
|
105 |
<?php $selected_locale = isset($options['store_locale']) && !empty($options['store_locale']) ? $options['store_locale'] : substr(get_locale(), 0, 2); ?>
|
106 |
<?php foreach(MailChimp_Api_Locales::simple() as $locale_key => $local_value) : ?>
|
107 |
<option value="<?php echo esc_attr( $locale_key ) . '" ' . selected($locale_key === $selected_locale, true, false ); ?>"> <?php esc_html_e( $local_value ) ?> </option>;
|
116 |
$current_currency_data = MailChimp_WooCommerce_CurrencyCodes::getCurrency($current_currency);
|
117 |
?>
|
118 |
<label for="<?php echo $this->plugin_name; ?>-store-currency-code-label">
|
119 |
+
<span><?php esc_html_e('Woocommerce Currency', 'mailchimp-for-woocommerce'); ?></span>
|
120 |
</label>
|
121 |
<input type="text" value="<?php echo isset($current_currency_data) ? $current_currency . ' | ' . $current_currency_data['name']: $current_currency ?>" disabled/>
|
122 |
</div>
|
123 |
|
124 |
<div class="box" >
|
125 |
<label for="<?php echo $this->plugin_name; ?>-store-timezone-label">
|
126 |
+
<span><?php esc_html_e('Timezone', 'mailchimp-for-woocommerce'); ?></span>
|
127 |
</label>
|
128 |
<div class="mailchimp-select-wrapper">
|
129 |
<select name="<?php echo $this->plugin_name; ?>[store_timezone]" required>
|
130 |
+
<option disabled selected value="<?= __('','mailchimp-for-woocommerce')?>"><?= __("Select store's timezone",'mailchimp-for-woocommerce')?></option>
|
131 |
<?php $selected_timezone = isset($options['store_timezone']) && !empty($options['store_timezone']) ? $options['store_timezone'] : get_option('timezone_string'); ?>
|
132 |
<?php
|
133 |
foreach(mailchimp_get_timezone_list() as $t) {
|
137 |
</select>
|
138 |
</div>
|
139 |
</div>
|
140 |
+
|
141 |
+
<?php
|
142 |
+
// Only admins should see mailchimp_permission_cap radio buttons
|
143 |
+
if (current_user_can('manage_options')) : ?>
|
144 |
+
|
145 |
+
<div class="box optional-settings-button" >
|
146 |
+
<span><?php esc_html_e('Optional Store Settings', 'mailchimp-for-woocommerce');?></span>
|
147 |
+
</div>
|
148 |
+
|
149 |
+
<div class="optional-settings-content">
|
150 |
+
<div class="box box-half margin-large">
|
151 |
+
<label>
|
152 |
+
<h4><?php esc_html_e('Plugin Permission Level', 'mailchimp-for-woocommerce');?></h4>
|
153 |
+
<p><?php _e('Select the minimum permission capability to manage Mailchimp for Woocommerce options', 'mailchimp-for-woocommerce');?> </p>
|
154 |
+
</label>
|
155 |
+
</div>
|
156 |
+
|
157 |
+
<div class="box box-half margin-large">
|
158 |
+
<?php $checkbox_default_settings = (array_key_exists('mailchimp_permission_cap', $options) && !is_null($options['mailchimp_permission_cap'])) ? $options['mailchimp_permission_cap'] : 'manage_options'; ?>
|
159 |
+
<label class="radio-label">
|
160 |
+
<input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_permission_cap]" value="manage_options"<?php if($checkbox_default_settings === 'manage_options') echo ' checked="checked" '; ?>><?php esc_html_e('Administrators Only', 'mailchimp-for-woocommerce');?><br>
|
161 |
+
</label>
|
162 |
+
<label class="radio-label">
|
163 |
+
<input type="radio" name="<?php echo $this->plugin_name; ?>[mailchimp_permission_cap]" value="manage_woocommerce"<?php if($checkbox_default_settings === 'manage_woocommerce') echo ' checked="checked" '; ?>><?php esc_html_e('Shop Managers and Administrators', 'mailchimp-for-woocommerce');?><br/>
|
164 |
+
</label>
|
165 |
+
</div>
|
166 |
+
</div>
|
167 |
+
<?php endif; ?>
|
168 |
</fieldset>
|
admin/partials/tabs/store_sync.php
CHANGED
@@ -79,7 +79,7 @@ if (($mailchimp_api = mailchimp_get_api()) && ($store = $mailchimp_api->getStore
|
|
79 |
<div class="sync-stats-wrapper sync-stats-store">
|
80 |
<div class="box sync-stats-card promo_rules" >
|
81 |
<div class="sync-stats-card-content">
|
82 |
-
<span class="card_label"><strong><?php esc_html_e('Coupons', '
|
83 |
<span class="card_count" id="mailchimp_promo_rules_count"><?php echo $mailchimp_total_promo_rules; ?></span>
|
84 |
<div class="progress-bar-wrapper">
|
85 |
<span class="card_count_label mailchimp_promo_rules_count_partial"></span>
|
@@ -89,7 +89,7 @@ if (($mailchimp_api = mailchimp_get_api()) && ($store = $mailchimp_api->getStore
|
|
89 |
</div>
|
90 |
<div class="box sync-stats-card products" >
|
91 |
<div class="sync-stats-card-content">
|
92 |
-
<span class="card_label"><strong><?php esc_html_e('Products', '
|
93 |
<span class="card_count" id="mailchimp_product_count"><?php echo $mailchimp_total_products; ?></span>
|
94 |
<div class="progress-bar-wrapper">
|
95 |
<span class="card_count_label mailchimp_product_count_partial"></span>
|
@@ -99,7 +99,7 @@ if (($mailchimp_api = mailchimp_get_api()) && ($store = $mailchimp_api->getStore
|
|
99 |
</div>
|
100 |
<div class="box sync-stats-card orders" >
|
101 |
<div class="sync-stats-card-content">
|
102 |
-
<span class="card_label"><strong><?php esc_html_e('Orders', '
|
103 |
<span class="card_count" id="mailchimp_order_count"><?php echo $mailchimp_total_orders; ?></span>
|
104 |
<div class="progress-bar-wrapper">
|
105 |
<div class="progress-bar"></div>
|
@@ -112,21 +112,21 @@ if (($mailchimp_api = mailchimp_get_api()) && ($store = $mailchimp_api->getStore
|
|
112 |
<div class="sync-stats-wrapper sync-stats-audience" style="margin-top: 26px;">
|
113 |
<div class="box sync-stats-card subscribers" >
|
114 |
<div class="sync-stats-card-content">
|
115 |
-
<span class="card_label"><strong><?php esc_html_e('Subscribers', '
|
116 |
<span class="card_count" id="mailchimp_subscriber_count"><?php echo $mailchimp_total_subscribers; ?></span>
|
117 |
<img class="sync-loader" src="<?php echo plugin_dir_url( __FILE__ ) . "images/3dotpurple.gif"; ?>"/>
|
118 |
</div>
|
119 |
</div>
|
120 |
<div class="box sync-stats-card transactional" >
|
121 |
<div class="sync-stats-card-content">
|
122 |
-
<span class="card_label"><strong><?php esc_html_e('Transactional', '
|
123 |
<span class="card_count" id="mailchimp_transactional_count"><?php echo $mailchimp_total_transactional; ?></span>
|
124 |
<img class="sync-loader" src="<?php echo plugin_dir_url( __FILE__ ) . "images/3dotpurple.gif"; ?>"/>
|
125 |
</div>
|
126 |
</div>
|
127 |
<div class="box sync-stats-card unsubscribed" >
|
128 |
<div class="sync-stats-card-content">
|
129 |
-
<span class="card_label"><strong><?php esc_html_e('Unsubscribed', '
|
130 |
<span class="card_count" id="mailchimp_unsubscribed_count"><?php echo $mailchimp_total_unsubscribed; ?></span>
|
131 |
<img class="sync-loader" src="<?php echo plugin_dir_url( __FILE__ ) . "images/3dotpurple.gif"; ?>"/>
|
132 |
</div>
|
@@ -145,52 +145,83 @@ if (($mailchimp_api = mailchimp_get_api()) && ($store = $mailchimp_api->getStore
|
|
145 |
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
146 |
<path d="M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z" fill="#3C3C3C"/>
|
147 |
</svg>
|
148 |
-
<?php esc_html_e('DISCONNECT STORE', '
|
149 |
</button>
|
150 |
|
151 |
-
<p><strong><?php esc_html_e('Account Connected', '
|
152 |
<br/>
|
153 |
-
<p><strong><?php esc_html_e('Audience Connected', '
|
154 |
<p id="mailchimp_list_name"><?php echo $mailchimp_list_name; ?></p>
|
155 |
|
156 |
<div class="mc-woocommerce-last-sync">
|
157 |
<p>
|
158 |
<?php if ($last_updated_time): ?>
|
159 |
-
<?php esc_html_e('Status:', '
|
160 |
-
<?= mailchimp_is_done_syncing() ? esc_html_e('Sync Completed', '
|
161 |
<?php elseif ($sync_started_at && !$sync_completed_at): ?>
|
162 |
-
<?php esc_html_e('Initial sync in progress', '
|
163 |
<?php endif;?>
|
164 |
</p>
|
165 |
<p>
|
166 |
-
<?php esc_html_e('Last Updated:', '
|
167 |
<i id="mailchimp_last_updated">
|
168 |
<?php if ($last_updated_time): ?>
|
169 |
-
<?php echo $last_updated_time->format( __('D, M j, Y g:i A', '
|
170 |
<?php else : ?>
|
171 |
-
<?php esc_html_e('Starting...', '
|
172 |
<?php endif;?>
|
173 |
</i>
|
174 |
<span class="spinner" style="float:none; background-size: 16px 16px; width: 16px; height: 16px; margin: 0px 10px"></span>
|
175 |
</p>
|
176 |
</div>
|
177 |
</div>
|
178 |
-
|
179 |
</div>
|
180 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
<?php if($mailchimp_api && (!$store_syncing || isset($_GET['resync']) && $_GET['resync'] === '1')): ?>
|
182 |
-
<h2 style="padding-top: 1em;"><?php esc_html_e('Advanced', '
|
183 |
<p id="resync_data_help_text">
|
184 |
-
<?php esc_html_e('You can resync your audience at any time without losing any of your e-commerce data.', '
|
185 |
</p>
|
186 |
-
<?php submit_button(__('Force Resync', '
|
187 |
<?php endif; ?>
|
188 |
|
189 |
-
<h2 style="padding-top: 1em;"><?php esc_html_e('More Information', '
|
190 |
<ul>
|
191 |
-
<li><?= sprintf(/* translators: %s - Plugin review URL. */wp_kses( __( 'Is this plugin helping your e-commerce business? <a href=%s target=_blank>Please leave us a ★★★★★ review!</a>.', '
|
192 |
-
<li><?= sprintf(/* translators: %s - WP-CLI URL. */wp_kses( __( 'Have a larger store or having issues syncing? Consider using <a href=%s target=_blank>WP-CLI</a>.', '
|
193 |
-
<li><?= esc_html__('Order and customer information will not sync if they contain an Amazon or generic email address.', '
|
194 |
-
<li><?= sprintf(/* translators: %s - Mailchimp Support URL. */wp_kses( __( 'Need help to connect your store? Visit the Mailchimp <a href=%s target=_blank>Knowledge Base</a>.', '
|
195 |
-
<li><?= sprintf(/* translators: %s - Mailchimp Privacy Policy URL. */wp_kses( __( 'By using this plugin, Mailchimp will process customer information in accordance with their <a href=%s target=_blank>Privacy Policy</a>.', '
|
196 |
</ul>
|
79 |
<div class="sync-stats-wrapper sync-stats-store">
|
80 |
<div class="box sync-stats-card promo_rules" >
|
81 |
<div class="sync-stats-card-content">
|
82 |
+
<span class="card_label"><strong><?php esc_html_e('Coupons', 'mailchimp-for-woocommerce');?></strong></span>
|
83 |
<span class="card_count" id="mailchimp_promo_rules_count"><?php echo $mailchimp_total_promo_rules; ?></span>
|
84 |
<div class="progress-bar-wrapper">
|
85 |
<span class="card_count_label mailchimp_promo_rules_count_partial"></span>
|
89 |
</div>
|
90 |
<div class="box sync-stats-card products" >
|
91 |
<div class="sync-stats-card-content">
|
92 |
+
<span class="card_label"><strong><?php esc_html_e('Products', 'mailchimp-for-woocommerce');?></strong></span>
|
93 |
<span class="card_count" id="mailchimp_product_count"><?php echo $mailchimp_total_products; ?></span>
|
94 |
<div class="progress-bar-wrapper">
|
95 |
<span class="card_count_label mailchimp_product_count_partial"></span>
|
99 |
</div>
|
100 |
<div class="box sync-stats-card orders" >
|
101 |
<div class="sync-stats-card-content">
|
102 |
+
<span class="card_label"><strong><?php esc_html_e('Orders', 'mailchimp-for-woocommerce');?></strong></span>
|
103 |
<span class="card_count" id="mailchimp_order_count"><?php echo $mailchimp_total_orders; ?></span>
|
104 |
<div class="progress-bar-wrapper">
|
105 |
<div class="progress-bar"></div>
|
112 |
<div class="sync-stats-wrapper sync-stats-audience" style="margin-top: 26px;">
|
113 |
<div class="box sync-stats-card subscribers" >
|
114 |
<div class="sync-stats-card-content">
|
115 |
+
<span class="card_label"><strong><?php esc_html_e('Subscribers', 'mailchimp-for-woocommerce');?></strong></span>
|
116 |
<span class="card_count" id="mailchimp_subscriber_count"><?php echo $mailchimp_total_subscribers; ?></span>
|
117 |
<img class="sync-loader" src="<?php echo plugin_dir_url( __FILE__ ) . "images/3dotpurple.gif"; ?>"/>
|
118 |
</div>
|
119 |
</div>
|
120 |
<div class="box sync-stats-card transactional" >
|
121 |
<div class="sync-stats-card-content">
|
122 |
+
<span class="card_label"><strong><?php esc_html_e('Transactional', 'mailchimp-for-woocommerce');?></strong></span>
|
123 |
<span class="card_count" id="mailchimp_transactional_count"><?php echo $mailchimp_total_transactional; ?></span>
|
124 |
<img class="sync-loader" src="<?php echo plugin_dir_url( __FILE__ ) . "images/3dotpurple.gif"; ?>"/>
|
125 |
</div>
|
126 |
</div>
|
127 |
<div class="box sync-stats-card unsubscribed" >
|
128 |
<div class="sync-stats-card-content">
|
129 |
+
<span class="card_label"><strong><?php esc_html_e('Unsubscribed', 'mailchimp-for-woocommerce');?></strong></span>
|
130 |
<span class="card_count" id="mailchimp_unsubscribed_count"><?php echo $mailchimp_total_unsubscribed; ?></span>
|
131 |
<img class="sync-loader" src="<?php echo plugin_dir_url( __FILE__ ) . "images/3dotpurple.gif"; ?>"/>
|
132 |
</div>
|
145 |
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
146 |
<path d="M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z" fill="#3C3C3C"/>
|
147 |
</svg>
|
148 |
+
<?php esc_html_e('DISCONNECT STORE', 'mailchimp-for-woocommerce');?>
|
149 |
</button>
|
150 |
|
151 |
+
<p><strong><?php esc_html_e('Account Connected', 'mailchimp-for-woocommerce');?></strong></p> <p id="mailchimp_account_connected"><?php echo $account_name; ?></p>
|
152 |
<br/>
|
153 |
+
<p><strong><?php esc_html_e('Audience Connected', 'mailchimp-for-woocommerce');?></strong></p>
|
154 |
<p id="mailchimp_list_name"><?php echo $mailchimp_list_name; ?></p>
|
155 |
|
156 |
<div class="mc-woocommerce-last-sync">
|
157 |
<p>
|
158 |
<?php if ($last_updated_time): ?>
|
159 |
+
<?php esc_html_e('Status:', 'mailchimp-for-woocommerce');?>
|
160 |
+
<?= mailchimp_is_done_syncing() ? esc_html_e('Sync Completed', 'mailchimp-for-woocommerce') : esc_html_e('Syncing...', 'mailchimp-for-woocommerce'); ?>
|
161 |
<?php elseif ($sync_started_at && !$sync_completed_at): ?>
|
162 |
+
<?php esc_html_e('Initial sync in progress', 'mailchimp-for-woocommerce');?>
|
163 |
<?php endif;?>
|
164 |
</p>
|
165 |
<p>
|
166 |
+
<?php esc_html_e('Last Updated:', 'mailchimp-for-woocommerce');?>
|
167 |
<i id="mailchimp_last_updated">
|
168 |
<?php if ($last_updated_time): ?>
|
169 |
+
<?php echo $last_updated_time->format( __('D, M j, Y g:i A', 'mailchimp-for-woocommerce')); ?>
|
170 |
<?php else : ?>
|
171 |
+
<?php esc_html_e('Starting...', 'mailchimp-for-woocommerce'); ?>
|
172 |
<?php endif;?>
|
173 |
</i>
|
174 |
<span class="spinner" style="float:none; background-size: 16px 16px; width: 16px; height: 16px; margin: 0px 10px"></span>
|
175 |
</p>
|
176 |
</div>
|
177 |
</div>
|
|
|
178 |
</div>
|
179 |
</div>
|
180 |
+
|
181 |
+
<div class="sync-content-wrapper sync-comm-wrapper">
|
182 |
+
<?php
|
183 |
+
$opt = get_option('mailchimp-woocommerce-comm.opt');
|
184 |
+
$admin_email = mailchimp_get_option('admin_email', get_option('admin_email'));
|
185 |
+
$comm_enabled = $opt != null ? $opt : '0';
|
186 |
+
?>
|
187 |
+
<h3>Communication</h3>
|
188 |
+
<div class="box box-half">
|
189 |
+
<p>
|
190 |
+
Occasionally we may send you information about how-to's, updates, and other news to the store's admin email address. Choose whether or not you want to receive these messages at <?php echo $admin_email; ?>.
|
191 |
+
</p>
|
192 |
+
</div>
|
193 |
+
|
194 |
+
<div class="box box-half comm_box_wrapper">
|
195 |
+
<fieldset>
|
196 |
+
<p>
|
197 |
+
<span>Messaging is currently
|
198 |
+
<span class="comm_box_status <?= $comm_enabled === '0' ? 'hidden' : '';?>" id="comm_box_status_1" <?php if($comm_enabled === '0') echo ' class="hidden" '; ?> > <?php esc_html_e('enabled', 'mailchimp-for-woocommerce');?></span>
|
199 |
+
<span class="comm_box_status <?= $comm_enabled === '1' ? 'hidden' : '';?>" id="comm_box_status_0" <?php if($comm_enabled === '1') echo ' class="hidden" '; ?>> <?php esc_html_e('disabled', 'mailchimp-for-woocommerce');?></span>
|
200 |
+
</span>
|
201 |
+
<label class="el-switch el-checkbox-green">
|
202 |
+
<input id="comm_box_switch" type="checkbox" name="switch" <?php if($comm_enabled === '1') echo ' checked="checked" '; ?> value="1">
|
203 |
+
<span class="el-switch-style"></span>
|
204 |
+
</label>
|
205 |
+
<span class="mc-comm-save" id="mc-comm-save">Saved!</span>
|
206 |
+
</p>
|
207 |
+
</fieldset>
|
208 |
+
</div>
|
209 |
+
|
210 |
+
</div>
|
211 |
+
|
212 |
<?php if($mailchimp_api && (!$store_syncing || isset($_GET['resync']) && $_GET['resync'] === '1')): ?>
|
213 |
+
<h2 style="padding-top: 1em;"><?php esc_html_e('Advanced', 'mailchimp-for-woocommerce');?></h2>
|
214 |
<p id="resync_data_help_text">
|
215 |
+
<?php esc_html_e('You can resync your audience at any time without losing any of your e-commerce data.', 'mailchimp-for-woocommerce');?>
|
216 |
</p>
|
217 |
+
<?php submit_button(__('Force Resync', 'mailchimp-for-woocommerce'), 'primary mc-woocommerce-resync-button','submit', TRUE); ?>
|
218 |
<?php endif; ?>
|
219 |
|
220 |
+
<h2 style="padding-top: 1em;"><?php esc_html_e('More Information', 'mailchimp-for-woocommerce'); ?></h2>
|
221 |
<ul>
|
222 |
+
<li><?= sprintf(/* translators: %s - Plugin review URL. */wp_kses( __( 'Is this plugin helping your e-commerce business? <a href=%s target=_blank>Please leave us a ★★★★★ review!</a>.', 'mailchimp-for-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://wordpress.org/support/plugin/mailchimp-for-woocommerce/reviews/' ) );?></li>
|
223 |
+
<li><?= sprintf(/* translators: %s - WP-CLI URL. */wp_kses( __( 'Have a larger store or having issues syncing? Consider using <a href=%s target=_blank>WP-CLI</a>.', 'mailchimp-for-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://github.com/mailchimp/mc-woocommerce/issues/158' ) );?></li>
|
224 |
+
<li><?= esc_html__('Order and customer information will not sync if they contain an Amazon or generic email address.', 'mailchimp-for-woocommerce');?></li>
|
225 |
+
<li><?= sprintf(/* translators: %s - Mailchimp Support URL. */wp_kses( __( 'Need help to connect your store? Visit the Mailchimp <a href=%s target=_blank>Knowledge Base</a>.', 'mailchimp-for-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://mailchimp.com/help/connect-or-disconnect-mailchimp-for-woocommerce/' ) );?></li>
|
226 |
+
<li><?= sprintf(/* translators: %s - Mailchimp Privacy Policy URL. */wp_kses( __( 'By using this plugin, Mailchimp will process customer information in accordance with their <a href=%s target=_blank>Privacy Policy</a>.', 'mailchimp-for-woocommerce' ), array( 'a' => array( 'href' => array(), 'target'=> '_blank' ) ) ), esc_url( 'https://mailchimp.com/legal/privacy/' ) );?></li>
|
227 |
</ul>
|
bootstrap.php
CHANGED
@@ -90,7 +90,7 @@ function mailchimp_environment_variables() {
|
|
90 |
return (object) array(
|
91 |
'repo' => 'master',
|
92 |
'environment' => 'production', // staging or production
|
93 |
-
'version' => '2.3',
|
94 |
'php_version' => phpversion(),
|
95 |
'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
|
96 |
'wc_version' => function_exists('WC') ? WC()->version : null,
|
@@ -98,52 +98,6 @@ function mailchimp_environment_variables() {
|
|
98 |
);
|
99 |
}
|
100 |
|
101 |
-
// Add WP CLI commands
|
102 |
-
if (defined( 'WP_CLI' ) && WP_CLI) {
|
103 |
-
try {
|
104 |
-
/**
|
105 |
-
* Service push to MailChimp
|
106 |
-
*
|
107 |
-
* <type>
|
108 |
-
* : product_sync order_sync order product
|
109 |
-
*/
|
110 |
-
function mailchimp_cli_push_command( $args, $assoc_args ) {
|
111 |
-
if (is_array($args) && isset($args[0])) {
|
112 |
-
switch($args[0]) {
|
113 |
-
|
114 |
-
case 'product_sync':
|
115 |
-
mailchimp_handle_or_queue(new MailChimp_WooCommerce_Process_Products());
|
116 |
-
WP_CLI::success("queued up the product sync!");
|
117 |
-
break;
|
118 |
-
|
119 |
-
case 'order_sync':
|
120 |
-
mailchimp_handle_or_queue(new MailChimp_WooCommerce_Process_Orders());
|
121 |
-
WP_CLI::success("queued up the order sync!");
|
122 |
-
break;
|
123 |
-
|
124 |
-
case 'order':
|
125 |
-
if (!isset($args[1])) {
|
126 |
-
wp_die('You must specify an order id as the 2nd parameter.');
|
127 |
-
}
|
128 |
-
mailchimp_handle_or_queue(new MailChimp_WooCommerce_Single_Order($args[1]));
|
129 |
-
WP_CLI::success("queued up the order {$args[1]}!");
|
130 |
-
break;
|
131 |
-
|
132 |
-
case 'product':
|
133 |
-
if (!isset($args[1])) {
|
134 |
-
wp_die('You must specify a product id as the 2nd parameter.');
|
135 |
-
}
|
136 |
-
mailchimp_handle_or_queue(new MailChimp_WooCommerce_Single_Product($args[1]));
|
137 |
-
WP_CLI::success("queued up the product {$args[1]}!");
|
138 |
-
break;
|
139 |
-
}
|
140 |
-
}
|
141 |
-
};
|
142 |
-
WP_CLI::add_command( 'mailchimp_push', 'mailchimp_cli_push_command');
|
143 |
-
WP_CLI::add_command( 'queue', 'Mailchimp_Wocoomerce_CLI' );
|
144 |
-
} catch (\Exception $e) {}
|
145 |
-
}
|
146 |
-
|
147 |
/**
|
148 |
* Push a job onto the Action Scheduler queue.
|
149 |
*
|
@@ -162,14 +116,14 @@ function mailchimp_as_push( Mailchimp_Woocommerce_Job $job, $delay = 0 ) {
|
|
162 |
'created_at' => gmdate( 'Y-m-d H:i:s', time() )
|
163 |
);
|
164 |
|
165 |
-
$existing_actions = as_get_scheduled_actions(array(
|
166 |
'hook' => get_class($job),
|
167 |
'status' => ActionScheduler_Store::STATUS_PENDING,
|
168 |
'args' => array(
|
169 |
'obj_id' => isset($job->id) ? $job->id : null),
|
170 |
'group' => 'mc-woocommerce'
|
171 |
)
|
172 |
-
);
|
173 |
|
174 |
if (!empty($existing_actions)) {
|
175 |
as_unschedule_action(get_class($job), array('obj_id' => $job->id), 'mc-woocommerce');
|
@@ -192,15 +146,15 @@ function mailchimp_as_push( Mailchimp_Woocommerce_Job $job, $delay = 0 ) {
|
|
192 |
}
|
193 |
}
|
194 |
|
195 |
-
// TODO: deal with errors
|
196 |
$action = as_schedule_single_action( strtotime( '+'.$delay.' seconds' ), get_class($job), array('obj_id' => $job_id), "mc-woocommerce");
|
197 |
|
198 |
$message = ($job_id != get_class($job)) ? ' :: obj_id '.$job_id : '';
|
|
|
199 |
if (!empty($existing_actions)) {
|
200 |
-
mailchimp_debug('action_scheduler.reschedule_job', get_class($job) . ($delay > 0 ? ' restarts in '.$delay. ' seconds' : ' restarts in the next minute' ) . $message);
|
201 |
}
|
202 |
else {
|
203 |
-
mailchimp_log('action_scheduler.queue_job', get_class($job) . ($delay > 0 ? ' starts in '.$delay. ' seconds' : ' starts in the next minute' )
|
204 |
}
|
205 |
|
206 |
return $action;
|
@@ -596,12 +550,15 @@ function mailchimp_error_trace(\Exception $e, $wrap = "") {
|
|
596 |
* @return bool
|
597 |
*/
|
598 |
function mailchimp_string_contains($haystack, $needles) {
|
|
|
599 |
foreach ((array) $needles as $needle) {
|
600 |
-
|
|
|
|
|
|
|
601 |
return true;
|
602 |
}
|
603 |
}
|
604 |
-
|
605 |
return false;
|
606 |
}
|
607 |
|
@@ -638,8 +595,14 @@ function mailchimp_get_order_count() {
|
|
638 |
*/
|
639 |
function mailchimp_count_posts($type) {
|
640 |
global $wpdb;
|
641 |
-
|
642 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
643 |
$response = array();
|
644 |
foreach ($posts as $post) {
|
645 |
$response[$post->post_status] = $post->num_posts;
|
@@ -915,13 +878,13 @@ function mailchimp_flush_database_tables() {
|
|
915 |
|
916 |
function mailchimp_delete_as_jobs() {
|
917 |
|
918 |
-
$existing_as_actions = as_get_scheduled_actions(
|
919 |
array(
|
920 |
'status' => ActionScheduler_Store::STATUS_PENDING,
|
921 |
'group' => 'mc-woocommerce',
|
922 |
'per_page' => -1,
|
923 |
)
|
924 |
-
);
|
925 |
|
926 |
if (!empty($existing_as_actions)) {
|
927 |
foreach ($existing_as_actions as $as_action) {
|
@@ -956,6 +919,7 @@ function mailchimp_clean_database() {
|
|
956 |
delete_option('mailchimp-woocommerce-sync.syncing');
|
957 |
delete_option('mailchimp-woocommerce-sync.started_at');
|
958 |
delete_option('mailchimp-woocommerce-sync.completed_at');
|
|
|
959 |
delete_option('mailchimp-woocommerce-validation.api.ping');
|
960 |
delete_option('mailchimp-woocommerce-cached-api-lists');
|
961 |
delete_option('mailchimp-woocommerce-cached-api-ping-check');
|
@@ -984,6 +948,9 @@ function run_mailchimp_woocommerce() {
|
|
984 |
$env = mailchimp_environment_variables();
|
985 |
$plugin = new MailChimp_WooCommerce($env->environment, $env->version);
|
986 |
$plugin->run();
|
|
|
|
|
|
|
987 |
}
|
988 |
|
989 |
function mailchimp_woocommerce_add_meta_tags() {
|
@@ -997,3 +964,104 @@ function mailchimp_on_all_plugins_loaded() {
|
|
997 |
}
|
998 |
}
|
999 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
return (object) array(
|
91 |
'repo' => 'master',
|
92 |
'environment' => 'production', // staging or production
|
93 |
+
'version' => '2.3.1',
|
94 |
'php_version' => phpversion(),
|
95 |
'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
|
96 |
'wc_version' => function_exists('WC') ? WC()->version : null,
|
98 |
);
|
99 |
}
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
/**
|
102 |
* Push a job onto the Action Scheduler queue.
|
103 |
*
|
116 |
'created_at' => gmdate( 'Y-m-d H:i:s', time() )
|
117 |
);
|
118 |
|
119 |
+
$existing_actions = function_exists('as_get_scheduled_actions') ? as_get_scheduled_actions(array(
|
120 |
'hook' => get_class($job),
|
121 |
'status' => ActionScheduler_Store::STATUS_PENDING,
|
122 |
'args' => array(
|
123 |
'obj_id' => isset($job->id) ? $job->id : null),
|
124 |
'group' => 'mc-woocommerce'
|
125 |
)
|
126 |
+
) : null;
|
127 |
|
128 |
if (!empty($existing_actions)) {
|
129 |
as_unschedule_action(get_class($job), array('obj_id' => $job->id), 'mc-woocommerce');
|
146 |
}
|
147 |
}
|
148 |
|
|
|
149 |
$action = as_schedule_single_action( strtotime( '+'.$delay.' seconds' ), get_class($job), array('obj_id' => $job_id), "mc-woocommerce");
|
150 |
|
151 |
$message = ($job_id != get_class($job)) ? ' :: obj_id '.$job_id : '';
|
152 |
+
$attempts = $job->get_attempts() > 0 ? ' attempt:' . $job->get_attempts() : '';
|
153 |
if (!empty($existing_actions)) {
|
154 |
+
mailchimp_debug('action_scheduler.reschedule_job', get_class($job) . ($delay > 0 ? ' restarts in '.$delay. ' seconds' : ' restarts in the next minute' ) . $message . $attempts);
|
155 |
}
|
156 |
else {
|
157 |
+
mailchimp_log('action_scheduler.queue_job', get_class($job) . ($delay > 0 ? ' starts in '.$delay. ' seconds' : ' starts in the next minute' ) . $message . $attempts);
|
158 |
}
|
159 |
|
160 |
return $action;
|
550 |
* @return bool
|
551 |
*/
|
552 |
function mailchimp_string_contains($haystack, $needles) {
|
553 |
+
$has_mb = function_exists('mb_strpos');
|
554 |
foreach ((array) $needles as $needle) {
|
555 |
+
$has_needle = $needle != '';
|
556 |
+
// make sure the server has "mb_strpos" otherwise this fails. Fallback to "strpos"
|
557 |
+
$position = $has_mb ? mb_strpos($haystack, $needle) : strpos($haystack, $needle);
|
558 |
+
if ($has_needle && $position !== false) {
|
559 |
return true;
|
560 |
}
|
561 |
}
|
|
|
562 |
return false;
|
563 |
}
|
564 |
|
595 |
*/
|
596 |
function mailchimp_count_posts($type) {
|
597 |
global $wpdb;
|
598 |
+
if ($type === 'shop_order') {
|
599 |
+
$query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s AND post_status = %s GROUP BY post_status";
|
600 |
+
$posts = $wpdb->get_results( $wpdb->prepare($query, $type, 'wc-completed'));
|
601 |
+
} else {
|
602 |
+
$query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s GROUP BY post_status";
|
603 |
+
$posts = $wpdb->get_results( $wpdb->prepare($query, $type));
|
604 |
+
}
|
605 |
+
|
606 |
$response = array();
|
607 |
foreach ($posts as $post) {
|
608 |
$response[$post->post_status] = $post->num_posts;
|
878 |
|
879 |
function mailchimp_delete_as_jobs() {
|
880 |
|
881 |
+
$existing_as_actions = function_exists('as_get_scheduled_actions') ? as_get_scheduled_actions(
|
882 |
array(
|
883 |
'status' => ActionScheduler_Store::STATUS_PENDING,
|
884 |
'group' => 'mc-woocommerce',
|
885 |
'per_page' => -1,
|
886 |
)
|
887 |
+
) : null;
|
888 |
|
889 |
if (!empty($existing_as_actions)) {
|
890 |
foreach ($existing_as_actions as $as_action) {
|
919 |
delete_option('mailchimp-woocommerce-sync.syncing');
|
920 |
delete_option('mailchimp-woocommerce-sync.started_at');
|
921 |
delete_option('mailchimp-woocommerce-sync.completed_at');
|
922 |
+
delete_option('mailchimp-woocommerce-sync.initial_sync');
|
923 |
delete_option('mailchimp-woocommerce-validation.api.ping');
|
924 |
delete_option('mailchimp-woocommerce-cached-api-lists');
|
925 |
delete_option('mailchimp-woocommerce-cached-api-ping-check');
|
948 |
$env = mailchimp_environment_variables();
|
949 |
$plugin = new MailChimp_WooCommerce($env->environment, $env->version);
|
950 |
$plugin->run();
|
951 |
+
if (isset($_GET['restart_order_sync']) && $_GET['restart_order_sync'] === '1') {
|
952 |
+
mailchimp_as_push(new MailChimp_WooCommerce_Process_Orders());
|
953 |
+
}
|
954 |
}
|
955 |
|
956 |
function mailchimp_woocommerce_add_meta_tags() {
|
964 |
}
|
965 |
}
|
966 |
|
967 |
+
function mailchimp_get_allowed_capability() {
|
968 |
+
if (current_user_can('manage_woocommerce') && mailchimp_get_option('mailchimp_permission_cap') == 'manage_woocommerce') {
|
969 |
+
return 'manage_woocommerce';
|
970 |
+
}
|
971 |
+
return 'manage_options';
|
972 |
+
}
|
973 |
+
|
974 |
+
/**
|
975 |
+
* @param MailChimp_WooCommerce_Order $order
|
976 |
+
* @param null|boolean $subscribed
|
977 |
+
*/
|
978 |
+
function mailchimp_update_member_with_double_opt_in(MailChimp_WooCommerce_Order $order, $subscribed = null)
|
979 |
+
{
|
980 |
+
if (!mailchimp_is_configured()) return;
|
981 |
+
|
982 |
+
$api = mailchimp_get_api();
|
983 |
+
|
984 |
+
// if the customer has a flag to double opt in - we need to push this data over to MailChimp as pending
|
985 |
+
// before the order is submitted.
|
986 |
+
if ($subscribed) {
|
987 |
+
if ($order->getCustomer()->requiresDoubleOptIn()) {
|
988 |
+
try {
|
989 |
+
$list_id = mailchimp_get_list_id();
|
990 |
+
$merge_fields = $order->getCustomer()->getMergeFields();
|
991 |
+
$email = $order->getCustomer()->getEmailAddress();
|
992 |
+
|
993 |
+
try {
|
994 |
+
$member = $api->member($list_id, $email);
|
995 |
+
if ($member['status'] === 'transactional') {
|
996 |
+
$api->update($list_id, $email, 'pending', $merge_fields);
|
997 |
+
mailchimp_tell_system_about_user_submit($email, mailchimp_get_subscriber_status_options('pending'), 60);
|
998 |
+
mailchimp_log('double_opt_in', "Updated {$email} Using Double Opt In - previous status was '{$member['status']}'", $merge_fields);
|
999 |
+
}
|
1000 |
+
} catch (\Exception $e) {
|
1001 |
+
// if the error code is 404 - need to subscribe them because it means they were not on the list.
|
1002 |
+
if ($e->getCode() == 404) {
|
1003 |
+
$api->subscribe($list_id, $email, false, $merge_fields);
|
1004 |
+
mailchimp_tell_system_about_user_submit($email, mailchimp_get_subscriber_status_options(false), 60);
|
1005 |
+
mailchimp_log('double_opt_in', "Subscribed {$email} Using Double Opt In", $merge_fields);
|
1006 |
+
} else {
|
1007 |
+
mailchimp_error('double_opt_in.update', $e->getMessage());
|
1008 |
+
}
|
1009 |
+
}
|
1010 |
+
} catch (\Exception $e) {
|
1011 |
+
mailchimp_error('double_opt_in.create', $e->getMessage());
|
1012 |
+
}
|
1013 |
+
} else {
|
1014 |
+
// if we've set the wordpress user correctly on the customer
|
1015 |
+
if (($wordpress_user = $order->getCustomer()->getWordpressUser())) {
|
1016 |
+
$user_submit = new MailChimp_WooCommerce_User_Submit($wordpress_user->ID, true, null, substr( get_locale(), 0, 2 ));
|
1017 |
+
$user_submit->handle();
|
1018 |
+
}
|
1019 |
+
}
|
1020 |
+
}
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
// Add WP CLI commands
|
1024 |
+
if (defined( 'WP_CLI' ) && WP_CLI) {
|
1025 |
+
try {
|
1026 |
+
/**
|
1027 |
+
* Service push to MailChimp
|
1028 |
+
*
|
1029 |
+
* <type>
|
1030 |
+
* : product_sync order_sync order product
|
1031 |
+
*/
|
1032 |
+
function mailchimp_cli_push_command( $args, $assoc_args ) {
|
1033 |
+
if (is_array($args) && isset($args[0])) {
|
1034 |
+
switch($args[0]) {
|
1035 |
+
|
1036 |
+
case 'product_sync':
|
1037 |
+
mailchimp_handle_or_queue(new MailChimp_WooCommerce_Process_Products());
|
1038 |
+
WP_CLI::success("queued up the product sync!");
|
1039 |
+
break;
|
1040 |
+
|
1041 |
+
case 'order_sync':
|
1042 |
+
mailchimp_handle_or_queue(new MailChimp_WooCommerce_Process_Orders());
|
1043 |
+
WP_CLI::success("queued up the order sync!");
|
1044 |
+
break;
|
1045 |
+
|
1046 |
+
case 'order':
|
1047 |
+
if (!isset($args[1])) {
|
1048 |
+
wp_die('You must specify an order id as the 2nd parameter.');
|
1049 |
+
}
|
1050 |
+
mailchimp_handle_or_queue(new MailChimp_WooCommerce_Single_Order($args[1]));
|
1051 |
+
WP_CLI::success("queued up the order {$args[1]}!");
|
1052 |
+
break;
|
1053 |
+
|
1054 |
+
case 'product':
|
1055 |
+
if (!isset($args[1])) {
|
1056 |
+
wp_die('You must specify a product id as the 2nd parameter.');
|
1057 |
+
}
|
1058 |
+
mailchimp_handle_or_queue(new MailChimp_WooCommerce_Single_Product($args[1]));
|
1059 |
+
WP_CLI::success("queued up the product {$args[1]}!");
|
1060 |
+
break;
|
1061 |
+
}
|
1062 |
+
}
|
1063 |
+
};
|
1064 |
+
WP_CLI::add_command( 'mailchimp_push', 'mailchimp_cli_push_command');
|
1065 |
+
WP_CLI::add_command( 'queue', 'Mailchimp_Wocoomerce_CLI' );
|
1066 |
+
} catch (\Exception $e) {}
|
1067 |
+
}
|
includes/api/assets/class-mailchimp-customer.php
CHANGED
@@ -21,6 +21,7 @@ class MailChimp_WooCommerce_Customer
|
|
21 |
protected $address;
|
22 |
protected $requires_double_optin = false;
|
23 |
protected $original_subscriber_status = null;
|
|
|
24 |
|
25 |
/**
|
26 |
* @return array
|
@@ -268,6 +269,26 @@ class MailChimp_WooCommerce_Customer
|
|
268 |
);
|
269 |
}
|
270 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
/**
|
272 |
* @return array
|
273 |
*/
|
21 |
protected $address;
|
22 |
protected $requires_double_optin = false;
|
23 |
protected $original_subscriber_status = null;
|
24 |
+
protected $wordpress_user = null;
|
25 |
|
26 |
/**
|
27 |
* @return array
|
269 |
);
|
270 |
}
|
271 |
|
272 |
+
/**
|
273 |
+
* @param $user
|
274 |
+
* @return $this
|
275 |
+
*/
|
276 |
+
public function setWordpressUser($user)
|
277 |
+
{
|
278 |
+
if ($user instanceof \WP_User) {
|
279 |
+
$this->wordpress_user = $user;
|
280 |
+
}
|
281 |
+
return $this;
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* @return null|\WP_User
|
286 |
+
*/
|
287 |
+
public function getWordpressUser()
|
288 |
+
{
|
289 |
+
return $this->wordpress_user;
|
290 |
+
}
|
291 |
+
|
292 |
/**
|
293 |
* @return array
|
294 |
*/
|
includes/api/assets/class-mailchimp-order.php
CHANGED
@@ -32,6 +32,8 @@ class MailChimp_WooCommerce_Order
|
|
32 |
protected $promos = array();
|
33 |
protected $is_amazon_order = false;
|
34 |
protected $is_privacy_protected = false;
|
|
|
|
|
35 |
|
36 |
/**
|
37 |
* @param $bool
|
@@ -69,6 +71,43 @@ class MailChimp_WooCommerce_Order
|
|
69 |
return (bool) $this->is_privacy_protected;
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
/**
|
73 |
* @return array
|
74 |
*/
|
@@ -276,7 +315,7 @@ class MailChimp_WooCommerce_Order
|
|
276 |
}
|
277 |
|
278 |
try {
|
279 |
-
$woo =
|
280 |
$this->currency_code = $woo->get_currency();
|
281 |
} catch (\Exception $e) {
|
282 |
$this->currency_code = get_woocommerce_currency();
|
32 |
protected $promos = array();
|
33 |
protected $is_amazon_order = false;
|
34 |
protected $is_privacy_protected = false;
|
35 |
+
protected $original_woo_status = null;
|
36 |
+
protected $ignore_if_new = false;
|
37 |
|
38 |
/**
|
39 |
* @param $bool
|
71 |
return (bool) $this->is_privacy_protected;
|
72 |
}
|
73 |
|
74 |
+
/**
|
75 |
+
* @param string $status
|
76 |
+
* @return $this
|
77 |
+
*/
|
78 |
+
public function setOriginalWooStatus($status)
|
79 |
+
{
|
80 |
+
$this->original_woo_status = (string) $status;
|
81 |
+
return $this;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* @return null
|
86 |
+
*/
|
87 |
+
public function getOriginalWooStatus()
|
88 |
+
{
|
89 |
+
return $this->original_woo_status;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* @return bool
|
94 |
+
*/
|
95 |
+
public function shouldIgnoreIfNotInMailchimp()
|
96 |
+
{
|
97 |
+
return (bool) $this->ignore_if_new;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @param $bool
|
102 |
+
* @return $this
|
103 |
+
*/
|
104 |
+
public function flagAsIgnoreIfNotInMailchimp($bool)
|
105 |
+
{
|
106 |
+
$this->ignore_if_new = (bool) $bool;
|
107 |
+
|
108 |
+
return $this;
|
109 |
+
}
|
110 |
+
|
111 |
/**
|
112 |
* @return array
|
113 |
*/
|
315 |
}
|
316 |
|
317 |
try {
|
318 |
+
$woo = wc_get_order($this->id);
|
319 |
$this->currency_code = $woo->get_currency();
|
320 |
} catch (\Exception $e) {
|
321 |
$this->currency_code = get_woocommerce_currency();
|
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())
|
200 |
{
|
201 |
$data = array(
|
202 |
'email_type' => 'html',
|
@@ -204,6 +204,7 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
204 |
'status' => ($subscribed === true ? 'subscribed' : 'pending'),
|
205 |
'merge_fields' => $merge_fields,
|
206 |
'interests' => $list_interests,
|
|
|
207 |
);
|
208 |
|
209 |
if (empty($data['merge_fields'])) {
|
@@ -213,6 +214,10 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
213 |
if (empty($data['interests'])) {
|
214 |
unset($data['interests']);
|
215 |
}
|
|
|
|
|
|
|
|
|
216 |
|
217 |
mailchimp_debug('api.subscribe', "Subscribing {$email}", $data);
|
218 |
|
@@ -229,7 +234,7 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
229 |
* @throws Exception
|
230 |
* @throws MailChimp_WooCommerce_Error
|
231 |
*/
|
232 |
-
public function update($list_id, $email, $subscribed = true, $merge_fields = array(), $list_interests = array())
|
233 |
{
|
234 |
$hash = md5(strtolower(trim($email)));
|
235 |
|
@@ -248,17 +253,21 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
248 |
'status' => $status,
|
249 |
'merge_fields' => $merge_fields,
|
250 |
'interests' => $list_interests,
|
|
|
251 |
);
|
252 |
|
253 |
if (empty($data['merge_fields'])) {
|
254 |
unset($data['merge_fields']);
|
255 |
}
|
256 |
|
257 |
-
|
258 |
if (empty($data['interests'])) {
|
259 |
unset($data['interests']);
|
260 |
}
|
261 |
|
|
|
|
|
|
|
|
|
262 |
mailchimp_debug('api.update_member', "Updating {$email}", $data);
|
263 |
|
264 |
return $this->patch("lists/$list_id/members/$hash", $data);
|
@@ -344,7 +353,7 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
344 |
* @throws MailChimp_WooCommerce_Error
|
345 |
* @throws MailChimp_WooCommerce_ServerError
|
346 |
*/
|
347 |
-
public function updateOrCreate($list_id, $email, $subscribed = true, $merge_fields = array(), $list_interests = array())
|
348 |
{
|
349 |
$hash = md5(strtolower(trim($email)));
|
350 |
|
@@ -368,6 +377,7 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
368 |
'status_if_new' => $status_if_new,
|
369 |
'merge_fields' => $merge_fields,
|
370 |
'interests' => $list_interests,
|
|
|
371 |
);
|
372 |
|
373 |
if (empty($data['merge_fields'])) {
|
@@ -377,7 +387,11 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
377 |
if (empty($data['interests'])) {
|
378 |
unset($data['interests']);
|
379 |
}
|
380 |
-
|
|
|
|
|
|
|
|
|
381 |
mailchimp_debug('api.update_or_create', "Update Or Create {$email}", $data);
|
382 |
|
383 |
return $this->put("lists/$list_id/members/$hash", $data);
|
@@ -407,6 +421,10 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
407 |
{
|
408 |
$result = $this->get('lists', array('count' => $count));
|
409 |
|
|
|
|
|
|
|
|
|
410 |
if ($as_list) {
|
411 |
$lists = array();
|
412 |
if ($result) {
|
@@ -447,7 +465,11 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
447 |
*/
|
448 |
public function getList($id)
|
449 |
{
|
450 |
-
|
|
|
|
|
|
|
|
|
451 |
}
|
452 |
|
453 |
/**
|
@@ -471,6 +493,7 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
471 |
public function getListsWithMergeFields()
|
472 |
{
|
473 |
$lists = $this->getLists(true);
|
|
|
474 |
foreach ($lists as $id => $name) {
|
475 |
$lists[$id] = $this->mergeFields($id, 100);
|
476 |
}
|
@@ -490,6 +513,10 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
490 |
{
|
491 |
$result = $this->get("lists/$list_id/merge-fields", array('count' => $count,));
|
492 |
|
|
|
|
|
|
|
|
|
493 |
return $result;
|
494 |
}
|
495 |
|
@@ -554,20 +581,42 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
554 |
|
555 |
/**
|
556 |
* @param $store_id
|
557 |
-
* @return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
*/
|
559 |
-
public function getStore($store_id)
|
560 |
{
|
561 |
try {
|
562 |
$data = $this->get("ecommerce/stores/$store_id");
|
|
|
|
|
|
|
563 |
if (!isset($data['id']) || !isset($data['name'])) {
|
564 |
return false;
|
565 |
}
|
566 |
$store = new MailChimp_WooCommerce_Store();
|
567 |
return $store->fromArray($data);
|
568 |
} catch (MailChimp_WooCommerce_Error $e) {
|
|
|
569 |
return false;
|
570 |
} catch (\Exception $e) {
|
|
|
571 |
return false;
|
572 |
}
|
573 |
}
|
@@ -641,7 +690,7 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
641 |
try {
|
642 |
$data = $this->get("ecommerce/stores", array('count' => 1000));
|
643 |
|
644 |
-
if (!isset($data['stores']) || empty($data['stores'])) {
|
645 |
return array();
|
646 |
}
|
647 |
|
@@ -741,16 +790,21 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
741 |
/**
|
742 |
* @param $store_id
|
743 |
* @param $customer_id
|
|
|
744 |
* @return bool|MailChimp_WooCommerce_Customer
|
745 |
* @throws Exception
|
746 |
*/
|
747 |
-
public function getCustomer($store_id, $customer_id)
|
748 |
{
|
749 |
try {
|
750 |
$data = $this->get("ecommerce/stores/$store_id/customers/$customer_id");
|
|
|
|
|
|
|
751 |
$customer = new MailChimp_WooCommerce_Customer();
|
752 |
return $customer->fromArray($data);
|
753 |
} catch (MailChimp_WooCommerce_Error $e) {
|
|
|
754 |
return false;
|
755 |
}
|
756 |
}
|
@@ -768,6 +822,9 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
768 |
return false;
|
769 |
}
|
770 |
$data = $this->post("ecommerce/stores", $customer->toArray());
|
|
|
|
|
|
|
771 |
$customer = new MailChimp_WooCommerce_Customer();
|
772 |
return $customer->fromArray($data);
|
773 |
}
|
@@ -1015,16 +1072,21 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
1015 |
/**
|
1016 |
* @param $store_id
|
1017 |
* @param $order_id
|
|
|
1018 |
* @return bool|MailChimp_WooCommerce_Order
|
1019 |
* @throws Exception
|
1020 |
*/
|
1021 |
-
public function getStoreOrder($store_id, $order_id)
|
1022 |
{
|
1023 |
try {
|
1024 |
$data = $this->get("ecommerce/stores/$store_id/orders/$order_id");
|
|
|
|
|
|
|
1025 |
$order = new MailChimp_WooCommerce_Order();
|
1026 |
return $order->fromArray($data);
|
1027 |
} catch (MailChimp_WooCommerce_Error $e) {
|
|
|
1028 |
return false;
|
1029 |
}
|
1030 |
}
|
@@ -1063,16 +1125,21 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
1063 |
/**
|
1064 |
* @param $store_id
|
1065 |
* @param $product_id
|
|
|
1066 |
* @return bool|MailChimp_WooCommerce_Product
|
1067 |
* @throws Exception
|
1068 |
*/
|
1069 |
-
public function getStoreProduct($store_id, $product_id)
|
1070 |
{
|
1071 |
try {
|
1072 |
$data = $this->get("ecommerce/stores/$store_id/products/$product_id");
|
|
|
|
|
|
|
1073 |
$product = new MailChimp_WooCommerce_Product();
|
1074 |
return $product->fromArray($data);
|
1075 |
} catch (MailChimp_WooCommerce_Error $e) {
|
|
|
1076 |
return false;
|
1077 |
}
|
1078 |
}
|
@@ -1602,7 +1669,7 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
1602 |
CURLINFO_HEADER_OUT => true,
|
1603 |
CURLOPT_HTTPHEADER => array_merge(array(
|
1604 |
'content-type: application/json',
|
1605 |
-
'accept
|
1606 |
"user-agent: MailChimp for WooCommerce/{$env->version}; PHP/{$env->php_version}; WordPress/{$env->wp_version}; Woo/{$env->wc_version};",
|
1607 |
), $headers)
|
1608 |
);
|
@@ -1612,6 +1679,11 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
1612 |
$curl_options[CURLOPT_INTERFACE] = MAILCHIMP_USE_OUTBOUND_IP;
|
1613 |
}
|
1614 |
|
|
|
|
|
|
|
|
|
|
|
1615 |
return $curl_options;
|
1616 |
}
|
1617 |
|
@@ -1636,11 +1708,20 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
1636 |
|
1637 |
$data = json_decode($response, true);
|
1638 |
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1644 |
if (is_array($data)) {
|
1645 |
try {
|
1646 |
$this->checkForErrors($data);
|
@@ -1651,20 +1732,22 @@ class MailChimp_WooCommerce_MailChimpApi
|
|
1651 |
return $data;
|
1652 |
}
|
1653 |
|
1654 |
-
if ($
|
1655 |
-
if ($
|
1656 |
-
// mailchimp_error('api', 'processCurlResponse', array('info' => $info, 'data' => $data));
|
1657 |
-
}
|
1658 |
-
if ($info['http_code'] == 403) {
|
1659 |
throw new MailChimp_WooCommerce_RateLimitError();
|
1660 |
}
|
1661 |
throw new MailChimp_WooCommerce_Error($data['title'] .' :: '.$data['detail'], $data['status']);
|
1662 |
}
|
1663 |
|
1664 |
-
if ($
|
1665 |
throw new MailChimp_WooCommerce_ServerError($data['detail'], $data['status']);
|
1666 |
}
|
1667 |
|
|
|
|
|
|
|
|
|
|
|
1668 |
return null;
|
1669 |
}
|
1670 |
|
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 |
$data = array(
|
202 |
'email_type' => 'html',
|
204 |
'status' => ($subscribed === true ? 'subscribed' : 'pending'),
|
205 |
'merge_fields' => $merge_fields,
|
206 |
'interests' => $list_interests,
|
207 |
+
'language' => $language
|
208 |
);
|
209 |
|
210 |
if (empty($data['merge_fields'])) {
|
214 |
if (empty($data['interests'])) {
|
215 |
unset($data['interests']);
|
216 |
}
|
217 |
+
|
218 |
+
if (empty($data['language'])) {
|
219 |
+
unset($data['language']);
|
220 |
+
}
|
221 |
|
222 |
mailchimp_debug('api.subscribe', "Subscribing {$email}", $data);
|
223 |
|
234 |
* @throws Exception
|
235 |
* @throws MailChimp_WooCommerce_Error
|
236 |
*/
|
237 |
+
public function update($list_id, $email, $subscribed = true, $merge_fields = array(), $list_interests = array(), $language = null)
|
238 |
{
|
239 |
$hash = md5(strtolower(trim($email)));
|
240 |
|
253 |
'status' => $status,
|
254 |
'merge_fields' => $merge_fields,
|
255 |
'interests' => $list_interests,
|
256 |
+
'language' => $language
|
257 |
);
|
258 |
|
259 |
if (empty($data['merge_fields'])) {
|
260 |
unset($data['merge_fields']);
|
261 |
}
|
262 |
|
|
|
263 |
if (empty($data['interests'])) {
|
264 |
unset($data['interests']);
|
265 |
}
|
266 |
|
267 |
+
if (empty($data['language'])) {
|
268 |
+
unset($data['language']);
|
269 |
+
}
|
270 |
+
|
271 |
mailchimp_debug('api.update_member', "Updating {$email}", $data);
|
272 |
|
273 |
return $this->patch("lists/$list_id/members/$hash", $data);
|
353 |
* @throws MailChimp_WooCommerce_Error
|
354 |
* @throws MailChimp_WooCommerce_ServerError
|
355 |
*/
|
356 |
+
public function updateOrCreate($list_id, $email, $subscribed = true, $merge_fields = array(), $list_interests = array(), $language = null)
|
357 |
{
|
358 |
$hash = md5(strtolower(trim($email)));
|
359 |
|
377 |
'status_if_new' => $status_if_new,
|
378 |
'merge_fields' => $merge_fields,
|
379 |
'interests' => $list_interests,
|
380 |
+
'language' => $language
|
381 |
);
|
382 |
|
383 |
if (empty($data['merge_fields'])) {
|
387 |
if (empty($data['interests'])) {
|
388 |
unset($data['interests']);
|
389 |
}
|
390 |
+
|
391 |
+
if (empty($data['language'])) {
|
392 |
+
unset($data['language']);
|
393 |
+
}
|
394 |
+
|
395 |
mailchimp_debug('api.update_or_create', "Update Or Create {$email}", $data);
|
396 |
|
397 |
return $this->put("lists/$list_id/members/$hash", $data);
|
421 |
{
|
422 |
$result = $this->get('lists', array('count' => $count));
|
423 |
|
424 |
+
if (!is_array($result)) {
|
425 |
+
throw new MailChimp_WooCommerce_RateLimitError('getting lists api failure, retry again.');
|
426 |
+
}
|
427 |
+
|
428 |
if ($as_list) {
|
429 |
$lists = array();
|
430 |
if ($result) {
|
465 |
*/
|
466 |
public function getList($id)
|
467 |
{
|
468 |
+
$result = $this->get('lists/' . $id);
|
469 |
+
if (!is_array($result)) {
|
470 |
+
throw new MailChimp_WooCommerce_RateLimitError('getting list api failure, retry again.');
|
471 |
+
}
|
472 |
+
return $result;
|
473 |
}
|
474 |
|
475 |
/**
|
493 |
public function getListsWithMergeFields()
|
494 |
{
|
495 |
$lists = $this->getLists(true);
|
496 |
+
|
497 |
foreach ($lists as $id => $name) {
|
498 |
$lists[$id] = $this->mergeFields($id, 100);
|
499 |
}
|
513 |
{
|
514 |
$result = $this->get("lists/$list_id/merge-fields", array('count' => $count,));
|
515 |
|
516 |
+
if (!is_array($result)) {
|
517 |
+
throw new MailChimp_WooCommerce_RateLimitError('getting merge field api failure, retry again.');
|
518 |
+
}
|
519 |
+
|
520 |
return $result;
|
521 |
}
|
522 |
|
581 |
|
582 |
/**
|
583 |
* @param $store_id
|
584 |
+
* @return int|mixed
|
585 |
+
* @throws MailChimp_WooCommerce_Error
|
586 |
+
* @throws MailChimp_WooCommerce_ServerError
|
587 |
+
*/
|
588 |
+
public function getOrderCount($store_id)
|
589 |
+
{
|
590 |
+
$data = $this->get("ecommerce/stores/{$store_id}/orders?count=1");
|
591 |
+
if (!is_array($data)) {
|
592 |
+
return 0;
|
593 |
+
}
|
594 |
+
return $data['total_items'];
|
595 |
+
}
|
596 |
+
|
597 |
+
/**
|
598 |
+
* @param $store_id
|
599 |
+
* @param bool $throw
|
600 |
+
* @return bool|MailChimp_WooCommerce_Store
|
601 |
+
* @throws MailChimp_WooCommerce_Error
|
602 |
*/
|
603 |
+
public function getStore($store_id, $throw = false)
|
604 |
{
|
605 |
try {
|
606 |
$data = $this->get("ecommerce/stores/$store_id");
|
607 |
+
if (!is_array($data)) {
|
608 |
+
throw new MailChimp_WooCommerce_RateLimitError('getting store api failure, retry again.');
|
609 |
+
}
|
610 |
if (!isset($data['id']) || !isset($data['name'])) {
|
611 |
return false;
|
612 |
}
|
613 |
$store = new MailChimp_WooCommerce_Store();
|
614 |
return $store->fromArray($data);
|
615 |
} catch (MailChimp_WooCommerce_Error $e) {
|
616 |
+
if ($throw) throw $e;
|
617 |
return false;
|
618 |
} catch (\Exception $e) {
|
619 |
+
if ($throw) throw $e;
|
620 |
return false;
|
621 |
}
|
622 |
}
|
690 |
try {
|
691 |
$data = $this->get("ecommerce/stores", array('count' => 1000));
|
692 |
|
693 |
+
if (!isset($data['stores']) || empty($data['stores']) || !is_array($data['stores'])) {
|
694 |
return array();
|
695 |
}
|
696 |
|
790 |
/**
|
791 |
* @param $store_id
|
792 |
* @param $customer_id
|
793 |
+
* @param boolean $throw
|
794 |
* @return bool|MailChimp_WooCommerce_Customer
|
795 |
* @throws Exception
|
796 |
*/
|
797 |
+
public function getCustomer($store_id, $customer_id, $throw = false)
|
798 |
{
|
799 |
try {
|
800 |
$data = $this->get("ecommerce/stores/$store_id/customers/$customer_id");
|
801 |
+
if (!is_array($data)) {
|
802 |
+
throw new MailChimp_WooCommerce_RateLimitError('getting customer api failure, retry again.');
|
803 |
+
}
|
804 |
$customer = new MailChimp_WooCommerce_Customer();
|
805 |
return $customer->fromArray($data);
|
806 |
} catch (MailChimp_WooCommerce_Error $e) {
|
807 |
+
if ($throw) throw $e;
|
808 |
return false;
|
809 |
}
|
810 |
}
|
822 |
return false;
|
823 |
}
|
824 |
$data = $this->post("ecommerce/stores", $customer->toArray());
|
825 |
+
if (!is_array($data)) {
|
826 |
+
throw new MailChimp_WooCommerce_RateLimitError('adding customer api failure, retry again.');
|
827 |
+
}
|
828 |
$customer = new MailChimp_WooCommerce_Customer();
|
829 |
return $customer->fromArray($data);
|
830 |
}
|
1072 |
/**
|
1073 |
* @param $store_id
|
1074 |
* @param $order_id
|
1075 |
+
* @param boolean $throw
|
1076 |
* @return bool|MailChimp_WooCommerce_Order
|
1077 |
* @throws Exception
|
1078 |
*/
|
1079 |
+
public function getStoreOrder($store_id, $order_id, $throw = false)
|
1080 |
{
|
1081 |
try {
|
1082 |
$data = $this->get("ecommerce/stores/$store_id/orders/$order_id");
|
1083 |
+
if (!is_array($data)) {
|
1084 |
+
throw new MailChimp_WooCommerce_RateLimitError('getting order api failure, retry again.');
|
1085 |
+
}
|
1086 |
$order = new MailChimp_WooCommerce_Order();
|
1087 |
return $order->fromArray($data);
|
1088 |
} catch (MailChimp_WooCommerce_Error $e) {
|
1089 |
+
if ($throw) throw $e;
|
1090 |
return false;
|
1091 |
}
|
1092 |
}
|
1125 |
/**
|
1126 |
* @param $store_id
|
1127 |
* @param $product_id
|
1128 |
+
* @param boolean $throw
|
1129 |
* @return bool|MailChimp_WooCommerce_Product
|
1130 |
* @throws Exception
|
1131 |
*/
|
1132 |
+
public function getStoreProduct($store_id, $product_id, $throw = false)
|
1133 |
{
|
1134 |
try {
|
1135 |
$data = $this->get("ecommerce/stores/$store_id/products/$product_id");
|
1136 |
+
if (!is_array($data)) {
|
1137 |
+
throw new MailChimp_WooCommerce_RateLimitError('getting product api failure, retry again.');
|
1138 |
+
}
|
1139 |
$product = new MailChimp_WooCommerce_Product();
|
1140 |
return $product->fromArray($data);
|
1141 |
} catch (MailChimp_WooCommerce_Error $e) {
|
1142 |
+
if ($throw) throw $e;
|
1143 |
return false;
|
1144 |
}
|
1145 |
}
|
1669 |
CURLINFO_HEADER_OUT => true,
|
1670 |
CURLOPT_HTTPHEADER => array_merge(array(
|
1671 |
'content-type: application/json',
|
1672 |
+
'accept: application/json',
|
1673 |
"user-agent: MailChimp for WooCommerce/{$env->version}; PHP/{$env->php_version}; WordPress/{$env->wp_version}; Woo/{$env->wc_version};",
|
1674 |
), $headers)
|
1675 |
);
|
1679 |
$curl_options[CURLOPT_INTERFACE] = MAILCHIMP_USE_OUTBOUND_IP;
|
1680 |
}
|
1681 |
|
1682 |
+
// if we need to define a specific http version being used for curl requests, we can override this here.
|
1683 |
+
if (defined('MAILCHIMP_USE_HTTP_VERSION')) {
|
1684 |
+
$curl_options[CURLOPT_HTTP_VERSION] = MAILCHIMP_USE_HTTP_VERSION;
|
1685 |
+
}
|
1686 |
+
|
1687 |
return $curl_options;
|
1688 |
}
|
1689 |
|
1708 |
|
1709 |
$data = json_decode($response, true);
|
1710 |
|
1711 |
+
$http_code = !empty($info) && isset($info['http_code']) ? $info['http_code'] : -1;
|
1712 |
+
$called_url = !empty($info) && isset($info['url']) ? $info['url'] : 'none';
|
1713 |
+
|
1714 |
+
// let's block these from doing anything below because the API seems to be having trouble.
|
1715 |
+
if ($http_code <= 99) {
|
1716 |
+
throw new MailChimp_WooCommerce_RateLimitError('API is failing - try again.');
|
1717 |
+
}
|
1718 |
+
|
1719 |
+
// possibily a successful DELETE operation
|
1720 |
+
if ($http_code == 204) {
|
1721 |
+
return true;
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
if ($http_code >= 200 && $http_code <= 400) {
|
1725 |
if (is_array($data)) {
|
1726 |
try {
|
1727 |
$this->checkForErrors($data);
|
1732 |
return $data;
|
1733 |
}
|
1734 |
|
1735 |
+
if ($http_code >= 400 && $http_code <= 500) {
|
1736 |
+
if ($http_code == 403) {
|
|
|
|
|
|
|
1737 |
throw new MailChimp_WooCommerce_RateLimitError();
|
1738 |
}
|
1739 |
throw new MailChimp_WooCommerce_Error($data['title'] .' :: '.$data['detail'], $data['status']);
|
1740 |
}
|
1741 |
|
1742 |
+
if ($http_code >= 500) {
|
1743 |
throw new MailChimp_WooCommerce_ServerError($data['detail'], $data['status']);
|
1744 |
}
|
1745 |
|
1746 |
+
if (!is_array($data)) {
|
1747 |
+
mailchimp_error("api.debug", 'fallback when data is empty from API', array('url' => $called_url, 'response' => $response));
|
1748 |
+
throw new MailChimp_WooCommerce_ServerError('API response could not be decoded.');
|
1749 |
+
}
|
1750 |
+
|
1751 |
return null;
|
1752 |
}
|
1753 |
|
includes/api/class-mailchimp-woocommerce-transform-coupons.php
CHANGED
@@ -108,10 +108,15 @@ class MailChimp_WooCommerce_Transform_Coupons
|
|
108 |
*/
|
109 |
public function getCouponPosts($page = 1, $posts = 5)
|
110 |
{
|
|
|
|
|
|
|
|
|
|
|
111 |
$coupons = get_posts(array(
|
112 |
'post_type' => array_merge(array_keys(wc_get_product_types()), array('shop_coupon')),
|
113 |
'posts_per_page' => $posts,
|
114 |
-
'
|
115 |
'orderby' => 'ID',
|
116 |
'order' => 'ASC',
|
117 |
));
|
@@ -123,7 +128,7 @@ class MailChimp_WooCommerce_Transform_Coupons
|
|
123 |
$coupons = get_posts(array(
|
124 |
'post_type' => array_merge(array_keys(wc_get_product_types()), array('shop_coupon')),
|
125 |
'posts_per_page' => $posts,
|
126 |
-
'
|
127 |
'orderby' => 'ID',
|
128 |
'order' => 'ASC',
|
129 |
));
|
108 |
*/
|
109 |
public function getCouponPosts($page = 1, $posts = 5)
|
110 |
{
|
111 |
+
$offset = 0;
|
112 |
+
if ($page > 1) {
|
113 |
+
$offset = ($page * $posts);
|
114 |
+
}
|
115 |
+
|
116 |
$coupons = get_posts(array(
|
117 |
'post_type' => array_merge(array_keys(wc_get_product_types()), array('shop_coupon')),
|
118 |
'posts_per_page' => $posts,
|
119 |
+
'offset' => $offset,
|
120 |
'orderby' => 'ID',
|
121 |
'order' => 'ASC',
|
122 |
));
|
128 |
$coupons = get_posts(array(
|
129 |
'post_type' => array_merge(array_keys(wc_get_product_types()), array('shop_coupon')),
|
130 |
'posts_per_page' => $posts,
|
131 |
+
'offset' => $offset,
|
132 |
'orderby' => 'ID',
|
133 |
'order' => 'ASC',
|
134 |
));
|
includes/api/class-mailchimp-woocommerce-transform-orders-wc3.php
CHANGED
@@ -1,24 +1,23 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
-
*
|
6 |
-
* Name: Ryan Hungate
|
7 |
-
* Email: ryan@vextras.com
|
8 |
-
* Date: 7/13/16
|
9 |
-
* Time: 8:29 AM
|
10 |
*/
|
11 |
class MailChimp_WooCommerce_Transform_Orders
|
12 |
{
|
13 |
public $campaign_id = null;
|
|
|
14 |
|
15 |
/**
|
16 |
* @param int $page
|
17 |
* @param int $limit
|
18 |
-
* @return
|
|
|
19 |
*/
|
20 |
public function compile($page = 1, $limit = 5)
|
21 |
{
|
|
|
|
|
22 |
$response = (object) array(
|
23 |
'endpoint' => 'orders',
|
24 |
'page' => $page ? $page : 1,
|
@@ -39,15 +38,20 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
39 |
continue;
|
40 |
}
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
}
|
48 |
}
|
49 |
|
50 |
$response->stuffed = ($response->count > 0 && (int) $response->count === (int) $limit) ? true : false;
|
|
|
51 |
|
52 |
return $response;
|
53 |
}
|
@@ -55,13 +59,31 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
55 |
/**
|
56 |
* @param WP_Post $post
|
57 |
* @return MailChimp_WooCommerce_Order
|
|
|
58 |
*/
|
59 |
public function transform(WP_Post $post)
|
60 |
{
|
61 |
-
$woo =
|
62 |
|
63 |
$order = new MailChimp_WooCommerce_Order();
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
$customer = $this->buildCustomerFromOrder($woo);
|
66 |
|
67 |
$email = $woo->get_billing_email();
|
@@ -91,8 +113,15 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
91 |
// grab the current statuses - this will end up being custom at some point.
|
92 |
$statuses = $this->getOrderStatuses();
|
93 |
|
94 |
-
// grab the order status
|
95 |
-
$status = $woo->get_status();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
// map the fulfillment and financial statuses based on the map above.
|
98 |
$fulfillment_status = array_key_exists($status, $statuses) ? $statuses[$status]->fulfillment : null;
|
@@ -190,13 +219,17 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
190 |
}
|
191 |
|
192 |
/**
|
193 |
-
* @param
|
194 |
* @return MailChimp_WooCommerce_Customer
|
|
|
195 |
*/
|
196 |
-
public function buildCustomerFromOrder(
|
197 |
{
|
198 |
$customer = new MailChimp_WooCommerce_Customer();
|
199 |
|
|
|
|
|
|
|
200 |
$customer->setId(mailchimp_hash_trim_lower($order->get_billing_email()));
|
201 |
$customer->setCompany($order->get_billing_company());
|
202 |
$customer->setEmailAddress(trim($order->get_billing_email()));
|
@@ -281,10 +314,10 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
281 |
}
|
282 |
|
283 |
/**
|
284 |
-
* @param
|
285 |
* @return MailChimp_WooCommerce_Address
|
286 |
*/
|
287 |
-
public function transformBillingAddress(
|
288 |
{
|
289 |
// use the info from the order to compile an address.
|
290 |
$address = new MailChimp_WooCommerce_Address();
|
@@ -308,10 +341,10 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
308 |
}
|
309 |
|
310 |
/**
|
311 |
-
* @param
|
312 |
* @return MailChimp_WooCommerce_Address
|
313 |
*/
|
314 |
-
public function transformShippingAddress(
|
315 |
{
|
316 |
$address = new MailChimp_WooCommerce_Address();
|
317 |
|
@@ -343,11 +376,17 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
343 |
*/
|
344 |
public function getOrderPosts($page = 1, $posts = 5)
|
345 |
{
|
|
|
|
|
|
|
|
|
|
|
346 |
$params = array(
|
347 |
'post_type' => wc_get_order_types(),
|
348 |
-
'post_status' => array_keys(wc_get_order_statuses()),
|
|
|
349 |
'posts_per_page' => $posts,
|
350 |
-
'
|
351 |
'orderby' => 'id',
|
352 |
'order' => 'ASC',
|
353 |
);
|
@@ -362,10 +401,9 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
362 |
}
|
363 |
|
364 |
/**
|
365 |
-
*
|
366 |
-
*
|
367 |
-
* @param WC_Order $order
|
368 |
* @return object
|
|
|
369 |
*/
|
370 |
public function getCustomerOrderTotals($order)
|
371 |
{
|
@@ -380,7 +418,7 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
380 |
$stats = (object) array('count' => 0, 'total' => 0);
|
381 |
|
382 |
foreach ($orders as $order) {
|
383 |
-
$order =
|
384 |
|
385 |
if ($order->get_status() !== 'cancelled' && $order->is_paid()) {
|
386 |
$stats->total += $order->get_total();
|
@@ -392,10 +430,9 @@ class MailChimp_WooCommerce_Transform_Orders
|
|
392 |
}
|
393 |
|
394 |
/**
|
395 |
-
* returns an object with a 'total' and a 'count'.
|
396 |
-
*
|
397 |
* @param $user_id
|
398 |
* @return object
|
|
|
399 |
*/
|
400 |
protected function getSingleCustomerOrderTotals($user_id)
|
401 |
{
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Class MailChimp_WooCommerce_Transform_Orders
|
|
|
|
|
|
|
|
|
|
|
5 |
*/
|
6 |
class MailChimp_WooCommerce_Transform_Orders
|
7 |
{
|
8 |
public $campaign_id = null;
|
9 |
+
protected $is_syncing = false;
|
10 |
|
11 |
/**
|
12 |
* @param int $page
|
13 |
* @param int $limit
|
14 |
+
* @return object
|
15 |
+
* @throws Exception
|
16 |
*/
|
17 |
public function compile($page = 1, $limit = 5)
|
18 |
{
|
19 |
+
$this->is_syncing = true;
|
20 |
+
|
21 |
$response = (object) array(
|
22 |
'endpoint' => 'orders',
|
23 |
'page' => $page ? $page : 1,
|
38 |
continue;
|
39 |
}
|
40 |
|
41 |
+
try {
|
42 |
+
$order = $this->transform($post);
|
43 |
+
if (!$order->isFlaggedAsAmazonOrder()) {
|
44 |
+
$response->valid++;
|
45 |
+
$response->items[] = $order;
|
46 |
+
}
|
47 |
+
} catch (\Exception $e) {
|
48 |
+
mailchimp_error('initial_sync', $e->getMessage(), array('post' => $post));
|
49 |
}
|
50 |
}
|
51 |
}
|
52 |
|
53 |
$response->stuffed = ($response->count > 0 && (int) $response->count === (int) $limit) ? true : false;
|
54 |
+
$this->is_syncing = false;
|
55 |
|
56 |
return $response;
|
57 |
}
|
59 |
/**
|
60 |
* @param WP_Post $post
|
61 |
* @return MailChimp_WooCommerce_Order
|
62 |
+
* @throws Exception
|
63 |
*/
|
64 |
public function transform(WP_Post $post)
|
65 |
{
|
66 |
+
$woo = wc_get_order($post);
|
67 |
|
68 |
$order = new MailChimp_WooCommerce_Order();
|
69 |
|
70 |
+
// if the woo get order returns an empty value, we need to skip the whole thing.
|
71 |
+
if (empty($woo)) {
|
72 |
+
mailchimp_error('sync', 'get woo post was not found for order '.$post->ID);
|
73 |
+
return $order;
|
74 |
+
}
|
75 |
+
|
76 |
+
// if the woo object does not have a "get_billing_email" method, then we need to skip this until
|
77 |
+
// we know how to resolve these types of things.
|
78 |
+
if (!method_exists($woo, 'get_billing_email')) {
|
79 |
+
$message = "Post ID {$post->ID} was an order refund. Skipping this.";
|
80 |
+
if ($this->is_syncing) {
|
81 |
+
throw new MailChimp_WooCommerce_Error($message);
|
82 |
+
}
|
83 |
+
mailchimp_error('initial_sync', $message, array('post' => $post, 'order_class' => get_class($woo)));
|
84 |
+
return $order;
|
85 |
+
}
|
86 |
+
|
87 |
$customer = $this->buildCustomerFromOrder($woo);
|
88 |
|
89 |
$email = $woo->get_billing_email();
|
113 |
// grab the current statuses - this will end up being custom at some point.
|
114 |
$statuses = $this->getOrderStatuses();
|
115 |
|
116 |
+
// grab the order status and set it into the object for future comparison.
|
117 |
+
$order->setOriginalWooStatus(($status = $woo->get_status()));
|
118 |
+
|
119 |
+
// if the order is "on-hold" status, and is not currently in Mailchimp, we need to ignore it
|
120 |
+
// because the payment gateways are putting this on hold while they navigate to the payment processor
|
121 |
+
// and they technically haven't paid yet.
|
122 |
+
if (in_array($status, array('on-hold', 'failed'))) {
|
123 |
+
$order->flagAsIgnoreIfNotInMailchimp(true);
|
124 |
+
}
|
125 |
|
126 |
// map the fulfillment and financial statuses based on the map above.
|
127 |
$fulfillment_status = array_key_exists($status, $statuses) ? $statuses[$status]->fulfillment : null;
|
219 |
}
|
220 |
|
221 |
/**
|
222 |
+
* @param WC_Abstract_Order $order
|
223 |
* @return MailChimp_WooCommerce_Customer
|
224 |
+
* @throws Exception
|
225 |
*/
|
226 |
+
public function buildCustomerFromOrder($order)
|
227 |
{
|
228 |
$customer = new MailChimp_WooCommerce_Customer();
|
229 |
|
230 |
+
// attach the wordpress user to the Mailchimp customer object.
|
231 |
+
$customer->setWordpressUser($order->get_user());
|
232 |
+
|
233 |
$customer->setId(mailchimp_hash_trim_lower($order->get_billing_email()));
|
234 |
$customer->setCompany($order->get_billing_company());
|
235 |
$customer->setEmailAddress(trim($order->get_billing_email()));
|
314 |
}
|
315 |
|
316 |
/**
|
317 |
+
* @param WC_Abstract_Order $order
|
318 |
* @return MailChimp_WooCommerce_Address
|
319 |
*/
|
320 |
+
public function transformBillingAddress(WC_Abstract_Order $order)
|
321 |
{
|
322 |
// use the info from the order to compile an address.
|
323 |
$address = new MailChimp_WooCommerce_Address();
|
341 |
}
|
342 |
|
343 |
/**
|
344 |
+
* @param WC_Abstract_Order $order
|
345 |
* @return MailChimp_WooCommerce_Address
|
346 |
*/
|
347 |
+
public function transformShippingAddress(WC_Abstract_Order $order)
|
348 |
{
|
349 |
$address = new MailChimp_WooCommerce_Address();
|
350 |
|
376 |
*/
|
377 |
public function getOrderPosts($page = 1, $posts = 5)
|
378 |
{
|
379 |
+
$offset = 0;
|
380 |
+
if ($page > 1) {
|
381 |
+
$offset = (($page-1) * $posts);
|
382 |
+
}
|
383 |
+
|
384 |
$params = array(
|
385 |
'post_type' => wc_get_order_types(),
|
386 |
+
//'post_status' => array_keys(wc_get_order_statuses()),
|
387 |
+
'post_status' => 'wc-completed',
|
388 |
'posts_per_page' => $posts,
|
389 |
+
'offset' => $offset,
|
390 |
'orderby' => 'id',
|
391 |
'order' => 'ASC',
|
392 |
);
|
401 |
}
|
402 |
|
403 |
/**
|
404 |
+
* @param WC_Abstract_Order $order
|
|
|
|
|
405 |
* @return object
|
406 |
+
* @throws Exception
|
407 |
*/
|
408 |
public function getCustomerOrderTotals($order)
|
409 |
{
|
418 |
$stats = (object) array('count' => 0, 'total' => 0);
|
419 |
|
420 |
foreach ($orders as $order) {
|
421 |
+
$order = wc_get_order($order);
|
422 |
|
423 |
if ($order->get_status() !== 'cancelled' && $order->is_paid()) {
|
424 |
$stats->total += $order->get_total();
|
430 |
}
|
431 |
|
432 |
/**
|
|
|
|
|
433 |
* @param $user_id
|
434 |
* @return object
|
435 |
+
* @throws Exception
|
436 |
*/
|
437 |
protected function getSingleCustomerOrderTotals($user_id)
|
438 |
{
|
includes/api/class-mailchimp-woocommerce-transform-products.php
CHANGED
@@ -63,6 +63,19 @@ class MailChimp_WooCommerce_Transform_Products
|
|
63 |
$product->setPublishedAtForeign(mailchimp_date_utc($post->post_date));
|
64 |
$product->setTitle($woo->get_title());
|
65 |
$product->setUrl($woo->get_permalink());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
foreach ($variants as $variant) {
|
68 |
|
@@ -161,28 +174,26 @@ class MailChimp_WooCommerce_Transform_Products
|
|
161 |
*/
|
162 |
public function getProductPosts($page = 1, $posts = 5)
|
163 |
{
|
164 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
'post_type' => array_merge(array_keys(wc_get_product_types()), array('product')),
|
166 |
'posts_per_page' => $posts,
|
167 |
'post_status' => 'publish',
|
168 |
-
'
|
169 |
'orderby' => 'ID',
|
170 |
'order' => 'ASC',
|
171 |
-
)
|
172 |
|
173 |
-
|
174 |
|
|
|
175 |
sleep(2);
|
176 |
-
|
177 |
-
$products = get_posts(array(
|
178 |
-
'post_type' => array_merge(array_keys(wc_get_product_types()), array('product')),
|
179 |
-
'posts_per_page' => $posts,
|
180 |
-
'post_status' => 'publish',
|
181 |
-
'paged' => $page,
|
182 |
-
'orderby' => 'ID',
|
183 |
-
'order' => 'ASC',
|
184 |
-
));
|
185 |
-
|
186 |
if (empty($products)) {
|
187 |
return false;
|
188 |
}
|
63 |
$product->setPublishedAtForeign(mailchimp_date_utc($post->post_date));
|
64 |
$product->setTitle($woo->get_title());
|
65 |
$product->setUrl($woo->get_permalink());
|
66 |
+
|
67 |
+
$original_vendor = '';
|
68 |
+
if (in_array('woocommerce-product-vendors/woocommerce-product-vendors.php', apply_filters('active_plugins', get_option('active_plugins'))) || defined('WC_PRODUCT_VENDORS_VERSION') ){
|
69 |
+
$vendor_id = WC_Product_Vendors_Utils::get_vendor_id_from_product($woo->get_id() );
|
70 |
+
$vendor_data = WC_Product_Vendors_Utils::get_vendor_data_by_id( $vendor_id );
|
71 |
+
$original_vendor = $vendor_data['name'];
|
72 |
+
}
|
73 |
+
$vendor_filter = apply_filters('mailchimp_sync_product_vendor', $original_vendor, $product);
|
74 |
+
if ($original_vendor != '' && is_string($vendor_filter)) {
|
75 |
+
$product->setVendor($vendor_filter);
|
76 |
+
} else if ($original_vendor != '' && is_string($original_vendor)) {
|
77 |
+
$product->setVendor($original_vendor);
|
78 |
+
}
|
79 |
|
80 |
foreach ($variants as $variant) {
|
81 |
|
174 |
*/
|
175 |
public function getProductPosts($page = 1, $posts = 5)
|
176 |
{
|
177 |
+
$offset = 0;
|
178 |
+
|
179 |
+
if ($page > 1) {
|
180 |
+
$offset = (($page-1) * $posts);
|
181 |
+
}
|
182 |
+
|
183 |
+
$params = array(
|
184 |
'post_type' => array_merge(array_keys(wc_get_product_types()), array('product')),
|
185 |
'posts_per_page' => $posts,
|
186 |
'post_status' => 'publish',
|
187 |
+
'offset' => $offset,
|
188 |
'orderby' => 'ID',
|
189 |
'order' => 'ASC',
|
190 |
+
);
|
191 |
|
192 |
+
$products = get_posts($params);
|
193 |
|
194 |
+
if (empty($products)) {
|
195 |
sleep(2);
|
196 |
+
$products = get_posts($params);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
if (empty($products)) {
|
198 |
return false;
|
199 |
}
|
includes/class-mailchimp-woocommerce-deactivation-survey.php
CHANGED
@@ -176,10 +176,10 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
|
|
176 |
$form.submit(function(event) {
|
177 |
event.preventDefault();
|
178 |
if (! $form.find('input[type=radio]:checked').val()) {
|
179 |
-
$form.find('.mailchimp-woocommerce-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', '
|
180 |
return;
|
181 |
}
|
182 |
-
$form.find('.mailchimp-woocommerce-deactivate-survey-submit').html('<?php echo esc_js( __( 'Sending Feedback', '
|
183 |
var submitSurvey = $.ajax(
|
184 |
{
|
185 |
url: "<?php echo $this->endpoint; ?>",
|
@@ -324,41 +324,41 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
|
|
324 |
|
325 |
$options = array(
|
326 |
1 => array(
|
327 |
-
'title' => esc_html__( 'I want to change the audience associated with this integration.', '
|
328 |
'reason' => 'I want to change the audience associated with this integration.'
|
329 |
),
|
330 |
2 => array(
|
331 |
-
'title' => esc_html__( 'I want to change the site or store connected through this integration.', '
|
332 |
'reason' => 'I want to change the site or store connected through this integration.'
|
333 |
),
|
334 |
3 => array(
|
335 |
-
'title' => esc_html__( 'The order data isn\'t syncing.', '
|
336 |
'reason' => 'The order data isn\'t syncing.'
|
337 |
),
|
338 |
4 => array(
|
339 |
-
'title' => esc_html__( 'The promo codes aren\'t showing up.', '
|
340 |
'reason' => 'The promo codes aren\'t showing up.'
|
341 |
),
|
342 |
5 => array(
|
343 |
-
'title' => esc_html__( 'I\'m trying to troubleshoot the integration.', '
|
344 |
'reason' => 'I\'m trying to troubleshoot the integration.'
|
345 |
),
|
346 |
6 => array(
|
347 |
-
'title' => esc_html__( 'I was instructed to disconnect by Mailchimp Support.', '
|
348 |
'reason' => 'I was instructed to disconnect by Mailchimp Support.'
|
349 |
),
|
350 |
7 => array(
|
351 |
-
'title' => esc_html__( 'I no longer use this integration.', '
|
352 |
'reason' => 'I no longer use this integration.'
|
353 |
),
|
354 |
8 => array(
|
355 |
-
'title' => esc_html__( 'It\'s a temporary deactivation.', '
|
356 |
'reason' => 'It\'s a temporary deactivation.'
|
357 |
),
|
358 |
9 => array(
|
359 |
-
'title' => esc_html__( 'Other', '
|
360 |
'reason' => 'Other',
|
361 |
-
'details' => esc_html__( 'Please share the reason', '
|
362 |
),
|
363 |
);
|
364 |
?>
|
@@ -367,16 +367,16 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
|
|
367 |
<form class="mailchimp-woocommerce-deactivate-survey" method="post">
|
368 |
<span class="mailchimp-woocommerce-deactivate-survey-header">
|
369 |
<span class="dashicons dashicons-testimonial"></span>
|
370 |
-
<?php echo ' ' . esc_html__( 'Quick Feedback', '
|
371 |
-
<span title="<?php esc_attr_e( 'Close', '
|
372 |
</span>
|
373 |
|
374 |
<span class="mailchimp-woocommerce-deactivate-survey-desc">
|
375 |
<?php
|
376 |
printf(
|
377 |
/* translators: %s - plugin name. */
|
378 |
-
esc_html__( 'If you have a moment, please share why you are deactivating %s:', '
|
379 |
-
esc_html__( 'Mailchimp for Woocommerce', '
|
380 |
);
|
381 |
?>
|
382 |
</span>
|
@@ -395,8 +395,8 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Deactivation_Survey', false ) ) {
|
|
395 |
<?php endforeach; ?>
|
396 |
</div>
|
397 |
<div class="mailchimp-woocommerce-deactivate-survey-footer">
|
398 |
-
<button type="submit" class="mailchimp-woocommerce-deactivate-survey-submit button button-primary button-large"><?php echo esc_html__( 'Submit & Deactivate', '
|
399 |
-
<a href="#" class="mailchimp-woocommerce-deactivate-survey-deactivate"><?php echo esc_html__( 'Skip & Deactivate', '
|
400 |
</div>
|
401 |
</form>
|
402 |
</div>
|
176 |
$form.submit(function(event) {
|
177 |
event.preventDefault();
|
178 |
if (! $form.find('input[type=radio]:checked').val()) {
|
179 |
+
$form.find('.mailchimp-woocommerce-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'mailchimp-for-woocommerce' ) ); ?></span>');
|
180 |
return;
|
181 |
}
|
182 |
+
$form.find('.mailchimp-woocommerce-deactivate-survey-submit').html('<?php echo esc_js( __( 'Sending Feedback', 'mailchimp-for-woocommerce' ) ); ?>').attr("disabled", true).removeClass('button-primary');
|
183 |
var submitSurvey = $.ajax(
|
184 |
{
|
185 |
url: "<?php echo $this->endpoint; ?>",
|
324 |
|
325 |
$options = array(
|
326 |
1 => array(
|
327 |
+
'title' => esc_html__( 'I want to change the audience associated with this integration.', 'mailchimp-for-woocommerce' ),
|
328 |
'reason' => 'I want to change the audience associated with this integration.'
|
329 |
),
|
330 |
2 => array(
|
331 |
+
'title' => esc_html__( 'I want to change the site or store connected through this integration.', 'mailchimp-for-woocommerce' ),
|
332 |
'reason' => 'I want to change the site or store connected through this integration.'
|
333 |
),
|
334 |
3 => array(
|
335 |
+
'title' => esc_html__( 'The order data isn\'t syncing.', 'mailchimp-for-woocommerce' ),
|
336 |
'reason' => 'The order data isn\'t syncing.'
|
337 |
),
|
338 |
4 => array(
|
339 |
+
'title' => esc_html__( 'The promo codes aren\'t showing up.', 'mailchimp-for-woocommerce' ),
|
340 |
'reason' => 'The promo codes aren\'t showing up.'
|
341 |
),
|
342 |
5 => array(
|
343 |
+
'title' => esc_html__( 'I\'m trying to troubleshoot the integration.', 'mailchimp-for-woocommerce' ),
|
344 |
'reason' => 'I\'m trying to troubleshoot the integration.'
|
345 |
),
|
346 |
6 => array(
|
347 |
+
'title' => esc_html__( 'I was instructed to disconnect by Mailchimp Support.', 'mailchimp-for-woocommerce' ),
|
348 |
'reason' => 'I was instructed to disconnect by Mailchimp Support.'
|
349 |
),
|
350 |
7 => array(
|
351 |
+
'title' => esc_html__( 'I no longer use this integration.', 'mailchimp-for-woocommerce' ),
|
352 |
'reason' => 'I no longer use this integration.'
|
353 |
),
|
354 |
8 => array(
|
355 |
+
'title' => esc_html__( 'It\'s a temporary deactivation.', 'mailchimp-for-woocommerce' ),
|
356 |
'reason' => 'It\'s a temporary deactivation.'
|
357 |
),
|
358 |
9 => array(
|
359 |
+
'title' => esc_html__( 'Other', 'mailchimp-for-woocommerce' ),
|
360 |
'reason' => 'Other',
|
361 |
+
'details' => esc_html__( 'Please share the reason', 'mailchimp-for-woocommerce' ),
|
362 |
),
|
363 |
);
|
364 |
?>
|
367 |
<form class="mailchimp-woocommerce-deactivate-survey" method="post">
|
368 |
<span class="mailchimp-woocommerce-deactivate-survey-header">
|
369 |
<span class="dashicons dashicons-testimonial"></span>
|
370 |
+
<?php echo ' ' . esc_html__( 'Quick Feedback', 'mailchimp-for-woocommerce' ); ?>
|
371 |
+
<span title="<?php esc_attr_e( 'Close', 'mailchimp-for-woocommerce' );?> " class="mailchimp-woocommerce-deactivate-survey-close">✕</span>
|
372 |
</span>
|
373 |
|
374 |
<span class="mailchimp-woocommerce-deactivate-survey-desc">
|
375 |
<?php
|
376 |
printf(
|
377 |
/* translators: %s - plugin name. */
|
378 |
+
esc_html__( 'If you have a moment, please share why you are deactivating %s:', 'mailchimp-for-woocommerce' ),
|
379 |
+
esc_html__( 'Mailchimp for Woocommerce', 'mailchimp-for-woocommerce')
|
380 |
);
|
381 |
?>
|
382 |
</span>
|
395 |
<?php endforeach; ?>
|
396 |
</div>
|
397 |
<div class="mailchimp-woocommerce-deactivate-survey-footer">
|
398 |
+
<button type="submit" class="mailchimp-woocommerce-deactivate-survey-submit button button-primary button-large"><?php echo esc_html__( 'Submit & Deactivate', 'mailchimp-for-woocommerce' ); ?></button>
|
399 |
+
<a href="#" class="mailchimp-woocommerce-deactivate-survey-deactivate"><?php echo esc_html__( 'Skip & Deactivate', 'mailchimp-for-woocommerce' ); ?></a>
|
400 |
</div>
|
401 |
</form>
|
402 |
</div>
|
includes/class-mailchimp-woocommerce-i18n.php
CHANGED
@@ -35,7 +35,7 @@ class MailChimp_WooCommerce_i18n {
|
|
35 |
public function load_plugin_textdomain() {
|
36 |
|
37 |
load_plugin_textdomain(
|
38 |
-
'
|
39 |
false,
|
40 |
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
|
41 |
);
|
35 |
public function load_plugin_textdomain() {
|
36 |
|
37 |
load_plugin_textdomain(
|
38 |
+
'mailchimp-for-woocommerce',
|
39 |
false,
|
40 |
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
|
41 |
);
|
includes/class-mailchimp-woocommerce-newsletter.php
CHANGED
@@ -40,7 +40,7 @@ class MailChimp_Newsletter extends MailChimp_WooCommerce_Options
|
|
40 |
}
|
41 |
|
42 |
// allow the user to specify the text in the newsletter label.
|
43 |
-
$label = $this->getOption('newsletter_label', __('Subscribe to our newsletter', '
|
44 |
|
45 |
// if the user chose 'check' or nothing at all, we default to true.
|
46 |
$default_checked = $default_setting === 'check';
|
40 |
}
|
41 |
|
42 |
// allow the user to specify the text in the newsletter label.
|
43 |
+
$label = $this->getOption('newsletter_label', __('Subscribe to our newsletter', 'mailchimp-for-woocommerce'));
|
44 |
|
45 |
// if the user chose 'check' or nothing at all, we default to true.
|
46 |
$default_checked = $default_setting === 'check';
|
includes/class-mailchimp-woocommerce-options.php
CHANGED
@@ -25,7 +25,7 @@ abstract class MailChimp_WooCommerce_Options
|
|
25 |
*/
|
26 |
public function adminReady()
|
27 |
{
|
28 |
-
$this->is_admin = current_user_can(
|
29 |
if (get_option('mailchimp_woocommerce_plugin_do_activation_redirect', false)) {
|
30 |
delete_option('mailchimp_woocommerce_plugin_do_activation_redirect');
|
31 |
|
25 |
*/
|
26 |
public function adminReady()
|
27 |
{
|
28 |
+
$this->is_admin = current_user_can(mailchimp_get_allowed_capability());
|
29 |
if (get_option('mailchimp_woocommerce_plugin_do_activation_redirect', false)) {
|
30 |
delete_option('mailchimp_woocommerce_plugin_do_activation_redirect');
|
31 |
|
includes/class-mailchimp-woocommerce-privacy.php
CHANGED
@@ -9,7 +9,7 @@ class MailChimp_WooCommerce_Privacy
|
|
9 |
{
|
10 |
if (function_exists( 'wp_add_privacy_policy_content')) {
|
11 |
$content = sprintf(/* translators: %s - Mailchimp Privacy Policy URL. */
|
12 |
-
__( 'When shopping, we keep a record of your email and the cart contents for up to 30 days on our server. This record is kept to repopulate the contents of your cart if you switch devices or needed to come back another day. Read our privacy policy <a href="%s">here</a>.', '
|
13 |
'https://mailchimp.com/legal/privacy/'
|
14 |
|
15 |
);
|
@@ -75,11 +75,11 @@ class MailChimp_WooCommerce_Privacy
|
|
75 |
'data' => array(
|
76 |
array(
|
77 |
'group_id' => 'mailchimp_cart',
|
78 |
-
'group_label' => __( 'MailChimp Shopping Cart Data', '
|
79 |
'item_id' => 'mailing-shopping-cart-1',
|
80 |
'data' => array(
|
81 |
array(
|
82 |
-
'name' => __( 'User ID', '
|
83 |
'value' => $uid,
|
84 |
),
|
85 |
$data, // this is already an associative array with name and value keys
|
9 |
{
|
10 |
if (function_exists( 'wp_add_privacy_policy_content')) {
|
11 |
$content = sprintf(/* translators: %s - Mailchimp Privacy Policy URL. */
|
12 |
+
__( 'When shopping, we keep a record of your email and the cart contents for up to 30 days on our server. This record is kept to repopulate the contents of your cart if you switch devices or needed to come back another day. Read our privacy policy <a href="%s">here</a>.', 'mailchimp-for-woocommerce' ),
|
13 |
'https://mailchimp.com/legal/privacy/'
|
14 |
|
15 |
);
|
75 |
'data' => array(
|
76 |
array(
|
77 |
'group_id' => 'mailchimp_cart',
|
78 |
+
'group_label' => __( 'MailChimp Shopping Cart Data', 'mailchimp-for-woocommerce' ),
|
79 |
'item_id' => 'mailing-shopping-cart-1',
|
80 |
'data' => array(
|
81 |
array(
|
82 |
+
'name' => __( 'User ID', 'mailchimp-for-woocommerce' ),
|
83 |
'value' => $uid,
|
84 |
),
|
85 |
$data, // this is already an associative array with name and value keys
|
includes/class-mailchimp-woocommerce-rest-api.php
CHANGED
@@ -59,7 +59,7 @@ class MailChimp_WooCommerce_Rest_Api
|
|
59 |
*/
|
60 |
protected function register_sync_stats()
|
61 |
{
|
62 |
-
if (
|
63 |
register_rest_route(static::$namespace, '/sync/stats', array(
|
64 |
'methods' => 'GET',
|
65 |
'callback' => array($this, 'get_sync_stats'),
|
@@ -138,7 +138,7 @@ class MailChimp_WooCommerce_Rest_Api
|
|
138 |
'promo_rules_page' => get_option('mailchimp-woocommerce-sync.coupons.current_page'),
|
139 |
'products_page' => get_option('mailchimp-woocommerce-sync.products.current_page'),
|
140 |
'orders_page' => get_option('mailchimp-woocommerce-sync.orders.current_page'),
|
141 |
-
'date' => $date->format( __('D, M j, Y g:i A', '
|
142 |
'has_started' => mailchimp_has_started_syncing(),
|
143 |
'has_finished' => mailchimp_is_done_syncing(),
|
144 |
));
|
59 |
*/
|
60 |
protected function register_sync_stats()
|
61 |
{
|
62 |
+
if (mailchimp_get_allowed_capability()) {
|
63 |
register_rest_route(static::$namespace, '/sync/stats', array(
|
64 |
'methods' => 'GET',
|
65 |
'callback' => array($this, 'get_sync_stats'),
|
138 |
'promo_rules_page' => get_option('mailchimp-woocommerce-sync.coupons.current_page'),
|
139 |
'products_page' => get_option('mailchimp-woocommerce-sync.products.current_page'),
|
140 |
'orders_page' => get_option('mailchimp-woocommerce-sync.orders.current_page'),
|
141 |
+
'date' => $date->format( __('D, M j, Y g:i A', 'mailchimp-for-woocommerce')),
|
142 |
'has_started' => mailchimp_has_started_syncing(),
|
143 |
'has_finished' => mailchimp_is_done_syncing(),
|
144 |
));
|
includes/class-mailchimp-woocommerce-service.php
CHANGED
@@ -341,7 +341,7 @@ class MailChimp_Service extends MailChimp_WooCommerce_Options
|
|
341 |
update_user_meta($user_id, 'mailchimp_woocommerce_is_subscribed', $subscribed);
|
342 |
|
343 |
if ($subscribed) {
|
344 |
-
mailchimp_handle_or_queue(new MailChimp_WooCommerce_User_Submit($user_id, $subscribed));
|
345 |
}
|
346 |
}
|
347 |
|
@@ -360,7 +360,7 @@ class MailChimp_Service extends MailChimp_WooCommerce_Options
|
|
360 |
if ($is_subscribed === '' || $is_subscribed === null) return;
|
361 |
|
362 |
// only send this update if the user actually has a boolean value.
|
363 |
-
mailchimp_handle_or_queue(new MailChimp_WooCommerce_User_Submit($user_id, (bool) $is_subscribed, $old_user_data));
|
364 |
}
|
365 |
|
366 |
/**
|
@@ -803,8 +803,16 @@ class MailChimp_Service extends MailChimp_WooCommerce_Options
|
|
803 |
exit;
|
804 |
}
|
805 |
|
806 |
-
|
|
|
|
|
|
|
|
|
807 |
try {
|
|
|
|
|
|
|
|
|
808 |
// get job row from db
|
809 |
global $wpdb;
|
810 |
$sql = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mailchimp_jobs WHERE obj_id = %s", $obj_id );
|
@@ -818,19 +826,19 @@ class MailChimp_Service extends MailChimp_WooCommerce_Options
|
|
818 |
$job = unserialize($job_row->job);
|
819 |
|
820 |
$job_id =$job_row->id;
|
821 |
-
|
822 |
// process job
|
823 |
//mailchimp_debug('action_scheduler.process_job', get_class($job) . ' :: obj_id '.$job->id);
|
824 |
$job->handle();
|
825 |
-
|
826 |
// delete processed job
|
827 |
$sql = $wpdb->prepare("DELETE FROM {$wpdb->prefix}mailchimp_jobs WHERE id = %s AND obj_id = %s", array($job_id, $obj_id));
|
828 |
$wpdb->query($sql);
|
829 |
|
830 |
} catch (\Exception $e) {
|
831 |
-
|
|
|
832 |
}
|
833 |
return true;
|
834 |
}
|
835 |
-
|
836 |
}
|
341 |
update_user_meta($user_id, 'mailchimp_woocommerce_is_subscribed', $subscribed);
|
342 |
|
343 |
if ($subscribed) {
|
344 |
+
mailchimp_handle_or_queue(new MailChimp_WooCommerce_User_Submit($user_id, $subscribed, null, substr( get_locale(), 0, 2 )));
|
345 |
}
|
346 |
}
|
347 |
|
360 |
if ($is_subscribed === '' || $is_subscribed === null) return;
|
361 |
|
362 |
// only send this update if the user actually has a boolean value.
|
363 |
+
mailchimp_handle_or_queue(new MailChimp_WooCommerce_User_Submit($user_id, (bool) $is_subscribed, $old_user_data, substr( get_locale(), 0, 2 )));
|
364 |
}
|
365 |
|
366 |
/**
|
803 |
exit;
|
804 |
}
|
805 |
|
806 |
+
/**
|
807 |
+
* @param null $obj_id
|
808 |
+
* @return bool
|
809 |
+
*/
|
810 |
+
public function mailchimp_process_single_job($obj_id = null) {
|
811 |
try {
|
812 |
+
// not sure why this is happening - but we need to prepare for it and return false when it does.
|
813 |
+
if (empty($obj_id)) {
|
814 |
+
return false;
|
815 |
+
}
|
816 |
// get job row from db
|
817 |
global $wpdb;
|
818 |
$sql = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mailchimp_jobs WHERE obj_id = %s", $obj_id );
|
826 |
$job = unserialize($job_row->job);
|
827 |
|
828 |
$job_id =$job_row->id;
|
829 |
+
|
830 |
// process job
|
831 |
//mailchimp_debug('action_scheduler.process_job', get_class($job) . ' :: obj_id '.$job->id);
|
832 |
$job->handle();
|
833 |
+
|
834 |
// delete processed job
|
835 |
$sql = $wpdb->prepare("DELETE FROM {$wpdb->prefix}mailchimp_jobs WHERE id = %s AND obj_id = %s", array($job_id, $obj_id));
|
836 |
$wpdb->query($sql);
|
837 |
|
838 |
} catch (\Exception $e) {
|
839 |
+
$message = !empty($e->getMessage()) ? ' - ' . $e->getMessage() :'';
|
840 |
+
mailchimp_debug('action_scheduler.process_job.fail', get_class($job) . ' :: obj_id '.$obj_id . ' :: ' .get_class($e) . $message);
|
841 |
}
|
842 |
return true;
|
843 |
}
|
|
|
844 |
}
|
includes/class-mailchimp-woocommerce.php
CHANGED
@@ -251,6 +251,19 @@ class MailChimp_WooCommerce
|
|
251 |
// Mailchimp oAuth
|
252 |
$this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_oauth_start', $plugin_admin, 'mailchimp_woocommerce_ajax_oauth_start' );
|
253 |
$this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_oauth_finish', $plugin_admin, 'mailchimp_woocommerce_ajax_oauth_finish' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
}
|
255 |
|
256 |
/**
|
251 |
// Mailchimp oAuth
|
252 |
$this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_oauth_start', $plugin_admin, 'mailchimp_woocommerce_ajax_oauth_start' );
|
253 |
$this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_oauth_finish', $plugin_admin, 'mailchimp_woocommerce_ajax_oauth_finish' );
|
254 |
+
|
255 |
+
// Create new mailchimp Account methods
|
256 |
+
$this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_create_account_check_username', $plugin_admin, 'mailchimp_woocommerce_ajax_create_account_check_username' );
|
257 |
+
$this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_create_account_signup', $plugin_admin, 'mailchimp_woocommerce_ajax_create_account_signup' );
|
258 |
+
|
259 |
+
// add Shop Manager capability to save options
|
260 |
+
$this->loader->add_action('option_page_capability_mailchimp-woocommerce', $plugin_admin, 'mailchimp_woocommerce_option_page_capability');
|
261 |
+
|
262 |
+
// remove initial sync "leave a review" banner on notice dismiss
|
263 |
+
$this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_remove_review_banner', $plugin_admin, 'mailchimp_woocommerce_remove_review_banner' );
|
264 |
+
|
265 |
+
// set communications box status
|
266 |
+
$this->loader->add_action( 'wp_ajax_mailchimp_woocommerce_communication_status', $plugin_admin, 'mailchimp_woocommerce_communication_status' );
|
267 |
}
|
268 |
|
269 |
/**
|
includes/processes/class-mailchimp-woocommerce-abstract-sync.php
CHANGED
@@ -190,6 +190,10 @@ abstract class MailChimp_WooCommerce_Abstract_Sync extends Mailchimp_Woocommerce
|
|
190 |
$this->setData('sync.syncing', true);
|
191 |
$this->setData('sync.started_at', time());
|
192 |
|
|
|
|
|
|
|
|
|
193 |
global $wpdb;
|
194 |
try {
|
195 |
$wpdb->show_errors(false);
|
190 |
$this->setData('sync.syncing', true);
|
191 |
$this->setData('sync.started_at', time());
|
192 |
|
193 |
+
if (! $this->getData('sync.completed_at')) {
|
194 |
+
$this->setData('sync.initial_sync', 1);
|
195 |
+
} else $this->removeData('sync.initial_sync');
|
196 |
+
|
197 |
global $wpdb;
|
198 |
try {
|
199 |
$wpdb->show_errors(false);
|
includes/processes/class-mailchimp-woocommerce-cart-update.php
CHANGED
@@ -173,8 +173,8 @@ class MailChimp_WooCommerce_Cart_Update extends Mailchimp_Woocommerce_Job
|
|
173 |
|
174 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
175 |
sleep(3);
|
176 |
-
$this->release();
|
177 |
mailchimp_error('cart.error', mailchimp_error_trace($e, "RateLimited :: email {$this->email}"));
|
|
|
178 |
} catch (\Exception $e) {
|
179 |
update_option('mailchimp-woocommerce-cart-error', $e->getMessage());
|
180 |
mailchimp_error('abandoned_cart.error', $e);
|
173 |
|
174 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
175 |
sleep(3);
|
|
|
176 |
mailchimp_error('cart.error', mailchimp_error_trace($e, "RateLimited :: email {$this->email}"));
|
177 |
+
$this->retry();
|
178 |
} catch (\Exception $e) {
|
179 |
update_option('mailchimp-woocommerce-cart-error', $e->getMessage());
|
180 |
mailchimp_error('abandoned_cart.error', $e);
|
includes/processes/class-mailchimp-woocommerce-job.php
CHANGED
@@ -4,6 +4,7 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Job' ) ) {
|
|
4 |
abstract class Mailchimp_Woocommerce_Job {
|
5 |
|
6 |
public $should_kill_queue_listener = false;
|
|
|
7 |
|
8 |
/**
|
9 |
* @var stdClass
|
@@ -19,6 +20,30 @@ if ( ! class_exists( 'Mailchimp_Woocommerce_Job' ) ) {
|
|
19 |
$this->job = $job;
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* Handle the job.
|
24 |
*/
|
4 |
abstract class Mailchimp_Woocommerce_Job {
|
5 |
|
6 |
public $should_kill_queue_listener = false;
|
7 |
+
private $attempts = 0;
|
8 |
|
9 |
/**
|
10 |
* @var stdClass
|
20 |
$this->job = $job;
|
21 |
}
|
22 |
|
23 |
+
/**
|
24 |
+
* Set attempts
|
25 |
+
*/
|
26 |
+
public function set_attempts( $attempts ) {
|
27 |
+
$this->attempts = $attempts;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Get attempts
|
32 |
+
*/
|
33 |
+
public function get_attempts( ) {
|
34 |
+
return $this->attempts;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Reschedule action 4 times
|
39 |
+
*/
|
40 |
+
public function retry( $delay = 30 ) {
|
41 |
+
$job = $this;
|
42 |
+
if (null == $job->attempts) $job->set_attempts(0);
|
43 |
+
$job->set_attempts($job->get_attempts() + 1);
|
44 |
+
mailchimp_as_push($job, $delay);
|
45 |
+
}
|
46 |
+
|
47 |
/**
|
48 |
* Handle the job.
|
49 |
*/
|
includes/processes/class-mailchimp-woocommerce-process-coupons.php
CHANGED
@@ -39,6 +39,9 @@ class MailChimp_WooCommerce_Process_Coupons extends MailChimp_WooCommerce_Abstra
|
|
39 |
$response = $this->mailchimp()->addPromoCodeForRule($this->store_id, $item->getAttachedPromoRule(), $item, true);
|
40 |
mailchimp_log('coupon_sync.success', "update promo rule :: #{$item->getCode()}");
|
41 |
return $response;
|
|
|
|
|
|
|
42 |
} catch (MailChimp_WooCommerce_ServerError $e) {
|
43 |
mailchimp_error('coupons.error', mailchimp_error_trace($e, "update promo rule :: {$item->getCode()}"));
|
44 |
return false;
|
39 |
$response = $this->mailchimp()->addPromoCodeForRule($this->store_id, $item->getAttachedPromoRule(), $item, true);
|
40 |
mailchimp_log('coupon_sync.success', "update promo rule :: #{$item->getCode()}");
|
41 |
return $response;
|
42 |
+
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
43 |
+
mailchimp_error('coupons.error', mailchimp_error_trace($e, "update promo rule :: {$item->getCode()}"));
|
44 |
+
throw $e;
|
45 |
} catch (MailChimp_WooCommerce_ServerError $e) {
|
46 |
mailchimp_error('coupons.error', mailchimp_error_trace($e, "update promo rule :: {$item->getCode()}"));
|
47 |
return false;
|
includes/processes/class-mailchimp-woocommerce-process-orders.php
CHANGED
@@ -41,6 +41,9 @@ class MailChimp_WooCommerce_Process_Orders extends MailChimp_WooCommerce_Abstrac
|
|
41 |
return false;
|
42 |
}
|
43 |
|
|
|
|
|
|
|
44 |
// since we're syncing the customer for the first time, this is where we need to add the override
|
45 |
// for subscriber status. We don't get the checkbox until this plugin is actually installed and working!
|
46 |
if (!($status = $item->getCustomer()->getOptInStatus())) {
|
@@ -48,23 +51,37 @@ class MailChimp_WooCommerce_Process_Orders extends MailChimp_WooCommerce_Abstrac
|
|
48 |
$subscriber = $this->mailchimp()->member(mailchimp_get_list_id(), $item->getCustomer()->getEmailAddress());
|
49 |
$status = !in_array($subscriber['status'], array('unsubscribed', 'transactional'));
|
50 |
} catch (\Exception $e) {
|
51 |
-
$
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
$item->getCustomer()->setOptInStatus($status);
|
54 |
}
|
55 |
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
-
$type = $this->mailchimp()->getStoreOrder($this->store_id, $item->getId()) ? 'update' : 'create';
|
59 |
$call = $type === 'create' ? 'addStoreOrder' : 'updateStoreOrder';
|
60 |
|
61 |
try {
|
62 |
|
63 |
// if the order is in failed or cancelled status - and it's brand new, we shouldn't submit it.
|
64 |
-
if ($call === 'addStoreOrder' && in_array($item->getFinancialStatus(), array('
|
|
|
65 |
return false;
|
66 |
}
|
67 |
|
|
|
|
|
68 |
try {
|
69 |
// make the call
|
70 |
$response = $this->mailchimp()->$call($this->store_id, $item, false);
|
@@ -90,8 +107,15 @@ class MailChimp_WooCommerce_Process_Orders extends MailChimp_WooCommerce_Abstrac
|
|
90 |
|
91 |
$this->items[] = array('response' => $response, 'item' => $item);
|
92 |
|
93 |
-
|
|
|
|
|
|
|
94 |
|
|
|
|
|
|
|
|
|
95 |
} catch (MailChimp_WooCommerce_ServerError $e) {
|
96 |
mailchimp_error('order_submit.error', mailchimp_error_trace($e, "$call :: {$item->getId()}"));
|
97 |
return false;
|
41 |
return false;
|
42 |
}
|
43 |
|
44 |
+
// see if this store has the auto subscribe setting enabled on initial sync
|
45 |
+
$should_auto_subscribe = (bool) $this->getOption('mailchimp_auto_subscribe', true);
|
46 |
+
|
47 |
// since we're syncing the customer for the first time, this is where we need to add the override
|
48 |
// for subscriber status. We don't get the checkbox until this plugin is actually installed and working!
|
49 |
if (!($status = $item->getCustomer()->getOptInStatus())) {
|
51 |
$subscriber = $this->mailchimp()->member(mailchimp_get_list_id(), $item->getCustomer()->getEmailAddress());
|
52 |
$status = !in_array($subscriber['status'], array('unsubscribed', 'transactional'));
|
53 |
} catch (\Exception $e) {
|
54 |
+
if ($e instanceof MailChimp_WooCommerce_RateLimitError) {
|
55 |
+
mailchimp_error('order_sync.error', mailchimp_error_trace($e, "GET subscriber :: {$item->getId()}"));
|
56 |
+
throw $e;
|
57 |
+
}
|
58 |
+
$status = $should_auto_subscribe;
|
59 |
}
|
60 |
$item->getCustomer()->setOptInStatus($status);
|
61 |
}
|
62 |
|
63 |
+
try {
|
64 |
+
$type = $this->mailchimp()->getStoreOrder($this->store_id, $item->getId(), true) ? 'update' : 'create';
|
65 |
+
} catch (MailChimp_WooCommerce_Error $e) {
|
66 |
+
if ($e instanceof MailChimp_WooCommerce_RateLimitError) {
|
67 |
+
mailchimp_error('order_sync.error', mailchimp_error_trace($e, "GET order :: {$item->getId()}"));
|
68 |
+
throw $e;
|
69 |
+
}
|
70 |
+
$type = 'create';
|
71 |
+
}
|
72 |
|
|
|
73 |
$call = $type === 'create' ? 'addStoreOrder' : 'updateStoreOrder';
|
74 |
|
75 |
try {
|
76 |
|
77 |
// if the order is in failed or cancelled status - and it's brand new, we shouldn't submit it.
|
78 |
+
if ($call === 'addStoreOrder' && !in_array(strtolower($item->getFinancialStatus()), array('processing', 'completed', 'paid'))) {
|
79 |
+
mailchimp_log('order_sync', "#{$item->getId()} has a financial status of {$item->getFinancialStatus()} and was skipped.");
|
80 |
return false;
|
81 |
}
|
82 |
|
83 |
+
mailchimp_debug('order_sync', "#{$item->getId()}", $item->toArray());
|
84 |
+
|
85 |
try {
|
86 |
// make the call
|
87 |
$response = $this->mailchimp()->$call($this->store_id, $item, false);
|
107 |
|
108 |
$this->items[] = array('response' => $response, 'item' => $item);
|
109 |
|
110 |
+
// update the list member if they've got double opt in enabled, and this is a new order.
|
111 |
+
if ($type === 'create') {
|
112 |
+
mailchimp_update_member_with_double_opt_in($item, ($should_auto_subscribe || $status));
|
113 |
+
}
|
114 |
|
115 |
+
return $response;
|
116 |
+
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
117 |
+
mailchimp_error('order_submit.error', mailchimp_error_trace($e, "$call :: {$item->getId()}"));
|
118 |
+
throw $e;
|
119 |
} catch (MailChimp_WooCommerce_ServerError $e) {
|
120 |
mailchimp_error('order_submit.error', mailchimp_error_trace($e, "$call :: {$item->getId()}"));
|
121 |
return false;
|
includes/processes/class-mailchimp-woocommerce-process-products.php
CHANGED
@@ -15,7 +15,6 @@ class MailChimp_WooCommerce_Process_Products extends MailChimp_WooCommerce_Abstr
|
|
15 |
*/
|
16 |
protected $action = 'mailchimp_woocommerce_process_products';
|
17 |
|
18 |
-
|
19 |
public static function push()
|
20 |
{
|
21 |
$job = new MailChimp_WooCommerce_Process_Products();
|
@@ -34,8 +33,8 @@ class MailChimp_WooCommerce_Process_Products extends MailChimp_WooCommerce_Abstr
|
|
34 |
|
35 |
/**
|
36 |
* @param MailChimp_WooCommerce_Product $item
|
37 |
-
*
|
38 |
-
* @
|
39 |
*/
|
40 |
protected function iterate($item) {
|
41 |
|
@@ -45,8 +44,13 @@ class MailChimp_WooCommerce_Process_Products extends MailChimp_WooCommerce_Abstr
|
|
45 |
|
46 |
try {
|
47 |
// pull the product from Mailchimp first to see what method we need to call next.
|
48 |
-
$mailchimp_product = $this->mailchimp()->getStoreProduct($this->store_id, $item->getId());
|
49 |
} catch (\Exception $e) {
|
|
|
|
|
|
|
|
|
|
|
50 |
$mailchimp_product = false;
|
51 |
}
|
52 |
|
@@ -59,6 +63,9 @@ class MailChimp_WooCommerce_Process_Products extends MailChimp_WooCommerce_Abstr
|
|
59 |
$response = $this->mailchimp()->{$method}($this->store_id, $item, false);
|
60 |
mailchimp_log('product_sync.success', "{$method} :: #{$response->getId()}");
|
61 |
return $response;
|
|
|
|
|
|
|
62 |
} catch (MailChimp_WooCommerce_ServerError $e) {
|
63 |
mailchimp_error('product_sync.error', mailchimp_error_trace($e, "{$method} :: {$item->getId()}"));
|
64 |
} catch (MailChimp_WooCommerce_Error $e) {
|
15 |
*/
|
16 |
protected $action = 'mailchimp_woocommerce_process_products';
|
17 |
|
|
|
18 |
public static function push()
|
19 |
{
|
20 |
$job = new MailChimp_WooCommerce_Process_Products();
|
33 |
|
34 |
/**
|
35 |
* @param MailChimp_WooCommerce_Product $item
|
36 |
+
* @return bool|mixed
|
37 |
+
* @throws MailChimp_WooCommerce_RateLimitError
|
38 |
*/
|
39 |
protected function iterate($item) {
|
40 |
|
44 |
|
45 |
try {
|
46 |
// pull the product from Mailchimp first to see what method we need to call next.
|
47 |
+
$mailchimp_product = $this->mailchimp()->getStoreProduct($this->store_id, $item->getId(), true);
|
48 |
} catch (\Exception $e) {
|
49 |
+
// if we're getting rate limited, we need to throw this error to re-queue things.
|
50 |
+
if ($e instanceof MailChimp_WooCommerce_RateLimitError) {
|
51 |
+
mailchimp_error('product_sync.error', mailchimp_error_trace($e, "GET product :: {$item->getId()}"));
|
52 |
+
throw $e;
|
53 |
+
}
|
54 |
$mailchimp_product = false;
|
55 |
}
|
56 |
|
63 |
$response = $this->mailchimp()->{$method}($this->store_id, $item, false);
|
64 |
mailchimp_log('product_sync.success', "{$method} :: #{$response->getId()}");
|
65 |
return $response;
|
66 |
+
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
67 |
+
mailchimp_error('product_sync.error', mailchimp_error_trace($e, "{$method} :: {$item->getId()}"));
|
68 |
+
throw $e;
|
69 |
} catch (MailChimp_WooCommerce_ServerError $e) {
|
70 |
mailchimp_error('product_sync.error', mailchimp_error_trace($e, "{$method} :: {$item->getId()}"));
|
71 |
} catch (MailChimp_WooCommerce_Error $e) {
|
includes/processes/class-mailchimp-woocommerce-rest-queue.php
DELETED
@@ -1,251 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class MailChimp_WooCommerce_Rest_Queue
|
5 |
-
*/
|
6 |
-
class MailChimp_WooCommerce_Rest_Queue
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* @var WP_Queue
|
10 |
-
*/
|
11 |
-
protected $queue;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* @var WP_Job
|
15 |
-
*/
|
16 |
-
protected $payload;
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Has the worker been dispatched in this request?
|
20 |
-
*
|
21 |
-
* @var bool
|
22 |
-
*/
|
23 |
-
protected $dispatched = false;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Timestamp of when this worker started processing the queue.
|
27 |
-
*
|
28 |
-
* @var int
|
29 |
-
*/
|
30 |
-
protected $start_time;
|
31 |
-
|
32 |
-
protected static $_instance = null;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* @return MailChimp_WooCommerce_Rest_Queue
|
36 |
-
*/
|
37 |
-
public static function instance()
|
38 |
-
{
|
39 |
-
if (!empty(static::$_instance)) return static::$_instance;
|
40 |
-
return static::$_instance = new MailChimp_WooCommerce_Rest_Queue();
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* MailChimp_WooCommerce_Rest_Queue constructor.
|
45 |
-
*/
|
46 |
-
public function __construct()
|
47 |
-
{
|
48 |
-
$this->queue = MailChimp_WooCommerce_Queue::instance();
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* @return bool|int
|
53 |
-
*/
|
54 |
-
public function handle()
|
55 |
-
{
|
56 |
-
// if we have the queue runner disabled, process 1 and exit.
|
57 |
-
if (mailchimp_queue_is_disabled()) {
|
58 |
-
return $this->process_next_job();
|
59 |
-
}
|
60 |
-
|
61 |
-
// Worker already running, die
|
62 |
-
if ($this->is_worker_running()) {
|
63 |
-
mailchimp_debug('rest_queue', 'blocked process because it was already running');
|
64 |
-
return 'worker is running';
|
65 |
-
}
|
66 |
-
|
67 |
-
// Lock worker to prevent multiple instances spawning
|
68 |
-
$this->lock_worker();
|
69 |
-
|
70 |
-
// counter.
|
71 |
-
$jobs_processed = 0;
|
72 |
-
// Loop over jobs while within server limits
|
73 |
-
while (!$this->time_exceeded() && !$this->memory_exceeded()) {
|
74 |
-
if ($this->queue->available_jobs() > 0) {
|
75 |
-
if ($this->process_next_job()) {
|
76 |
-
$jobs_processed++;
|
77 |
-
}
|
78 |
-
continue;
|
79 |
-
}
|
80 |
-
break;
|
81 |
-
}
|
82 |
-
|
83 |
-
// Unlock worker to allow another instance to be spawned
|
84 |
-
$this->unlock_worker();
|
85 |
-
|
86 |
-
// if the queue still has jobs, rinse and repeat.
|
87 |
-
if ($this->queue->available_jobs() > 0) {
|
88 |
-
$this->again();
|
89 |
-
}
|
90 |
-
|
91 |
-
return $jobs_processed;
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Process next job.
|
96 |
-
*
|
97 |
-
* @return bool
|
98 |
-
*/
|
99 |
-
public function process_next_job()
|
100 |
-
{
|
101 |
-
$job = $this->queue->get_next_job();
|
102 |
-
|
103 |
-
if (empty($job)) {
|
104 |
-
return false;
|
105 |
-
}
|
106 |
-
|
107 |
-
$this->payload = unserialize($job->job);
|
108 |
-
$this->queue->lock_job($job);
|
109 |
-
$this->payload->set_job($job);
|
110 |
-
|
111 |
-
try {
|
112 |
-
$this->payload->handle();
|
113 |
-
|
114 |
-
if ($this->payload->is_deleted()) {
|
115 |
-
$this->queue->delete($job);
|
116 |
-
return true;
|
117 |
-
}
|
118 |
-
|
119 |
-
if ($this->payload->is_released()) {
|
120 |
-
$this->queue->release($job, $this->payload->get_delay());
|
121 |
-
}
|
122 |
-
|
123 |
-
if (!$this->payload->is_deleted_or_released()) {
|
124 |
-
$this->queue->delete($job);
|
125 |
-
}
|
126 |
-
|
127 |
-
} catch ( Exception $e ) {
|
128 |
-
mailchimp_log('queue.error', "{$e->getMessage()} on {$e->getLine()} in {$e->getFile()}", array('job' => get_class($this->payload)));
|
129 |
-
$this->queue->release($job);
|
130 |
-
return false;
|
131 |
-
}
|
132 |
-
|
133 |
-
if (defined('WP_CLI') && WP_CLI && property_exists($this->payload, 'should_kill_queue_listener') && $this->payload->should_kill_queue_listener === true) {
|
134 |
-
wp_die('killing queue listener');
|
135 |
-
}
|
136 |
-
|
137 |
-
return true;
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Memory exceeded
|
142 |
-
*
|
143 |
-
* Ensures the worker process never exceeds 80%
|
144 |
-
* of the maximum allowed PHP memory.
|
145 |
-
*
|
146 |
-
* @return bool
|
147 |
-
*/
|
148 |
-
public function memory_exceeded()
|
149 |
-
{
|
150 |
-
$memory_limit = $this->get_memory_limit() * 0.8; // 80% of max memory
|
151 |
-
return apply_filters( 'http_worker_memory_exceeded', memory_get_usage( true) >= $memory_limit);
|
152 |
-
}
|
153 |
-
|
154 |
-
/**
|
155 |
-
* Get memory limit
|
156 |
-
*
|
157 |
-
* @return int
|
158 |
-
*/
|
159 |
-
protected function get_memory_limit()
|
160 |
-
{
|
161 |
-
$memory_limit = function_exists( 'ini_get' ) ? ini_get( 'memory_limit' ) : '128M';
|
162 |
-
if (!$memory_limit || -1 == $memory_limit) {
|
163 |
-
// Unlimited, set to 32GB
|
164 |
-
$memory_limit = '32000M';
|
165 |
-
}
|
166 |
-
|
167 |
-
return (int) preg_replace_callback('/(\-?\d+)(.?)/', function ($m) {
|
168 |
-
if (!isset($m[2]) || $m[2] == '') {
|
169 |
-
$m[1] = '128';
|
170 |
-
$m[2] = 'M';
|
171 |
-
}
|
172 |
-
return $m[1] * pow(1024, strpos('BKMG', $m[2]));
|
173 |
-
}, strtoupper($memory_limit));
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Time exceeded
|
178 |
-
*
|
179 |
-
* Ensures the worker never exceeds a sensible time limit (20s by default).
|
180 |
-
* A timeout limit of 30s is common on shared hosting.
|
181 |
-
*
|
182 |
-
* @return bool
|
183 |
-
*/
|
184 |
-
protected function time_exceeded()
|
185 |
-
{
|
186 |
-
$time_limit = apply_filters('http_worker_default_time_limit', 20);
|
187 |
-
$finish = $this->start_time + $time_limit; // 20 seconds
|
188 |
-
return apply_filters( 'http_worker_time_exceeded', ((time() + 2) >= $finish));
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Is HTTP worker disabled
|
193 |
-
*
|
194 |
-
* @return bool
|
195 |
-
*/
|
196 |
-
public function is_http_worker_disabled()
|
197 |
-
{
|
198 |
-
return defined( 'DISABLE_WP_HTTP_WORKER' ) && DISABLE_WP_HTTP_WORKER === true;
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* Is worker running
|
203 |
-
*
|
204 |
-
* Check if another instance of the HTTP worker is running.
|
205 |
-
*
|
206 |
-
* @return bool
|
207 |
-
*/
|
208 |
-
public function is_worker_running()
|
209 |
-
{
|
210 |
-
return (bool) get_site_transient('http_worker_lock');
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* Lock worker
|
215 |
-
*
|
216 |
-
* Lock the HTTP worker to prevent multiple instances running.
|
217 |
-
*/
|
218 |
-
public function lock_worker()
|
219 |
-
{
|
220 |
-
$this->start_time = time(); // Set start time of current worker
|
221 |
-
set_site_transient('http_worker_lock', microtime(), 60);
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Unlock worker
|
226 |
-
*
|
227 |
-
* Unlock the HTTP worker to allow other instances to be spawned.
|
228 |
-
*/
|
229 |
-
public function unlock_worker()
|
230 |
-
{
|
231 |
-
if (!delete_site_transient('http_worker_lock')) {
|
232 |
-
mailchimp_log('rest-queue', 'http_worker_lock enabled - respawn in 60 seconds.');
|
233 |
-
}
|
234 |
-
}
|
235 |
-
|
236 |
-
/**
|
237 |
-
* @throws MailChimp_WooCommerce_Error
|
238 |
-
* @throws MailChimp_WooCommerce_RateLimitError
|
239 |
-
* @throws MailChimp_WooCommerce_ServerError
|
240 |
-
*/
|
241 |
-
protected function again()
|
242 |
-
{
|
243 |
-
add_filter( 'https_local_ssl_verify', '__return_false', 1 );
|
244 |
-
$url = esc_url_raw(rest_url('mailchimp-for-woocommerce/v1/queue/work'));
|
245 |
-
$params = array(
|
246 |
-
'timeout' => 0.01,
|
247 |
-
'blocking' => false,
|
248 |
-
);
|
249 |
-
mailchimp_woocommerce_rest_api_get($url, $params, mailchimp_get_http_local_json_header());
|
250 |
-
}
|
251 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/processes/class-mailchimp-woocommerce-single-coupon.php
CHANGED
@@ -62,9 +62,9 @@ class MailChimp_WooCommerce_SingleCoupon extends Mailchimp_Woocommerce_Job
|
|
62 |
mailchimp_log('promo_code.update', "updated promo code {$code->getCode()}");
|
63 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
64 |
sleep(3);
|
65 |
-
$this->release();
|
66 |
$promo_code = isset($code) ? "code {$code->getCode()}" : "id {$this->id}";
|
67 |
mailchimp_error('promo_code.error', mailchimp_error_trace($e, "RateLimited :: #{$promo_code}"));
|
|
|
68 |
} catch (\Exception $e) {
|
69 |
$promo_code = isset($code) ? "code {$code->getCode()}" : "id {$this->id}";
|
70 |
mailchimp_error('promo_code.error', mailchimp_error_trace($e, "error updating promo {$promo_code}"));
|
62 |
mailchimp_log('promo_code.update', "updated promo code {$code->getCode()}");
|
63 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
64 |
sleep(3);
|
|
|
65 |
$promo_code = isset($code) ? "code {$code->getCode()}" : "id {$this->id}";
|
66 |
mailchimp_error('promo_code.error', mailchimp_error_trace($e, "RateLimited :: #{$promo_code}"));
|
67 |
+
$this->retry();
|
68 |
} catch (\Exception $e) {
|
69 |
$promo_code = isset($code) ? "code {$code->getCode()}" : "id {$this->id}";
|
70 |
mailchimp_error('promo_code.error', mailchimp_error_trace($e, "error updating promo {$promo_code}"));
|
includes/processes/class-mailchimp-woocommerce-single-order.php
CHANGED
@@ -85,7 +85,16 @@ class MailChimp_WooCommerce_Single_Order extends Mailchimp_Woocommerce_Job
|
|
85 |
// set the campaign ID
|
86 |
$job->campaign_id = $this->campaign_id;
|
87 |
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
$new_order = $call === 'addStoreOrder';
|
91 |
|
@@ -111,6 +120,13 @@ class MailChimp_WooCommerce_Single_Order extends Mailchimp_Woocommerce_Job
|
|
111 |
// transform the order
|
112 |
$order = $job->transform($order_post);
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
// will be the same as the customer id. an md5'd hash of a lowercased email.
|
115 |
$this->cart_session_id = $order->getCustomer()->getId();
|
116 |
|
@@ -139,7 +155,10 @@ class MailChimp_WooCommerce_Single_Order extends Mailchimp_Woocommerce_Job
|
|
139 |
}
|
140 |
|
141 |
// if the order is in failed or cancelled status - and it's brand new, we shouldn't submit it.
|
142 |
-
if
|
|
|
|
|
|
|
143 |
return false;
|
144 |
}
|
145 |
|
@@ -212,41 +231,13 @@ class MailChimp_WooCommerce_Single_Order extends Mailchimp_Woocommerce_Job
|
|
212 |
mailchimp_log('order_submit.success', $log);
|
213 |
|
214 |
// if the customer has a flag to double opt in - we need to push this data over to MailChimp as pending
|
215 |
-
|
216 |
-
if ($order->getCustomer()->requiresDoubleOptIn() && $order->getCustomer()->getOriginalSubscriberStatus()) {
|
217 |
-
try {
|
218 |
-
$list_id = mailchimp_get_list_id();
|
219 |
-
$merge_fields = $order->getCustomer()->getMergeFields();
|
220 |
-
$email = $order->getCustomer()->getEmailAddress();
|
221 |
-
|
222 |
-
try {
|
223 |
-
$member = $api->member($list_id, $email);
|
224 |
-
if ($member['status'] === 'transactional') {
|
225 |
-
|
226 |
-
$api->update($list_id, $email, 'pending', $merge_fields);
|
227 |
-
mailchimp_tell_system_about_user_submit($email, mailchimp_get_subscriber_status_options('pending'), 60);
|
228 |
-
mailchimp_log('double_opt_in', "Updated {$email} Using Double Opt In - previous status was '{$member['status']}'", $merge_fields);
|
229 |
-
}
|
230 |
-
} catch (\Exception $e) {
|
231 |
-
// if the error code is 404 - need to subscribe them becausce it means they were not on the list.
|
232 |
-
if ($e->getCode() == 404) {
|
233 |
-
$api->subscribe($list_id, $email, false, $merge_fields);
|
234 |
-
mailchimp_tell_system_about_user_submit($email, mailchimp_get_subscriber_status_options(false), 60);
|
235 |
-
mailchimp_log('double_opt_in', "Subscribed {$email} Using Double Opt In", $merge_fields);
|
236 |
-
} else {
|
237 |
-
mailchimp_error('double_opt_in.update', $e->getMessage());
|
238 |
-
}
|
239 |
-
}
|
240 |
-
} catch (\Exception $e) {
|
241 |
-
mailchimp_error('double_opt_in.create', $e->getMessage());
|
242 |
-
}
|
243 |
-
}
|
244 |
|
245 |
return $api_response;
|
246 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
247 |
sleep(3);
|
248 |
-
$this->release();
|
249 |
mailchimp_error('order_submit.error', mailchimp_error_trace($e, "RateLimited :: #{$this->id}"));
|
|
|
250 |
} catch (\Exception $e) {
|
251 |
$message = strtolower($e->getMessage());
|
252 |
mailchimp_error('order_submit.tracing_error', $e);
|
@@ -291,7 +282,7 @@ class MailChimp_WooCommerce_Single_Order extends Mailchimp_Woocommerce_Job
|
|
291 |
if (empty($this->id) || !($order_post = get_post($this->id))) {
|
292 |
return false;
|
293 |
}
|
294 |
-
$woo =
|
295 |
return $this->woo_order_number = $woo->get_order_number();
|
296 |
} catch (\Exception $e) {
|
297 |
$this->woo_order_number = false;
|
@@ -309,7 +300,7 @@ class MailChimp_WooCommerce_Single_Order extends Mailchimp_Woocommerce_Job
|
|
309 |
if (empty($this->id) || !($order_post = get_post($this->id))) {
|
310 |
return false;
|
311 |
}
|
312 |
-
$woo =
|
313 |
$email = $woo->get_billing_email();
|
314 |
|
315 |
// just skip these altogether because we can't submit any amazon orders anyway.
|
85 |
// set the campaign ID
|
86 |
$job->campaign_id = $this->campaign_id;
|
87 |
|
88 |
+
try {
|
89 |
+
$call = ($api_response = $api->getStoreOrder($store_id, $woo_order_number, true)) ? 'updateStoreOrder' : 'addStoreOrder';
|
90 |
+
} catch (\Exception $e) {
|
91 |
+
if ($e instanceof MailChimp_WooCommerce_RateLimitError) {
|
92 |
+
sleep(2);
|
93 |
+
mailchimp_error('order_submit.error', mailchimp_error_trace($e, "RateLimited :: #{$this->id}"));
|
94 |
+
$this->retry();
|
95 |
+
}
|
96 |
+
$call = 'addStoreOrder';
|
97 |
+
}
|
98 |
|
99 |
$new_order = $call === 'addStoreOrder';
|
100 |
|
120 |
// transform the order
|
121 |
$order = $job->transform($order_post);
|
122 |
|
123 |
+
// if the order is new, and has been flagged as a status that should not be pushed over to
|
124 |
+
// Mailchimp - just ignore it and log it.
|
125 |
+
if ($new_order && $order->shouldIgnoreIfNotInMailchimp()) {
|
126 |
+
mailchimp_log('system.debug', "order {$order->getId()} is in {$order->getOriginalWooStatus()} status, and is being skipped for now.");
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
|
130 |
// will be the same as the customer id. an md5'd hash of a lowercased email.
|
131 |
$this->cart_session_id = $order->getCustomer()->getId();
|
132 |
|
155 |
}
|
156 |
|
157 |
// if the order is in failed or cancelled status - and it's brand new, we shouldn't submit it.
|
158 |
+
// if the original woocommerce status is actually pending, we need to skip these on new orders because
|
159 |
+
// it is probably happening due to 3rd party payment processing and it's still pending. These orders
|
160 |
+
// don't always make it over because someone could be cancelling out of the payment there.
|
161 |
+
if ($new_order && (in_array($order->getFinancialStatus(), array('failed', 'cancelled')) || $order->getOriginalWooStatus() === 'pending')) {
|
162 |
return false;
|
163 |
}
|
164 |
|
231 |
mailchimp_log('order_submit.success', $log);
|
232 |
|
233 |
// if the customer has a flag to double opt in - we need to push this data over to MailChimp as pending
|
234 |
+
mailchimp_update_member_with_double_opt_in($order, $order->getCustomer()->getOriginalSubscriberStatus());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
|
236 |
return $api_response;
|
237 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
238 |
sleep(3);
|
|
|
239 |
mailchimp_error('order_submit.error', mailchimp_error_trace($e, "RateLimited :: #{$this->id}"));
|
240 |
+
$this->retry();
|
241 |
} catch (\Exception $e) {
|
242 |
$message = strtolower($e->getMessage());
|
243 |
mailchimp_error('order_submit.tracing_error', $e);
|
282 |
if (empty($this->id) || !($order_post = get_post($this->id))) {
|
283 |
return false;
|
284 |
}
|
285 |
+
$woo = wc_get_order($order_post);
|
286 |
return $this->woo_order_number = $woo->get_order_number();
|
287 |
} catch (\Exception $e) {
|
288 |
$this->woo_order_number = false;
|
300 |
if (empty($this->id) || !($order_post = get_post($this->id))) {
|
301 |
return false;
|
302 |
}
|
303 |
+
$woo = wc_get_order($order_post);
|
304 |
$email = $woo->get_billing_email();
|
305 |
|
306 |
// just skip these altogether because we can't submit any amazon orders anyway.
|
includes/processes/class-mailchimp-woocommerce-single-product.php
CHANGED
@@ -97,8 +97,15 @@ class MailChimp_WooCommerce_Single_Product extends Mailchimp_Woocommerce_Job
|
|
97 |
return false;
|
98 |
}
|
99 |
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
// depending on if it's existing or not - we change the method call
|
104 |
$method = $mailchimp_product ? 'updateStoreProduct' : 'addStoreProduct';
|
@@ -128,8 +135,8 @@ class MailChimp_WooCommerce_Single_Product extends Mailchimp_Woocommerce_Job
|
|
128 |
|
129 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
130 |
sleep(3);
|
131 |
-
$this->
|
132 |
-
|
133 |
} catch (MailChimp_WooCommerce_ServerError $e) {
|
134 |
mailchimp_error('product_submit.error', mailchimp_error_trace($e, "{$method} :: #{$this->id}"));
|
135 |
} catch (MailChimp_WooCommerce_Error $e) {
|
97 |
return false;
|
98 |
}
|
99 |
|
100 |
+
try {
|
101 |
+
// pull the product from Mailchimp first to see what method we need to call next.
|
102 |
+
$mailchimp_product = $this->api()->getStoreProduct($this->store_id, $this->id, true);
|
103 |
+
} catch (\Exception $e) {
|
104 |
+
if ($e instanceof MailChimp_WooCommerce_RateLimitError) {
|
105 |
+
throw $e;
|
106 |
+
}
|
107 |
+
$mailchimp_product = false;
|
108 |
+
}
|
109 |
|
110 |
// depending on if it's existing or not - we change the method call
|
111 |
$method = $mailchimp_product ? 'updateStoreProduct' : 'addStoreProduct';
|
135 |
|
136 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
137 |
sleep(3);
|
138 |
+
mailchimp_error('product_submit.error', mailchimp_error_trace($e, "{$method} :: #{$this->id}"));
|
139 |
+
$this->retry();
|
140 |
} catch (MailChimp_WooCommerce_ServerError $e) {
|
141 |
mailchimp_error('product_submit.error', mailchimp_error_trace($e, "{$method} :: #{$this->id}"));
|
142 |
} catch (MailChimp_WooCommerce_Error $e) {
|
includes/processes/class-mailchimp-woocommerce-user-submit.php
CHANGED
@@ -15,6 +15,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
|
|
15 |
public $id;
|
16 |
public $subscribed;
|
17 |
public $updated_data;
|
|
|
18 |
public $should_ignore = false;
|
19 |
|
20 |
/**
|
@@ -23,7 +24,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
|
|
23 |
* @param null $subscribed
|
24 |
* @param WP_User|null $updated_data
|
25 |
*/
|
26 |
-
public function __construct($id = null, $subscribed = null, $updated_data = null)
|
27 |
{
|
28 |
if (!empty($id)) {
|
29 |
// if we're passing in another user with the same id during the same php process we need to ignore it.
|
@@ -41,6 +42,10 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
|
|
41 |
if (!empty($updated_data)) {
|
42 |
$this->updated_data = $updated_data->to_array();
|
43 |
}
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
/**
|
@@ -140,7 +145,10 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
|
|
140 |
mailchimp_error("custom.merge_fields", "The filter for mailchimp_sync_user_mergetags needs to return an array, using the default setup instead.");
|
141 |
$merge_fields = $merge_fields_system;
|
142 |
}
|
|
|
143 |
|
|
|
|
|
144 |
// pull the transient key for this job.
|
145 |
$transient_id = mailchimp_get_transient_email_key($email);
|
146 |
$status_meta = mailchimp_get_subscriber_status_options($this->subscribed);
|
@@ -163,7 +171,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
|
|
163 |
// delete the old
|
164 |
$api->deleteMember($list_id, $this->updated_data['user_email']);
|
165 |
// subscribe the new
|
166 |
-
$api->subscribe($list_id, $email, $status_meta['created'], $merge_fields);
|
167 |
mailchimp_tell_system_about_user_submit($email, $status_meta, 60);
|
168 |
|
169 |
if ($status_meta['created']) {
|
@@ -192,7 +200,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
|
|
192 |
// if the status is not === 'transactional' we can update them to subscribed or pending now.
|
193 |
if (isset($member_data['status']) && $member_data['status'] === 'transactional' || $member_data['status'] === 'cleaned') {
|
194 |
// ok let's update this member
|
195 |
-
$api->update($list_id, $email, $status_meta['updated'], $merge_fields);
|
196 |
mailchimp_tell_system_about_user_submit($email, $status_meta, 60);
|
197 |
mailchimp_log('member.sync', "Updated Member {$email}", array(
|
198 |
'previous_status' => $member_data['status'],
|
@@ -205,7 +213,7 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
|
|
205 |
|
206 |
if (isset($member_data['status'])) {
|
207 |
// ok let's update this member
|
208 |
-
$api->update($list_id, $email, $member_data['status'], $merge_fields);
|
209 |
mailchimp_tell_system_about_user_submit($email, $status_meta, 60);
|
210 |
mailchimp_log('member.sync', "Updated Member {$email} ( merge fields only )", array(
|
211 |
'merge_fields' => $merge_fields
|
@@ -217,14 +225,14 @@ class MailChimp_WooCommerce_User_Submit extends Mailchimp_Woocommerce_Job
|
|
217 |
static::$handling_for = null;
|
218 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
219 |
sleep(3);
|
220 |
-
$this->release();
|
221 |
mailchimp_error('member.sync.error', mailchimp_error_trace($e, "RateLimited :: user #{$this->id}"));
|
|
|
222 |
} catch (\Exception $e) {
|
223 |
// if we have a 404 not found, we can create the member
|
224 |
if ($e->getCode() == 404) {
|
225 |
|
226 |
try {
|
227 |
-
$api->subscribe($list_id, $user->user_email, $status_meta['created'], $merge_fields);
|
228 |
mailchimp_tell_system_about_user_submit($email, $status_meta, 60);
|
229 |
if ($status_meta['created']) {
|
230 |
mailchimp_log('member.sync', "Subscribed Member {$user->user_email}", array('status_if_new' => $status_meta['created'], 'merge_fields' => $merge_fields));
|
15 |
public $id;
|
16 |
public $subscribed;
|
17 |
public $updated_data;
|
18 |
+
public $language;
|
19 |
public $should_ignore = false;
|
20 |
|
21 |
/**
|
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.
|
42 |
if (!empty($updated_data)) {
|
43 |
$this->updated_data = $updated_data->to_array();
|
44 |
}
|
45 |
+
|
46 |
+
if (!empty($language)) {
|
47 |
+
$this->language = $language;
|
48 |
+
}
|
49 |
}
|
50 |
|
51 |
/**
|
145 |
mailchimp_error("custom.merge_fields", "The filter for mailchimp_sync_user_mergetags needs to return an array, using the default setup instead.");
|
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 |
// 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 |
mailchimp_tell_system_about_user_submit($email, $status_meta, 60);
|
176 |
|
177 |
if ($status_meta['created']) {
|
200 |
// if the status is not === 'transactional' we can update them to subscribed or pending now.
|
201 |
if (isset($member_data['status']) && $member_data['status'] === 'transactional' || $member_data['status'] === 'cleaned') {
|
202 |
// ok let's update this member
|
203 |
+
$api->update($list_id, $email, $status_meta['updated'], $merge_fields, null, $language);
|
204 |
mailchimp_tell_system_about_user_submit($email, $status_meta, 60);
|
205 |
mailchimp_log('member.sync', "Updated Member {$email}", array(
|
206 |
'previous_status' => $member_data['status'],
|
213 |
|
214 |
if (isset($member_data['status'])) {
|
215 |
// ok let's update this member
|
216 |
+
$api->update($list_id, $email, $member_data['status'], $merge_fields, null, $language);
|
217 |
mailchimp_tell_system_about_user_submit($email, $status_meta, 60);
|
218 |
mailchimp_log('member.sync', "Updated Member {$email} ( merge fields only )", array(
|
219 |
'merge_fields' => $merge_fields
|
225 |
static::$handling_for = null;
|
226 |
} catch (MailChimp_WooCommerce_RateLimitError $e) {
|
227 |
sleep(3);
|
|
|
228 |
mailchimp_error('member.sync.error', mailchimp_error_trace($e, "RateLimited :: user #{$this->id}"));
|
229 |
+
$this->retry();
|
230 |
} catch (\Exception $e) {
|
231 |
// if we have a 404 not found, we can create the member
|
232 |
if ($e->getCode() == 404) {
|
233 |
|
234 |
try {
|
235 |
+
$api->subscribe($list_id, $user->user_email, $status_meta['created'], $merge_fields, null, $language);
|
236 |
mailchimp_tell_system_about_user_submit($email, $status_meta, 60);
|
237 |
if ($status_meta['created']) {
|
238 |
mailchimp_log('member.sync', "Subscribed Member {$user->user_email}", array('status_if_new' => $status_meta['created'], 'merge_fields' => $merge_fields));
|
languages/mc-woocommerce-pt_BR.mo
CHANGED
Binary file
|
languages/mc-woocommerce-pt_BR.po
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/
|
5 |
-
"
|
6 |
-
"
|
|
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: pt_BR\n"
|
@@ -101,7 +102,7 @@ msgstr ""
|
|
101 |
"Se você tiver um momento, por favor nos diga porque você está desativando %s:"
|
102 |
|
103 |
#: includes/class-mailchimp-woocommerce-deactivation-survey.php:379
|
104 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
105 |
msgid "Mailchimp for Woocommerce"
|
106 |
msgstr "Mailchimp para Woocommerce"
|
107 |
|
@@ -127,15 +128,6 @@ msgstr ""
|
|
127 |
"dispositivo ou precisa voltar em um outro dia. Leia nossa Política de "
|
128 |
"Privacidade <a href=“%s”>aqui</a>."
|
129 |
|
130 |
-
#: includes/class-mailchimp-woocommerce-privacy.php:27
|
131 |
-
#: includes/class-mailchimp-woocommerce-privacy.php:40
|
132 |
-
msgid "MailChimp for WooCommerce"
|
133 |
-
msgstr "Mailchimp para Woocommerce"
|
134 |
-
|
135 |
-
#: includes/class-mailchimp-woocommerce-privacy.php:65
|
136 |
-
msgid "Email Address"
|
137 |
-
msgstr "Email"
|
138 |
-
|
139 |
#: includes/class-mailchimp-woocommerce-privacy.php:78
|
140 |
msgid "MailChimp Shopping Cart Data"
|
141 |
msgstr "Dados de carrinho de compras do Mailchimp"
|
@@ -145,8 +137,8 @@ msgid "User ID"
|
|
145 |
msgstr "ID do Usuário"
|
146 |
|
147 |
#: includes/class-mailchimp-woocommerce-newsletter.php:43
|
148 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
149 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
150 |
msgid "Subscribe to our newsletter"
|
151 |
msgstr "Inscreva-se em nossa newsletter"
|
152 |
|
@@ -155,15 +147,11 @@ msgstr "Inscreva-se em nossa newsletter"
|
|
155 |
msgid "D, M j, Y g:i A"
|
156 |
msgstr "l, d\\/m\\/Y H:i"
|
157 |
|
158 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
159 |
msgid "Mailchimp - WooCommerce Setup"
|
160 |
msgstr "Mailchimp para Woocommerce"
|
161 |
|
162 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
163 |
-
msgid "Settings"
|
164 |
-
msgstr "Configurações"
|
165 |
-
|
166 |
-
#: admin/class-mailchimp-woocommerce-admin.php:262
|
167 |
msgid ""
|
168 |
"We dectected that this site has the following constants defined, likely at "
|
169 |
"wp-config.php file"
|
@@ -171,7 +159,7 @@ msgstr ""
|
|
171 |
"Detectamos que este site tem as seguintes constantes definidas, "
|
172 |
"possivelmente no arquivo wp-config.php"
|
173 |
|
174 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
175 |
msgid ""
|
176 |
"These constants are deprecated since Mailchimp for Woocommerce version 2.3. "
|
177 |
"Please refer to the <a href=\"https://github.com/mailchimp/mc-woocommerce/"
|
@@ -181,15 +169,15 @@ msgstr ""
|
|
181 |
"2.3. Leia o <a href=“https://github.com/mailchimp/mc-woocommerce/wiki/“>wiki "
|
182 |
"oficial do plugin</a> para maiores detalhes."
|
183 |
|
184 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
185 |
msgid "Store Disconnected"
|
186 |
msgstr "Loja desconectada"
|
187 |
|
188 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
189 |
msgid "Store Disconnect Failed"
|
190 |
msgstr "Falha ao desconectar da Loja"
|
191 |
|
192 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
193 |
msgid ""
|
194 |
"As part of the Mailchimp Terms of Use, we require a contact email and a "
|
195 |
"physical mailing address."
|
@@ -197,7 +185,7 @@ msgstr ""
|
|
197 |
"Como parte dos Termos de Uso do Mailchimp, são mandatórios um email de "
|
198 |
"contato e um endereço físico de correspondência."
|
199 |
|
200 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
201 |
msgid ""
|
202 |
"As part of the Mailchimp Terms of Use, we require a valid phone number for "
|
203 |
"your store."
|
@@ -205,31 +193,31 @@ msgstr ""
|
|
205 |
"Como parte dos Termos de Uso do Mailchimp, é mandatório um número de "
|
206 |
"telefone válido para sua Loja."
|
207 |
|
208 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
209 |
msgid "Mailchimp for WooCommerce requires a Store Name to connect your store."
|
210 |
msgstr ""
|
211 |
"Mailchimp para Woocommerce requer um Nome de Loja para conectar sua Loja."
|
212 |
|
213 |
#. translators: %s - plugin name.
|
214 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
215 |
#: admin/partials/tabs/campaign_defaults.php:68
|
216 |
msgid "You were subscribed to the newsletter from %s"
|
217 |
msgstr "Você foi inscrito na newsletter de %s"
|
218 |
|
219 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
220 |
msgid "One or more fields were not updated"
|
221 |
msgstr "Um ou mais campos não foram atualizados"
|
222 |
|
223 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
224 |
msgid "You must supply your Mailchimp API key to pull the audiences."
|
225 |
msgstr ""
|
226 |
"É necessário fornecer a sua Mailchimp API Key para recuperar as audiências."
|
227 |
|
228 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
229 |
msgid "Starting the sync process..."
|
230 |
msgstr "Iniciando a Sincronização…"
|
231 |
|
232 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
233 |
msgid ""
|
234 |
"The plugin has started the initial sync with your store, and the process "
|
235 |
"will work in the background automatically."
|
@@ -237,7 +225,7 @@ msgstr ""
|
|
237 |
"O plugin iniciou a sincronização inicial com a sua Loja, e o processo "
|
238 |
"executará em segundo plano automaticamente."
|
239 |
|
240 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
241 |
msgid ""
|
242 |
"Sometimes the sync can take a while, especially on sites with lots of orders "
|
243 |
"and/or products. It is safe to navigate away from this screen while it is "
|
@@ -247,6 +235,32 @@ msgstr ""
|
|
247 |
"sites com muitos pedidos e/ou produtos. É seguro navegar para fora desta "
|
248 |
"página."
|
249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
#: admin/partials/tabs/newsletter_settings.php:36
|
251 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:162
|
252 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:185
|
@@ -265,26 +279,26 @@ msgstr "Criar nova Audiência"
|
|
265 |
msgid "Select Audience"
|
266 |
msgstr "Selecione a Audiência"
|
267 |
|
268 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
269 |
msgid "During initial sync, auto subscribe the existing customers."
|
270 |
msgstr ""
|
271 |
"Durante a sincronização inicial, inscreva automaticamente os clientes "
|
272 |
"existentes."
|
273 |
|
274 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
275 |
msgid "Optional Audience Settings"
|
276 |
msgstr "Configurações Opcionais de Audiência"
|
277 |
|
278 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
279 |
msgid "Opt-in Settings"
|
280 |
msgstr "Configurações de inscrição"
|
281 |
|
282 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
283 |
msgid "Message for the opt-in checkbox"
|
284 |
msgstr "Texto para a caixa de seleção de inclusão"
|
285 |
|
286 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
287 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
288 |
msgid ""
|
289 |
"Add text to go along with the other opt-in checkboxes. <br/>Customers can "
|
290 |
"click a box at checkout to opt in to your newsletter."
|
@@ -293,32 +307,32 @@ msgstr ""
|
|
293 |
"Usuários podem clicar em uma caixa de seleção na etapa de pagamento para se "
|
294 |
"inscrever em sua newsletter."
|
295 |
|
296 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
297 |
msgid "HTML tags allowed: <a href=\"\" target=\"\" title=\"\"></a> and <br>"
|
298 |
msgstr "Tags HTML permitidas: <a href=“” target=“” title=“”></a> e <br>"
|
299 |
|
300 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
301 |
msgid "Checkbox Display Options"
|
302 |
msgstr "Opções de exibição da caixa de seleção"
|
303 |
|
304 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
305 |
msgid "Visible, checked by default"
|
306 |
msgstr "Visível, ativada por padrão"
|
307 |
|
308 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
309 |
msgid "Visible, unchecked by default"
|
310 |
msgstr "Visível, desativada por padrão"
|
311 |
|
312 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
313 |
msgid "Hidden, unchecked by default"
|
314 |
msgstr "Escondida, desativada por padrão"
|
315 |
|
316 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
317 |
msgid "Advanced Checkbox Settings"
|
318 |
msgstr "Configurações avançadas para a caixa de seleção"
|
319 |
|
320 |
#. translators: %s - Woocommerce Actions documentation URL.
|
321 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
322 |
msgid ""
|
323 |
"To change the location of the opt-in <br/>checkbox at checkout, input one of "
|
324 |
"the <a href=%s target=_blank>available WooCommerce form actions</a>."
|
@@ -327,31 +341,31 @@ msgstr ""
|
|
327 |
"pagamento, insira uma das <a href=%s target=_blank>Actions de formulário do "
|
328 |
"WooCommerce</a>."
|
329 |
|
330 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
331 |
msgid "Enter a WooCommerce form action"
|
332 |
msgstr "Insira uma action de formulário do Woocommerce"
|
333 |
|
334 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
335 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
336 |
msgid "Subscriber Tags"
|
337 |
msgstr "Etiquetas de Usuário"
|
338 |
|
339 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
340 |
msgid ""
|
341 |
"Add a comma separated list of tags to add to the subscriber at Mailchimp"
|
342 |
msgstr ""
|
343 |
"Adicione uma lista de etiquetas separadas por vírgulas para adicionar ao "
|
344 |
"usuário no Mailchimp"
|
345 |
|
346 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
347 |
msgid "Product Settings"
|
348 |
msgstr "Configurações de Produto"
|
349 |
|
350 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
351 |
msgid "Product Image Size"
|
352 |
msgstr "Tamanho da imagem de Produto"
|
353 |
|
354 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
355 |
msgid ""
|
356 |
"Define the product image size used by abandoned carts, order notifications, "
|
357 |
"and product recommendations."
|
@@ -359,7 +373,7 @@ msgstr ""
|
|
359 |
"Defina o tamanho das imagens utilizado em carrinhos de compra abandonados, "
|
360 |
"outras notificações, e recomendações de produtos."
|
361 |
|
362 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
363 |
msgid "Size"
|
364 |
msgstr "Tamanho"
|
365 |
|
@@ -406,10 +420,6 @@ msgstr "Padrão"
|
|
406 |
msgid "Recent Logs"
|
407 |
msgstr "Logs Recentes"
|
408 |
|
409 |
-
#: admin/partials/tabs/logs.php:84
|
410 |
-
msgid "View"
|
411 |
-
msgstr "Ver"
|
412 |
-
|
413 |
#: admin/partials/tabs/logs.php:97
|
414 |
msgid "Delete log"
|
415 |
msgstr "Apagar Log"
|
@@ -418,10 +428,6 @@ msgstr "Apagar Log"
|
|
418 |
msgid "Copy log"
|
419 |
msgstr "Copiar Log"
|
420 |
|
421 |
-
#: admin/partials/tabs/logs.php:110
|
422 |
-
msgid "There are currently no logs to view."
|
423 |
-
msgstr "Não há nenhum Log para ser visualizado."
|
424 |
-
|
425 |
#: admin/partials/tabs/notices.php:6
|
426 |
msgid "Mailchimp says: You must enter in a valid API key."
|
427 |
msgstr "Maichimp diz: Insira uma API Key válida."
|
@@ -563,52 +569,6 @@ msgstr "Ressincronizar"
|
|
563 |
msgid "More Information"
|
564 |
msgstr "Mais informações"
|
565 |
|
566 |
-
#. translators: %s - WP-CLI URL.
|
567 |
-
#: admin/partials/tabs/store_sync.php:191
|
568 |
-
msgid ""
|
569 |
-
"Have a larger store or having issues syncing? Consider using <a href=%s "
|
570 |
-
"target=_blank>WP-CLI</a>."
|
571 |
-
msgstr ""
|
572 |
-
"Tem uma loja muito grande, ou está encontrando problemas ao sincronizar? "
|
573 |
-
"Considere usar o <a href=%s target=_blank>WP-CLI</a>."
|
574 |
-
|
575 |
-
#. translators: %s - WP-CLI URL.
|
576 |
-
#: admin/partials/tabs/store_sync.php:192
|
577 |
-
msgid ""
|
578 |
-
"Order and customer information will not sync if they contain an Amazon or "
|
579 |
-
"generic email address."
|
580 |
-
msgstr ""
|
581 |
-
"Dados de Pedidos e Clientes não serão sincronizados se eles conterem um "
|
582 |
-
"email genérico ou da Amazon."
|
583 |
-
|
584 |
-
#. translators: %s - Mailchimp Support URL.
|
585 |
-
#: admin/partials/tabs/store_sync.php:193
|
586 |
-
msgid ""
|
587 |
-
"Need help to connect your store? Visit the Mailchimp <a href=%s "
|
588 |
-
"target=_blank>Knowledge Base</a>."
|
589 |
-
msgstr ""
|
590 |
-
"Precisa de ajuda para conectar sua Loja? Visite a <a href=%s "
|
591 |
-
"target=_blank>Base de Conhecimento do Mailchimp</a>."
|
592 |
-
|
593 |
-
#. translators: %s - Plugin review URL.
|
594 |
-
#: admin/partials/tabs/store_sync.php:194
|
595 |
-
msgid ""
|
596 |
-
"Want to tell us how we're doing? <a href=%s target=_blank>Leave a review on "
|
597 |
-
"Wordpress.org</a>."
|
598 |
-
msgstr ""
|
599 |
-
"Quer nos contar o que você acha deste plugin? <a href=%s target=_blank>Deixe "
|
600 |
-
"uma classificação no Wordpress.org</a>."
|
601 |
-
|
602 |
-
#. translators: %s - Mailchimp Privacy Policy URL.
|
603 |
-
#: admin/partials/tabs/store_sync.php:195
|
604 |
-
msgid ""
|
605 |
-
"By using this plugin, Mailchimp will process customer information in "
|
606 |
-
"accordance with their <a href=%s target=_blank>Privacy Policy</a>."
|
607 |
-
msgstr ""
|
608 |
-
"Ao utilizar este plugin, o Mailchimp irá processar as informações de "
|
609 |
-
"clientes de acordo com sua <a href=%s target=_blank>Política de Privacidade</"
|
610 |
-
"a>."
|
611 |
-
|
612 |
#: admin/partials/tabs/api_key.php:6 admin/partials/tabs/api_key.php:11
|
613 |
msgid "Connect your store to Mailchimp"
|
614 |
msgstr "Conecte sua loja ao Mailchimp"
|
@@ -640,10 +600,14 @@ msgstr ""
|
|
640 |
"faça o login e cuidaremos do resto."
|
641 |
|
642 |
#: admin/partials/tabs/api_key.php:17
|
|
|
|
|
|
|
|
|
643 |
msgid "Connection in progress"
|
644 |
msgstr "Conexão em progresso"
|
645 |
|
646 |
-
#: admin/partials/tabs/api_key.php:
|
647 |
msgid "Connected! Please wait while loading next step"
|
648 |
msgstr "Conectado! Por favor aguarde o carregamento do próximo passo"
|
649 |
|
@@ -681,10 +645,6 @@ msgstr "CEP"
|
|
681 |
msgid "Country"
|
682 |
msgstr "País"
|
683 |
|
684 |
-
#: admin/partials/tabs/store_info.php:74
|
685 |
-
msgid "Select a Country"
|
686 |
-
msgstr "Selecione um País"
|
687 |
-
|
688 |
#: admin/partials/tabs/store_info.php:87
|
689 |
msgid "Phone Number"
|
690 |
msgstr "Telefone"
|
@@ -777,21 +737,73 @@ msgstr "Logs"
|
|
777 |
msgid "Start sync"
|
778 |
msgstr "Iniciar Sincronização"
|
779 |
|
780 |
-
|
781 |
-
|
782 |
-
|
|
|
|
|
|
|
783 |
|
784 |
-
|
785 |
-
|
786 |
-
|
|
|
|
|
|
|
787 |
|
788 |
-
|
789 |
-
|
790 |
-
"
|
791 |
-
|
792 |
-
|
793 |
-
"
|
794 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
795 |
|
796 |
#~ msgid "function \"wp_remote_post\" does not exist"
|
797 |
#~ msgstr "a funcão “wp_remote_post” não existe"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mailchimp-for-"
|
5 |
+
"woocommerce\n"
|
6 |
+
"POT-Creation-Date: 2019-11-06T10:22:06+00:00\n"
|
7 |
+
"PO-Revision-Date: 2019-11-06 11:23+0100\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
10 |
"Language: pt_BR\n"
|
102 |
"Se você tiver um momento, por favor nos diga porque você está desativando %s:"
|
103 |
|
104 |
#: includes/class-mailchimp-woocommerce-deactivation-survey.php:379
|
105 |
+
#: admin/class-mailchimp-woocommerce-admin.php:270
|
106 |
msgid "Mailchimp for Woocommerce"
|
107 |
msgstr "Mailchimp para Woocommerce"
|
108 |
|
128 |
"dispositivo ou precisa voltar em um outro dia. Leia nossa Política de "
|
129 |
"Privacidade <a href=“%s”>aqui</a>."
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
#: includes/class-mailchimp-woocommerce-privacy.php:78
|
132 |
msgid "MailChimp Shopping Cart Data"
|
133 |
msgstr "Dados de carrinho de compras do Mailchimp"
|
137 |
msgstr "ID do Usuário"
|
138 |
|
139 |
#: includes/class-mailchimp-woocommerce-newsletter.php:43
|
140 |
+
#: admin/class-mailchimp-woocommerce-admin.php:748
|
141 |
+
#: admin/partials/tabs/newsletter_settings.php:97
|
142 |
msgid "Subscribe to our newsletter"
|
143 |
msgstr "Inscreva-se em nossa newsletter"
|
144 |
|
147 |
msgid "D, M j, Y g:i A"
|
148 |
msgstr "l, d\\/m\\/Y H:i"
|
149 |
|
150 |
+
#: admin/class-mailchimp-woocommerce-admin.php:123
|
151 |
msgid "Mailchimp - WooCommerce Setup"
|
152 |
msgstr "Mailchimp para Woocommerce"
|
153 |
|
154 |
+
#: admin/class-mailchimp-woocommerce-admin.php:271
|
|
|
|
|
|
|
|
|
155 |
msgid ""
|
156 |
"We dectected that this site has the following constants defined, likely at "
|
157 |
"wp-config.php file"
|
159 |
"Detectamos que este site tem as seguintes constantes definidas, "
|
160 |
"possivelmente no arquivo wp-config.php"
|
161 |
|
162 |
+
#: admin/class-mailchimp-woocommerce-admin.php:273
|
163 |
msgid ""
|
164 |
"These constants are deprecated since Mailchimp for Woocommerce version 2.3. "
|
165 |
"Please refer to the <a href=\"https://github.com/mailchimp/mc-woocommerce/"
|
169 |
"2.3. Leia o <a href=“https://github.com/mailchimp/mc-woocommerce/wiki/“>wiki "
|
170 |
"oficial do plugin</a> para maiores detalhes."
|
171 |
|
172 |
+
#: admin/class-mailchimp-woocommerce-admin.php:393
|
173 |
msgid "Store Disconnected"
|
174 |
msgstr "Loja desconectada"
|
175 |
|
176 |
+
#: admin/class-mailchimp-woocommerce-admin.php:397
|
177 |
msgid "Store Disconnect Failed"
|
178 |
msgstr "Falha ao desconectar da Loja"
|
179 |
|
180 |
+
#: admin/class-mailchimp-woocommerce-admin.php:668
|
181 |
msgid ""
|
182 |
"As part of the Mailchimp Terms of Use, we require a contact email and a "
|
183 |
"physical mailing address."
|
185 |
"Como parte dos Termos de Uso do Mailchimp, são mandatórios um email de "
|
186 |
"contato e um endereço físico de correspondência."
|
187 |
|
188 |
+
#: admin/class-mailchimp-woocommerce-admin.php:676
|
189 |
msgid ""
|
190 |
"As part of the Mailchimp Terms of Use, we require a valid phone number for "
|
191 |
"your store."
|
193 |
"Como parte dos Termos de Uso do Mailchimp, é mandatório um número de "
|
194 |
"telefone válido para sua Loja."
|
195 |
|
196 |
+
#: admin/class-mailchimp-woocommerce-admin.php:684
|
197 |
msgid "Mailchimp for WooCommerce requires a Store Name to connect your store."
|
198 |
msgstr ""
|
199 |
"Mailchimp para Woocommerce requer um Nome de Loja para conectar sua Loja."
|
200 |
|
201 |
#. translators: %s - plugin name.
|
202 |
+
#: admin/class-mailchimp-woocommerce-admin.php:702
|
203 |
#: admin/partials/tabs/campaign_defaults.php:68
|
204 |
msgid "You were subscribed to the newsletter from %s"
|
205 |
msgstr "Você foi inscrito na newsletter de %s"
|
206 |
|
207 |
+
#: admin/class-mailchimp-woocommerce-admin.php:707
|
208 |
msgid "One or more fields were not updated"
|
209 |
msgstr "Um ou mais campos não foram atualizados"
|
210 |
|
211 |
+
#: admin/class-mailchimp-woocommerce-admin.php:858
|
212 |
msgid "You must supply your Mailchimp API key to pull the audiences."
|
213 |
msgstr ""
|
214 |
"É necessário fornecer a sua Mailchimp API Key para recuperar as audiências."
|
215 |
|
216 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1320
|
217 |
msgid "Starting the sync process..."
|
218 |
msgstr "Iniciando a Sincronização…"
|
219 |
|
220 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1322
|
221 |
msgid ""
|
222 |
"The plugin has started the initial sync with your store, and the process "
|
223 |
"will work in the background automatically."
|
225 |
"O plugin iniciou a sincronização inicial com a sua Loja, e o processo "
|
226 |
"executará em segundo plano automaticamente."
|
227 |
|
228 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1324
|
229 |
msgid ""
|
230 |
"Sometimes the sync can take a while, especially on sites with lots of orders "
|
231 |
"and/or products. It is safe to navigate away from this screen while it is "
|
235 |
"sites com muitos pedidos e/ou produtos. É seguro navegar para fora desta "
|
236 |
"página."
|
237 |
|
238 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1334
|
239 |
+
msgid "Your store is synced with Mailchimp!"
|
240 |
+
msgstr "Sua Loja está sincronizada com o Mailchimp!"
|
241 |
+
|
242 |
+
#. translators: %1$s: Number of synced orders %2$s: Audience name
|
243 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1337
|
244 |
+
msgid ""
|
245 |
+
"We've successfully synced %1$s orders to your Audience %2$s, that's awesome!"
|
246 |
+
msgstr ""
|
247 |
+
"%1$s ordem foi sincronizada a sua Audiência %2$s com sucesso. Muito bom!"
|
248 |
+
|
249 |
+
#. translators: %s - Wordpress.org plugin review URL.
|
250 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1345
|
251 |
+
msgid ""
|
252 |
+
"Could you please do us a favor and leave the plugin a 5-star <a href=%s "
|
253 |
+
"target='_blank'>rating on Wordpress.org</a>? It helps our community know "
|
254 |
+
"that we're working hard to make it better each day."
|
255 |
+
msgstr ""
|
256 |
+
"Você poderia nos fazer um favor e avaliar o nosso plugin com uma <a href=%s "
|
257 |
+
"target=_blank>avaliação 5 estrelas no WordPress.org</a>?. Ajude a comunidade "
|
258 |
+
"saber que estamos melhorando a cada dia."
|
259 |
+
|
260 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1348
|
261 |
+
msgid "Leave a Review"
|
262 |
+
msgstr "Faça uma avaliação"
|
263 |
+
|
264 |
#: admin/partials/tabs/newsletter_settings.php:36
|
265 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:162
|
266 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:185
|
279 |
msgid "Select Audience"
|
280 |
msgstr "Selecione a Audiência"
|
281 |
|
282 |
+
#: admin/partials/tabs/newsletter_settings.php:76
|
283 |
msgid "During initial sync, auto subscribe the existing customers."
|
284 |
msgstr ""
|
285 |
"Durante a sincronização inicial, inscreva automaticamente os clientes "
|
286 |
"existentes."
|
287 |
|
288 |
+
#: admin/partials/tabs/newsletter_settings.php:81
|
289 |
msgid "Optional Audience Settings"
|
290 |
msgstr "Configurações Opcionais de Audiência"
|
291 |
|
292 |
+
#: admin/partials/tabs/newsletter_settings.php:86
|
293 |
msgid "Opt-in Settings"
|
294 |
msgstr "Configurações de inscrição"
|
295 |
|
296 |
+
#: admin/partials/tabs/newsletter_settings.php:91
|
297 |
msgid "Message for the opt-in checkbox"
|
298 |
msgstr "Texto para a caixa de seleção de inclusão"
|
299 |
|
300 |
+
#: admin/partials/tabs/newsletter_settings.php:92
|
301 |
+
#: admin/partials/tabs/newsletter_settings.php:104
|
302 |
msgid ""
|
303 |
"Add text to go along with the other opt-in checkboxes. <br/>Customers can "
|
304 |
"click a box at checkout to opt in to your newsletter."
|
307 |
"Usuários podem clicar em uma caixa de seleção na etapa de pagamento para se "
|
308 |
"inscrever em sua newsletter."
|
309 |
|
310 |
+
#: admin/partials/tabs/newsletter_settings.php:98
|
311 |
msgid "HTML tags allowed: <a href=\"\" target=\"\" title=\"\"></a> and <br>"
|
312 |
msgstr "Tags HTML permitidas: <a href=“” target=“” title=“”></a> e <br>"
|
313 |
|
314 |
+
#: admin/partials/tabs/newsletter_settings.php:103
|
315 |
msgid "Checkbox Display Options"
|
316 |
msgstr "Opções de exibição da caixa de seleção"
|
317 |
|
318 |
+
#: admin/partials/tabs/newsletter_settings.php:112
|
319 |
msgid "Visible, checked by default"
|
320 |
msgstr "Visível, ativada por padrão"
|
321 |
|
322 |
+
#: admin/partials/tabs/newsletter_settings.php:115
|
323 |
msgid "Visible, unchecked by default"
|
324 |
msgstr "Visível, desativada por padrão"
|
325 |
|
326 |
+
#: admin/partials/tabs/newsletter_settings.php:118
|
327 |
msgid "Hidden, unchecked by default"
|
328 |
msgstr "Escondida, desativada por padrão"
|
329 |
|
330 |
+
#: admin/partials/tabs/newsletter_settings.php:125
|
331 |
msgid "Advanced Checkbox Settings"
|
332 |
msgstr "Configurações avançadas para a caixa de seleção"
|
333 |
|
334 |
#. translators: %s - Woocommerce Actions documentation URL.
|
335 |
+
#: admin/partials/tabs/newsletter_settings.php:126
|
336 |
msgid ""
|
337 |
"To change the location of the opt-in <br/>checkbox at checkout, input one of "
|
338 |
"the <a href=%s target=_blank>available WooCommerce form actions</a>."
|
341 |
"pagamento, insira uma das <a href=%s target=_blank>Actions de formulário do "
|
342 |
"WooCommerce</a>."
|
343 |
|
344 |
+
#: admin/partials/tabs/newsletter_settings.php:132
|
345 |
msgid "Enter a WooCommerce form action"
|
346 |
msgstr "Insira uma action de formulário do Woocommerce"
|
347 |
|
348 |
+
#: admin/partials/tabs/newsletter_settings.php:136
|
349 |
+
#: admin/partials/tabs/newsletter_settings.php:141
|
350 |
msgid "Subscriber Tags"
|
351 |
msgstr "Etiquetas de Usuário"
|
352 |
|
353 |
+
#: admin/partials/tabs/newsletter_settings.php:147
|
354 |
msgid ""
|
355 |
"Add a comma separated list of tags to add to the subscriber at Mailchimp"
|
356 |
msgstr ""
|
357 |
"Adicione uma lista de etiquetas separadas por vírgulas para adicionar ao "
|
358 |
"usuário no Mailchimp"
|
359 |
|
360 |
+
#: admin/partials/tabs/newsletter_settings.php:151
|
361 |
msgid "Product Settings"
|
362 |
msgstr "Configurações de Produto"
|
363 |
|
364 |
+
#: admin/partials/tabs/newsletter_settings.php:157
|
365 |
msgid "Product Image Size"
|
366 |
msgstr "Tamanho da imagem de Produto"
|
367 |
|
368 |
+
#: admin/partials/tabs/newsletter_settings.php:158
|
369 |
msgid ""
|
370 |
"Define the product image size used by abandoned carts, order notifications, "
|
371 |
"and product recommendations."
|
373 |
"Defina o tamanho das imagens utilizado em carrinhos de compra abandonados, "
|
374 |
"outras notificações, e recomendações de produtos."
|
375 |
|
376 |
+
#: admin/partials/tabs/newsletter_settings.php:164
|
377 |
msgid "Size"
|
378 |
msgstr "Tamanho"
|
379 |
|
420 |
msgid "Recent Logs"
|
421 |
msgstr "Logs Recentes"
|
422 |
|
|
|
|
|
|
|
|
|
423 |
#: admin/partials/tabs/logs.php:97
|
424 |
msgid "Delete log"
|
425 |
msgstr "Apagar Log"
|
428 |
msgid "Copy log"
|
429 |
msgstr "Copiar Log"
|
430 |
|
|
|
|
|
|
|
|
|
431 |
#: admin/partials/tabs/notices.php:6
|
432 |
msgid "Mailchimp says: You must enter in a valid API key."
|
433 |
msgstr "Maichimp diz: Insira uma API Key válida."
|
569 |
msgid "More Information"
|
570 |
msgstr "Mais informações"
|
571 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
#: admin/partials/tabs/api_key.php:6 admin/partials/tabs/api_key.php:11
|
573 |
msgid "Connect your store to Mailchimp"
|
574 |
msgstr "Conecte sua loja ao Mailchimp"
|
600 |
"faça o login e cuidaremos do resto."
|
601 |
|
602 |
#: admin/partials/tabs/api_key.php:17
|
603 |
+
msgid "Error, can't login."
|
604 |
+
msgstr "Erro. Não foi possível conectar."
|
605 |
+
|
606 |
+
#: admin/partials/tabs/api_key.php:18
|
607 |
msgid "Connection in progress"
|
608 |
msgstr "Conexão em progresso"
|
609 |
|
610 |
+
#: admin/partials/tabs/api_key.php:19
|
611 |
msgid "Connected! Please wait while loading next step"
|
612 |
msgstr "Conectado! Por favor aguarde o carregamento do próximo passo"
|
613 |
|
645 |
msgid "Country"
|
646 |
msgstr "País"
|
647 |
|
|
|
|
|
|
|
|
|
648 |
#: admin/partials/tabs/store_info.php:87
|
649 |
msgid "Phone Number"
|
650 |
msgstr "Telefone"
|
737 |
msgid "Start sync"
|
738 |
msgstr "Iniciar Sincronização"
|
739 |
|
740 |
+
#~ msgid ""
|
741 |
+
#~ "Have a larger store or having issues syncing? Consider using <a href=%s "
|
742 |
+
#~ "target=_blank>WP-CLI</a>."
|
743 |
+
#~ msgstr ""
|
744 |
+
#~ "Tem uma loja muito grande, ou está encontrando problemas ao sincronizar? "
|
745 |
+
#~ "Considere usar o <a href=%s target=_blank>WP-CLI</a>."
|
746 |
|
747 |
+
#~ msgid ""
|
748 |
+
#~ "Order and customer information will not sync if they contain an Amazon or "
|
749 |
+
#~ "generic email address."
|
750 |
+
#~ msgstr ""
|
751 |
+
#~ "Dados de Pedidos e Clientes não serão sincronizados se eles conterem um "
|
752 |
+
#~ "email genérico ou da Amazon."
|
753 |
|
754 |
+
#~ msgid ""
|
755 |
+
#~ "Need help to connect your store? Visit the Mailchimp <a href=%s "
|
756 |
+
#~ "target=_blank>Knowledge Base</a>."
|
757 |
+
#~ msgstr ""
|
758 |
+
#~ "Precisa de ajuda para conectar sua Loja? Visite a <a href=%s "
|
759 |
+
#~ "target=_blank>Base de Conhecimento do Mailchimp</a>."
|
760 |
+
|
761 |
+
#~ msgid ""
|
762 |
+
#~ "Want to tell us how we're doing? <a href=%s target=_blank>Leave a review "
|
763 |
+
#~ "on Wordpress.org</a>."
|
764 |
+
#~ msgstr ""
|
765 |
+
#~ "Quer nos contar o que você acha deste plugin? <a href=%s "
|
766 |
+
#~ "target=_blank>Deixe uma classificação no Wordpress.org</a>."
|
767 |
+
|
768 |
+
#~ msgid ""
|
769 |
+
#~ "By using this plugin, Mailchimp will process customer information in "
|
770 |
+
#~ "accordance with their <a href=%s target=_blank>Privacy Policy</a>."
|
771 |
+
#~ msgstr ""
|
772 |
+
#~ "Ao utilizar este plugin, o Mailchimp irá processar as informações de "
|
773 |
+
#~ "clientes de acordo com sua <a href=%s target=_blank>Política de "
|
774 |
+
#~ "Privacidade</a>."
|
775 |
+
|
776 |
+
#~ msgid "MailChimp for WooCommerce"
|
777 |
+
#~ msgstr "Mailchimp para Woocommerce"
|
778 |
+
|
779 |
+
#~ msgid "Email Address"
|
780 |
+
#~ msgstr "Email"
|
781 |
+
|
782 |
+
#~ msgid "Settings"
|
783 |
+
#~ msgstr "Configurações"
|
784 |
+
|
785 |
+
#~ msgid "View"
|
786 |
+
#~ msgstr "Ver"
|
787 |
+
|
788 |
+
#~ msgid "There are currently no logs to view."
|
789 |
+
#~ msgstr "Não há nenhum Log para ser visualizado."
|
790 |
+
|
791 |
+
#~ msgid "Select a Country"
|
792 |
+
#~ msgstr "Selecione um País"
|
793 |
+
|
794 |
+
#~ msgid "Save all changes"
|
795 |
+
#~ msgstr "Salvar todas alterações"
|
796 |
+
|
797 |
+
#~ msgid "Next"
|
798 |
+
#~ msgstr "Próximo"
|
799 |
+
|
800 |
+
#~ msgid ""
|
801 |
+
#~ "The MailChimp For WooCommerce plugin requires the <a href=\"http://"
|
802 |
+
#~ "wordpress.org/extend/plugins/woocommerce/\">WooCommerce</a> plugin to be "
|
803 |
+
#~ "active!"
|
804 |
+
#~ msgstr ""
|
805 |
+
#~ "O plugin Mailchimp para Woocommerce requer que o plugin <a href=“http://"
|
806 |
+
#~ "wordpress.org/extend/plugins/woocommerce/“>WooCommerce</a> esteja ativo!"
|
807 |
|
808 |
#~ msgid "function \"wp_remote_post\" does not exist"
|
809 |
#~ msgstr "a funcão “wp_remote_post” não existe"
|
languages/mc-woocommerce.pot
CHANGED
@@ -2,16 +2,17 @@
|
|
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.3\n"
|
6 |
-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2019-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.1.0\n"
|
|
|
15 |
|
16 |
#. Plugin Name of the plugin
|
17 |
msgid "Mailchimp for WooCommerce"
|
@@ -95,7 +96,7 @@ msgid "If you have a moment, please share why you are deactivating %s:"
|
|
95 |
msgstr ""
|
96 |
|
97 |
#: includes/class-mailchimp-woocommerce-deactivation-survey.php:379
|
98 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
99 |
msgid "Mailchimp for Woocommerce"
|
100 |
msgstr ""
|
101 |
|
@@ -112,15 +113,6 @@ msgstr ""
|
|
112 |
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>."
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: includes/class-mailchimp-woocommerce-privacy.php:27
|
116 |
-
#: includes/class-mailchimp-woocommerce-privacy.php:40
|
117 |
-
msgid "MailChimp for WooCommerce"
|
118 |
-
msgstr ""
|
119 |
-
|
120 |
-
#: includes/class-mailchimp-woocommerce-privacy.php:65
|
121 |
-
msgid "Email Address"
|
122 |
-
msgstr ""
|
123 |
-
|
124 |
#: includes/class-mailchimp-woocommerce-privacy.php:78
|
125 |
msgid "MailChimp Shopping Cart Data"
|
126 |
msgstr ""
|
@@ -130,8 +122,8 @@ msgid "User ID"
|
|
130 |
msgstr ""
|
131 |
|
132 |
#: includes/class-mailchimp-woocommerce-newsletter.php:43
|
133 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
134 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
135 |
msgid "Subscribe to our newsletter"
|
136 |
msgstr ""
|
137 |
|
@@ -140,68 +132,82 @@ msgstr ""
|
|
140 |
msgid "D, M j, Y g:i A"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
144 |
msgid "Mailchimp - WooCommerce Setup"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
148 |
-
msgid "Settings"
|
149 |
-
msgstr ""
|
150 |
-
|
151 |
-
#: admin/class-mailchimp-woocommerce-admin.php:262
|
152 |
msgid "We dectected that this site has the following constants defined, likely at wp-config.php file"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
156 |
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."
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
160 |
msgid "Store Disconnected"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
164 |
msgid "Store Disconnect Failed"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
168 |
msgid "As part of the Mailchimp Terms of Use, we require a contact email and a physical mailing address."
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
172 |
msgid "As part of the Mailchimp Terms of Use, we require a valid phone number for your store."
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
176 |
msgid "Mailchimp for WooCommerce requires a Store Name to connect your store."
|
177 |
msgstr ""
|
178 |
|
179 |
#. translators: %s - plugin name.
|
180 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
181 |
#: admin/partials/tabs/campaign_defaults.php:68
|
182 |
msgid "You were subscribed to the newsletter from %s"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
186 |
msgid "One or more fields were not updated"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
190 |
msgid "You must supply your Mailchimp API key to pull the audiences."
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
194 |
msgid "Starting the sync process..."
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
198 |
msgid "The plugin has started the initial sync with your store, and the process will work in the background automatically."
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: admin/class-mailchimp-woocommerce-admin.php:
|
202 |
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."
|
203 |
msgstr ""
|
204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
#: admin/partials/tabs/newsletter_settings.php:36
|
206 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:162
|
207 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:185
|
@@ -220,82 +226,82 @@ msgstr ""
|
|
220 |
msgid "Select Audience"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
224 |
msgid "During initial sync, auto subscribe the existing customers."
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
228 |
msgid "Optional Audience Settings"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
232 |
msgid "Opt-in Settings"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
236 |
msgid "Message for the opt-in checkbox"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
240 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
241 |
msgid "Add text to go along with the other opt-in checkboxes. <br/>Customers can click a box at checkout to opt in to your newsletter."
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
245 |
msgid "HTML tags allowed: <a href=\"\" target=\"\" title=\"\"></a> and <br>"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
249 |
msgid "Checkbox Display Options"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
253 |
msgid "Visible, checked by default"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
257 |
msgid "Visible, unchecked by default"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
261 |
msgid "Hidden, unchecked by default"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
265 |
msgid "Advanced Checkbox Settings"
|
266 |
msgstr ""
|
267 |
|
268 |
#. translators: %s - Woocommerce Actions documentation URL.
|
269 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
270 |
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>."
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
274 |
msgid "Enter a WooCommerce form action"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
278 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
279 |
msgid "Subscriber Tags"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
283 |
msgid "Add a comma separated list of tags to add to the subscriber at Mailchimp"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
287 |
msgid "Product Settings"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
291 |
msgid "Product Image Size"
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
295 |
msgid "Define the product image size used by abandoned carts, order notifications, and product recommendations."
|
296 |
msgstr ""
|
297 |
|
298 |
-
#: admin/partials/tabs/newsletter_settings.php:
|
299 |
msgid "Size"
|
300 |
msgstr ""
|
301 |
|
@@ -331,10 +337,6 @@ msgstr ""
|
|
331 |
msgid "Recent Logs"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: admin/partials/tabs/logs.php:84
|
335 |
-
msgid "View"
|
336 |
-
msgstr ""
|
337 |
-
|
338 |
#: admin/partials/tabs/logs.php:97
|
339 |
msgid "Delete log"
|
340 |
msgstr ""
|
@@ -343,10 +345,6 @@ msgstr ""
|
|
343 |
msgid "Copy log"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: admin/partials/tabs/logs.php:110
|
347 |
-
msgid "There are currently no logs to view."
|
348 |
-
msgstr ""
|
349 |
-
|
350 |
#: admin/partials/tabs/notices.php:6
|
351 |
msgid "Mailchimp says: You must enter in a valid API key."
|
352 |
msgstr ""
|
@@ -477,31 +475,6 @@ msgstr ""
|
|
477 |
msgid "More Information"
|
478 |
msgstr ""
|
479 |
|
480 |
-
#. translators: %s - WP-CLI URL.
|
481 |
-
#: admin/partials/tabs/store_sync.php:191
|
482 |
-
msgid "Have a larger store or having issues syncing? Consider using <a href=%s target=_blank>WP-CLI</a>."
|
483 |
-
msgstr ""
|
484 |
-
|
485 |
-
#. translators: %s - WP-CLI URL.
|
486 |
-
#: admin/partials/tabs/store_sync.php:192
|
487 |
-
msgid "Order and customer information will not sync if they contain an Amazon or generic email address."
|
488 |
-
msgstr ""
|
489 |
-
|
490 |
-
#. translators: %s - Mailchimp Support URL.
|
491 |
-
#: admin/partials/tabs/store_sync.php:193
|
492 |
-
msgid "Need help to connect your store? Visit the Mailchimp <a href=%s target=_blank>Knowledge Base</a>."
|
493 |
-
msgstr ""
|
494 |
-
|
495 |
-
#. translators: %s - Plugin review URL.
|
496 |
-
#: admin/partials/tabs/store_sync.php:194
|
497 |
-
msgid "Want to tell us how we're doing? <a href=%s target=_blank>Leave a review on Wordpress.org</a>."
|
498 |
-
msgstr ""
|
499 |
-
|
500 |
-
#. translators: %s - Mailchimp Privacy Policy URL.
|
501 |
-
#: admin/partials/tabs/store_sync.php:195
|
502 |
-
msgid "By using this plugin, Mailchimp will process customer information in accordance with their <a href=%s target=_blank>Privacy Policy</a>."
|
503 |
-
msgstr ""
|
504 |
-
|
505 |
#: admin/partials/tabs/api_key.php:6
|
506 |
#: admin/partials/tabs/api_key.php:11
|
507 |
msgid "Connect your store to Mailchimp"
|
@@ -526,10 +499,14 @@ msgid "Connecting. A new window will open with Mailchimp's OAuth service. Please
|
|
526 |
msgstr ""
|
527 |
|
528 |
#: admin/partials/tabs/api_key.php:17
|
529 |
-
msgid "
|
530 |
msgstr ""
|
531 |
|
532 |
#: admin/partials/tabs/api_key.php:18
|
|
|
|
|
|
|
|
|
533 |
msgid "Connected! Please wait while loading next step"
|
534 |
msgstr ""
|
535 |
|
@@ -567,10 +544,6 @@ msgstr ""
|
|
567 |
msgid "Country"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: admin/partials/tabs/store_info.php:74
|
571 |
-
msgid "Select a Country"
|
572 |
-
msgstr ""
|
573 |
-
|
574 |
#: admin/partials/tabs/store_info.php:87
|
575 |
msgid "Phone Number"
|
576 |
msgstr ""
|
@@ -646,15 +619,3 @@ msgstr ""
|
|
646 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:202
|
647 |
msgid "Start sync"
|
648 |
msgstr ""
|
649 |
-
|
650 |
-
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:204
|
651 |
-
msgid "Save all changes"
|
652 |
-
msgstr ""
|
653 |
-
|
654 |
-
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:204
|
655 |
-
msgid "Next"
|
656 |
-
msgstr ""
|
657 |
-
|
658 |
-
#: bootstrap.php:520
|
659 |
-
msgid "The MailChimp For WooCommerce plugin requires the <a href=\"http://wordpress.org/extend/plugins/woocommerce/\">WooCommerce</a> plugin to be active!"
|
660 |
-
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.3.1\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: 2019-11-06T10:22:06+00: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 |
msgid "Mailchimp for WooCommerce"
|
96 |
msgstr ""
|
97 |
|
98 |
#: includes/class-mailchimp-woocommerce-deactivation-survey.php:379
|
99 |
+
#: admin/class-mailchimp-woocommerce-admin.php:270
|
100 |
msgid "Mailchimp for Woocommerce"
|
101 |
msgstr ""
|
102 |
|
113 |
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>."
|
114 |
msgstr ""
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
#: includes/class-mailchimp-woocommerce-privacy.php:78
|
117 |
msgid "MailChimp Shopping Cart Data"
|
118 |
msgstr ""
|
122 |
msgstr ""
|
123 |
|
124 |
#: includes/class-mailchimp-woocommerce-newsletter.php:43
|
125 |
+
#: admin/class-mailchimp-woocommerce-admin.php:748
|
126 |
+
#: admin/partials/tabs/newsletter_settings.php:97
|
127 |
msgid "Subscribe to our newsletter"
|
128 |
msgstr ""
|
129 |
|
132 |
msgid "D, M j, Y g:i A"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: admin/class-mailchimp-woocommerce-admin.php:123
|
136 |
msgid "Mailchimp - WooCommerce Setup"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: admin/class-mailchimp-woocommerce-admin.php:271
|
|
|
|
|
|
|
|
|
140 |
msgid "We dectected that this site has the following constants defined, likely at wp-config.php file"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: admin/class-mailchimp-woocommerce-admin.php:273
|
144 |
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."
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: admin/class-mailchimp-woocommerce-admin.php:393
|
148 |
msgid "Store Disconnected"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: admin/class-mailchimp-woocommerce-admin.php:397
|
152 |
msgid "Store Disconnect Failed"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: admin/class-mailchimp-woocommerce-admin.php:668
|
156 |
msgid "As part of the Mailchimp Terms of Use, we require a contact email and a physical mailing address."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: admin/class-mailchimp-woocommerce-admin.php:676
|
160 |
msgid "As part of the Mailchimp Terms of Use, we require a valid phone number for your store."
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: admin/class-mailchimp-woocommerce-admin.php:684
|
164 |
msgid "Mailchimp for WooCommerce requires a Store Name to connect your store."
|
165 |
msgstr ""
|
166 |
|
167 |
#. translators: %s - plugin name.
|
168 |
+
#: admin/class-mailchimp-woocommerce-admin.php:702
|
169 |
#: admin/partials/tabs/campaign_defaults.php:68
|
170 |
msgid "You were subscribed to the newsletter from %s"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: admin/class-mailchimp-woocommerce-admin.php:707
|
174 |
msgid "One or more fields were not updated"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: admin/class-mailchimp-woocommerce-admin.php:858
|
178 |
msgid "You must supply your Mailchimp API key to pull the audiences."
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1320
|
182 |
msgid "Starting the sync process..."
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1322
|
186 |
msgid "The plugin has started the initial sync with your store, and the process will work in the background automatically."
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1324
|
190 |
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."
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1334
|
194 |
+
msgid "Your store is synced with Mailchimp!"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#. translators: %1$s: Number of synced orders %2$s: Audience name
|
198 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1337
|
199 |
+
msgid "We've successfully synced %1$s orders to your Audience %2$s, that's awesome!"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#. translators: %s - Wordpress.org plugin review URL.
|
203 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1345
|
204 |
+
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."
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: admin/class-mailchimp-woocommerce-admin.php:1348
|
208 |
+
msgid "Leave a Review"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
#: admin/partials/tabs/newsletter_settings.php:36
|
212 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:162
|
213 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:185
|
226 |
msgid "Select Audience"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: admin/partials/tabs/newsletter_settings.php:76
|
230 |
msgid "During initial sync, auto subscribe the existing customers."
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: admin/partials/tabs/newsletter_settings.php:81
|
234 |
msgid "Optional Audience Settings"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: admin/partials/tabs/newsletter_settings.php:86
|
238 |
msgid "Opt-in Settings"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: admin/partials/tabs/newsletter_settings.php:91
|
242 |
msgid "Message for the opt-in checkbox"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: admin/partials/tabs/newsletter_settings.php:92
|
246 |
+
#: admin/partials/tabs/newsletter_settings.php:104
|
247 |
msgid "Add text to go along with the other opt-in checkboxes. <br/>Customers can click a box at checkout to opt in to your newsletter."
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: admin/partials/tabs/newsletter_settings.php:98
|
251 |
msgid "HTML tags allowed: <a href=\"\" target=\"\" title=\"\"></a> and <br>"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: admin/partials/tabs/newsletter_settings.php:103
|
255 |
msgid "Checkbox Display Options"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: admin/partials/tabs/newsletter_settings.php:112
|
259 |
msgid "Visible, checked by default"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: admin/partials/tabs/newsletter_settings.php:115
|
263 |
msgid "Visible, unchecked by default"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: admin/partials/tabs/newsletter_settings.php:118
|
267 |
msgid "Hidden, unchecked by default"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: admin/partials/tabs/newsletter_settings.php:125
|
271 |
msgid "Advanced Checkbox Settings"
|
272 |
msgstr ""
|
273 |
|
274 |
#. translators: %s - Woocommerce Actions documentation URL.
|
275 |
+
#: admin/partials/tabs/newsletter_settings.php:126
|
276 |
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>."
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: admin/partials/tabs/newsletter_settings.php:132
|
280 |
msgid "Enter a WooCommerce form action"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: admin/partials/tabs/newsletter_settings.php:136
|
284 |
+
#: admin/partials/tabs/newsletter_settings.php:141
|
285 |
msgid "Subscriber Tags"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: admin/partials/tabs/newsletter_settings.php:147
|
289 |
msgid "Add a comma separated list of tags to add to the subscriber at Mailchimp"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: admin/partials/tabs/newsletter_settings.php:151
|
293 |
msgid "Product Settings"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: admin/partials/tabs/newsletter_settings.php:157
|
297 |
msgid "Product Image Size"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: admin/partials/tabs/newsletter_settings.php:158
|
301 |
msgid "Define the product image size used by abandoned carts, order notifications, and product recommendations."
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: admin/partials/tabs/newsletter_settings.php:164
|
305 |
msgid "Size"
|
306 |
msgstr ""
|
307 |
|
337 |
msgid "Recent Logs"
|
338 |
msgstr ""
|
339 |
|
|
|
|
|
|
|
|
|
340 |
#: admin/partials/tabs/logs.php:97
|
341 |
msgid "Delete log"
|
342 |
msgstr ""
|
345 |
msgid "Copy log"
|
346 |
msgstr ""
|
347 |
|
|
|
|
|
|
|
|
|
348 |
#: admin/partials/tabs/notices.php:6
|
349 |
msgid "Mailchimp says: You must enter in a valid API key."
|
350 |
msgstr ""
|
475 |
msgid "More Information"
|
476 |
msgstr ""
|
477 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
478 |
#: admin/partials/tabs/api_key.php:6
|
479 |
#: admin/partials/tabs/api_key.php:11
|
480 |
msgid "Connect your store to Mailchimp"
|
499 |
msgstr ""
|
500 |
|
501 |
#: admin/partials/tabs/api_key.php:17
|
502 |
+
msgid "Error, can't login."
|
503 |
msgstr ""
|
504 |
|
505 |
#: admin/partials/tabs/api_key.php:18
|
506 |
+
msgid "Connection in progress"
|
507 |
+
msgstr ""
|
508 |
+
|
509 |
+
#: admin/partials/tabs/api_key.php:19
|
510 |
msgid "Connected! Please wait while loading next step"
|
511 |
msgstr ""
|
512 |
|
544 |
msgid "Country"
|
545 |
msgstr ""
|
546 |
|
|
|
|
|
|
|
|
|
547 |
#: admin/partials/tabs/store_info.php:87
|
548 |
msgid "Phone Number"
|
549 |
msgstr ""
|
619 |
#: admin/partials/mailchimp-woocommerce-admin-tabs.php:202
|
620 |
msgid "Start sync"
|
621 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mailchimp-woocommerce.php
CHANGED
@@ -16,17 +16,17 @@
|
|
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.3
|
20 |
* Author: Mailchimp
|
21 |
* Author URI: https://mailchimp.com
|
22 |
* License: GPL-2.0+
|
23 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
24 |
-
* Text Domain:
|
25 |
* Domain Path: /languages
|
26 |
* Requires at least: 4.9
|
27 |
-
* Tested up to: 5.
|
28 |
* WC requires at least: 3.5
|
29 |
-
* WC tested up to: 3.
|
30 |
*/
|
31 |
|
32 |
// If this file is called directly, abort.
|
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.3.1
|
20 |
* Author: Mailchimp
|
21 |
* Author URI: https://mailchimp.com
|
22 |
* License: GPL-2.0+
|
23 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
24 |
+
* Text Domain: mailchimp-for-woocommerce
|
25 |
* Domain Path: /languages
|
26 |
* Requires at least: 4.9
|
27 |
+
* Tested up to: 5.3
|
28 |
* WC requires at least: 3.5
|
29 |
+
* WC tested up to: 3.8
|
30 |
*/
|
31 |
|
32 |
// If this file is called directly, abort.
|