Version Description
Download this release
Release Info
Developer | constantcontact |
Plugin | Creative Mail – Easier WordPress & WooCommerce Email Marketing |
Version | 1.3.6 |
Comparing to | |
See all releases |
Code changes from version 1.3.5 to 1.3.6
- CHANGELOG.md +5 -0
- README.md +2 -1
- assets/css/admin.css +78 -0
- assets/images/woocommerce-banners/active-cm-wc.png +0 -0
- assets/images/woocommerce-banners/bg-blob.png +0 -0
- assets/images/woocommerce-banners/setup-cm-wc.png +0 -0
- assets/js/woocommerce_notice.js +31 -0
- creative-mail-plugin.php +7 -7
- readme.txt +3 -7
- src/integrations/Integration.php +14 -1
- src/managers/AdminManager.php +79 -21
- src/managers/EmailManager.php +15 -4
- src/managers/IntegrationManager.php +20 -16
- src/modules/contacts/Handlers/BaseContactFormPluginHandler.php +4 -6
- src/modules/contacts/Handlers/BlueHostBuilderPluginHandler.php +5 -6
- src/modules/contacts/Handlers/CalderaPluginHandler.php +1 -1
- src/modules/contacts/Handlers/ContactFormSevenPluginHandler.php +2 -5
- src/modules/contacts/Handlers/ElementorPluginHandler.php +1 -1
- src/modules/contacts/Handlers/FormidablePluginHandler.php +179 -0
- src/modules/contacts/Handlers/GravityFormsPluginHandler.php +2 -2
- src/modules/contacts/Handlers/JetpackPluginHandler.php +2 -2
- src/modules/contacts/Handlers/NinjaFormsPluginHandler.php +1 -1
- src/modules/contacts/Handlers/WpFormsPluginHandler.php +2 -2
- src/modules/contacts/Services/ContactsSyncService.php +1 -1
- src/modules/contacts/models/ContactModel.php +3 -2
- src/modules/woocommerce/emails/AbandonedCartEmail.php +32 -0
- src/views/admin-wc-notice/recovercart.php +13 -0
- src/views/admin-wc-notice/setup.php +13 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +2 -0
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +7 -5
CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 1.3.5 - March 22 2021
|
5 |
- Addresses two small issues where some relative URLs would not work for WP installs in subdirectories.
|
6 |
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 1.3.6 - May 11 2021
|
5 |
+
- Improvements for the WooCommerce integration.
|
6 |
+
- Add support for Formidable.
|
7 |
+
- Add support for Abandoned cart emails in WooCommerce.
|
8 |
+
|
9 |
#### 1.3.5 - March 22 2021
|
10 |
- Addresses two small issues where some relative URLs would not work for WP installs in subdirectories.
|
11 |
|
README.md
CHANGED
@@ -3,7 +3,7 @@ Contributors: Constant Contact
|
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.7
|
6 |
-
Stable tag: 1.3.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
@@ -90,6 +90,7 @@ Creative Mail by Constant Contact [Privacy Notice](https://www.endurance.com/pri
|
|
90 |
6. Enhance your brand with logomaker
|
91 |
|
92 |
== Changelog ==
|
|
|
93 |
* 1.3.5 - Addresses two small issues where some relative URLs would not work for WP installs in subdirectories.
|
94 |
* 1.3.4 - Improved initial contact sync: we can now import all your contacts without any limits!
|
95 |
* 1.3.3 - Direct access to Creative Mail features from the left side nav in WP Admin.
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.7
|
6 |
+
Stable tag: 1.3.6
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
90 |
6. Enhance your brand with logomaker
|
91 |
|
92 |
== Changelog ==
|
93 |
+
* 1.3.6 - Improved integrations with WooCommerce to support features like Abandoned Cart emails.
|
94 |
* 1.3.5 - Addresses two small issues where some relative URLs would not work for WP installs in subdirectories.
|
95 |
* 1.3.4 - Improved initial contact sync: we can now import all your contacts without any limits!
|
96 |
* 1.3.3 - Direct access to Creative Mail features from the left side nav in WP Admin.
|
assets/css/admin.css
CHANGED
@@ -1148,6 +1148,84 @@ p.ce4wp-subtitle {
|
|
1148 |
margin: 0 auto;
|
1149 |
}
|
1150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1151 |
.ce4wp-hidden {
|
1152 |
display: none;
|
1153 |
}
|
1148 |
margin: 0 auto;
|
1149 |
}
|
1150 |
|
1151 |
+
.ce4wp-notice {
|
1152 |
+
border-left: 0;
|
1153 |
+
background-repeat: no-repeat;
|
1154 |
+
background-size: contain;
|
1155 |
+
display: flex;
|
1156 |
+
height: 175px;
|
1157 |
+
position: relative;
|
1158 |
+
margin-right: var(--large-gap);
|
1159 |
+
margin-bottom: 20px;
|
1160 |
+
max-width: 100%;
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
.ce4wp-notice-primary {
|
1164 |
+
background-color: #7A5CBD;
|
1165 |
+
background-image: url(../images/woocommerce-banners/bg-blob.png);
|
1166 |
+
}
|
1167 |
+
|
1168 |
+
.ce4wp-notice-primary #close::before {
|
1169 |
+
color:white !important;
|
1170 |
+
}
|
1171 |
+
|
1172 |
+
.ce4wp-notice-secondary {
|
1173 |
+
background-color: #B5E5E7;
|
1174 |
+
background-image: url(../images/woocommerce-banners/bg-blob.png);
|
1175 |
+
padding: 0 0 0 50px;
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
.ce4wp-notice-secondary section h1 {
|
1179 |
+
color: black !important;
|
1180 |
+
}
|
1181 |
+
|
1182 |
+
.ce4wp-notice-secondary section p {
|
1183 |
+
color: black !important;
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
.ce4wp-notice img {
|
1187 |
+
max-height: 150px;
|
1188 |
+
margin-top: 25px;
|
1189 |
+
margin-left: 20px;
|
1190 |
+
}
|
1191 |
+
.ce4wp-notice section {
|
1192 |
+
margin-left: 40px;
|
1193 |
+
margin-top: 2px;
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
.ce4wp-notice section h1 {
|
1197 |
+
color:white;
|
1198 |
+
margin-top: 1em;
|
1199 |
+
}
|
1200 |
+
.ce4wp-notice section p {
|
1201 |
+
color:white;
|
1202 |
+
font-size: 17px;
|
1203 |
+
line-height: 1;
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
.ce4wp-notice section button {
|
1207 |
+
color:black !important;
|
1208 |
+
background: white !important;
|
1209 |
+
border-color: white !important;
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
.ce4wp-notice #close {
|
1213 |
+
width: 16px;
|
1214 |
+
height: 16px;
|
1215 |
+
margin-left: 0.3em;
|
1216 |
+
cursor: pointer;
|
1217 |
+
position: absolute;
|
1218 |
+
top: 10px;
|
1219 |
+
right: 10px;
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
.ce4wp-notice #close::before {
|
1223 |
+
color: #6f6f6f;
|
1224 |
+
font: 400 21px/1 dashicons;
|
1225 |
+
content: '\f158';
|
1226 |
+
}
|
1227 |
+
|
1228 |
+
|
1229 |
.ce4wp-hidden {
|
1230 |
display: none;
|
1231 |
}
|
assets/images/woocommerce-banners/active-cm-wc.png
ADDED
Binary file
|
assets/images/woocommerce-banners/bg-blob.png
ADDED
Binary file
|
assets/images/woocommerce-banners/setup-cm-wc.png
ADDED
Binary file
|
assets/js/woocommerce_notice.js
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WooCommerce notice javascript.
|
3 |
+
*
|
4 |
+
* @package CreativeMail
|
5 |
+
*/
|
6 |
+
|
7 |
+
jQuery(function($){
|
8 |
+
|
9 |
+
window.addEventListener('load', () => {
|
10 |
+
const parent = document.getElementById('woocommerce-layout__primary')
|
11 |
+
const wooNoticeList = document.getElementById('woocommerce-layout__notice-list')
|
12 |
+
|
13 |
+
const notice = document.getElementById('ce4wp-wc-dashboard-notice')
|
14 |
+
|
15 |
+
if ([parent, wooNoticeList, notice].some(element => element == null)) {
|
16 |
+
return
|
17 |
+
}
|
18 |
+
|
19 |
+
parent.insertBefore(notice, wooNoticeList);
|
20 |
+
});
|
21 |
+
|
22 |
+
});
|
23 |
+
|
24 |
+
function hideAdminWooCommerceNotice (banner) {
|
25 |
+
const el = document.querySelector('#ce4wp-wc-dashboard-notice')
|
26 |
+
el.hidden = true;
|
27 |
+
el.style.display = "none";
|
28 |
+
|
29 |
+
const { hide_banner_url } = ce4wp_data
|
30 |
+
fetch(`${hide_banner_url}${banner}`, { method: 'POST' })
|
31 |
+
}
|
creative-mail-plugin.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* Plugin URI: https://wordpress.org/plugins/creative-mail-by-constant-contact/
|
10 |
* Description: Free email marketing designed specifically for WordPress, Jetpack and WooCommerce. Send newsletters, promotions, updates and transactional e-commerce emails. Simple and easy, powered by Constant Contact’s rock solid reliability.
|
11 |
* Author: Constant Contact
|
12 |
-
* Version: 1.3.
|
13 |
* Author URI: https://www.constantcontact.com
|
14 |
* WC requires at least: 3.0.0
|
15 |
* WC tested up to: 5.1.0
|
@@ -26,7 +26,7 @@ function _load_ce4wp_plugin()
|
|
26 |
define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
|
27 |
define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
|
28 |
define('CE4WP_PLUGIN_FILE', __FILE__);
|
29 |
-
define('CE4WP_PLUGIN_VERSION', '1.3.
|
30 |
define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
|
31 |
define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
|
32 |
define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
|
@@ -43,7 +43,7 @@ function _load_ce4wp_plugin()
|
|
43 |
define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
|
44 |
define('CE4WP_APP_URL', 'https://app.creativemail.com/');
|
45 |
define('CE4WP_ENVIRONMENT', 'PRODUCTION');
|
46 |
-
define('CE4WP_BUILD_NUMBER', '
|
47 |
define('CE4WP_RAYGUN_PHP_KEY', 'Z85xL3mkgnW13Ri9DajGUg');
|
48 |
define('CE4WP_BATCH_SIZE', 500);
|
49 |
define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
|
@@ -62,13 +62,13 @@ function _load_ce4wp_plugin()
|
|
62 |
return true;
|
63 |
}
|
64 |
|
65 |
-
function
|
66 |
{
|
67 |
delete_option('ce4wp_activated');
|
68 |
delete_option('ce4wp_install_date');
|
69 |
}
|
70 |
|
71 |
-
function
|
72 |
{
|
73 |
add_option('ce4wp_activated', true);
|
74 |
add_option('ce4wp_install_date', date('Y-m-d G:i:s'), '', 'yes');
|
@@ -81,5 +81,5 @@ function activate()
|
|
81 |
}
|
82 |
|
83 |
add_action('plugins_loaded', '_load_ce4wp_plugin', 10);
|
84 |
-
register_activation_hook(__FILE__, '
|
85 |
-
register_deactivation_hook(__FILE__, '
|
9 |
* Plugin URI: https://wordpress.org/plugins/creative-mail-by-constant-contact/
|
10 |
* Description: Free email marketing designed specifically for WordPress, Jetpack and WooCommerce. Send newsletters, promotions, updates and transactional e-commerce emails. Simple and easy, powered by Constant Contact’s rock solid reliability.
|
11 |
* Author: Constant Contact
|
12 |
+
* Version: 1.3.6
|
13 |
* Author URI: https://www.constantcontact.com
|
14 |
* WC requires at least: 3.0.0
|
15 |
* WC tested up to: 5.1.0
|
26 |
define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
|
27 |
define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
|
28 |
define('CE4WP_PLUGIN_FILE', __FILE__);
|
29 |
+
define('CE4WP_PLUGIN_VERSION', '1.3.6');
|
30 |
define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
|
31 |
define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
|
32 |
define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
|
43 |
define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
|
44 |
define('CE4WP_APP_URL', 'https://app.creativemail.com/');
|
45 |
define('CE4WP_ENVIRONMENT', 'PRODUCTION');
|
46 |
+
define('CE4WP_BUILD_NUMBER', '1109');
|
47 |
define('CE4WP_RAYGUN_PHP_KEY', 'Z85xL3mkgnW13Ri9DajGUg');
|
48 |
define('CE4WP_BATCH_SIZE', 500);
|
49 |
define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
|
62 |
return true;
|
63 |
}
|
64 |
|
65 |
+
function ce4wp_deactivate()
|
66 |
{
|
67 |
delete_option('ce4wp_activated');
|
68 |
delete_option('ce4wp_install_date');
|
69 |
}
|
70 |
|
71 |
+
function ce4wp_activate()
|
72 |
{
|
73 |
add_option('ce4wp_activated', true);
|
74 |
add_option('ce4wp_install_date', date('Y-m-d G:i:s'), '', 'yes');
|
81 |
}
|
82 |
|
83 |
add_action('plugins_loaded', '_load_ce4wp_plugin', 10);
|
84 |
+
register_activation_hook(__FILE__, 'ce4wp_activate');
|
85 |
+
register_deactivation_hook(__FILE__, 'ce4wp_deactivate');
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Constant Contact
|
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.7
|
6 |
-
Stable tag: 1.3.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
@@ -95,14 +95,10 @@ Creative Mail by Constant Contact [Privacy Notice](https://www.endurance.com/pri
|
|
95 |
6. Enhance your brand with logomaker
|
96 |
|
97 |
== Changelog ==
|
|
|
98 |
* 1.3.5 - Addresses two small issues where some relative URLs would not work for WP installs in subdirectories.
|
99 |
* 1.3.4 - Improved initial contact sync: we can now import all your contacts without any limits!
|
100 |
* 1.3.3 - Direct access to Creative Mail features from the left side nav in WP Admin.
|
101 |
* 1.3.2 - Fixes an issue where the contact sync might cause a critical error.
|
102 |
* 1.3.1 - Add the ability to show the amount of recovered revenue via abandoned carts.
|
103 |
-
* 1.3.0 - Support for abandoned cart emails
|
104 |
-
* 1.2.4 - Introduces a 'Reset' button on the settings page for accounts that are stuck.
|
105 |
-
* 1.2.3 - Fixes an issue where the banner would show up again after being dismissed.
|
106 |
-
* 1.2.2 - Introduction of multi step automations and fixes a couple of small issues in the CreativeMail widgets
|
107 |
-
* 1.2.1 - Fixes an issue where some users would experience an issue where our UI was blocked by pop-up blockers.
|
108 |
-
* 1.2.0 - Context aware notifications, add support for Ninja forms, add support for Caldera forms
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.7
|
6 |
+
Stable tag: 1.3.6
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
95 |
6. Enhance your brand with logomaker
|
96 |
|
97 |
== Changelog ==
|
98 |
+
* 1.3.6 - Improved integrations with WooCommerce to support features like Abandoned Cart emails.
|
99 |
* 1.3.5 - Addresses two small issues where some relative URLs would not work for WP installs in subdirectories.
|
100 |
* 1.3.4 - Improved initial contact sync: we can now import all your contacts without any limits!
|
101 |
* 1.3.3 - Direct access to Creative Mail features from the left side nav in WP Admin.
|
102 |
* 1.3.2 - Fixes an issue where the contact sync might cause a critical error.
|
103 |
* 1.3.1 - Add the ability to show the amount of recovered revenue via abandoned carts.
|
104 |
+
* 1.3.0 - Support for abandoned cart emails
|
|
|
|
|
|
|
|
|
|
src/integrations/Integration.php
CHANGED
@@ -17,6 +17,7 @@ class Integration
|
|
17 |
private $slug;
|
18 |
private $hide_from_suggestions;
|
19 |
private $url;
|
|
|
20 |
|
21 |
/**
|
22 |
* Integration constructor.
|
@@ -27,8 +28,9 @@ class Integration
|
|
27 |
* @param $integration_handler string The name of the class that should be instantiated when this integration gets activated.
|
28 |
* @param $hide_from_suggestions boolean If you want to hide this plugin from the suggestion list, set this to true
|
29 |
* @param $url string The link to the plugin store, default will set it based on the slug
|
|
|
30 |
*/
|
31 |
-
public function __construct($slug, $name, $class, $integration_handler, $hide_from_suggestions, $url = null)
|
32 |
{
|
33 |
$this->slug = $slug;
|
34 |
$this->name = $name;
|
@@ -36,6 +38,7 @@ class Integration
|
|
36 |
$this->integrationHandler = $integration_handler;
|
37 |
$this->hide_from_suggestions = $hide_from_suggestions;
|
38 |
$this->url = is_null($url) ? "/wordpress/wp-admin/plugin-install.php?tab=plugin-information&plugin=$slug&TB_iframe=true&width=772&height=1144" : $url;
|
|
|
39 |
}
|
40 |
|
41 |
/**
|
@@ -97,4 +100,14 @@ class Integration
|
|
97 |
{
|
98 |
return $this->url;
|
99 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
17 |
private $slug;
|
18 |
private $hide_from_suggestions;
|
19 |
private $url;
|
20 |
+
private $has_multiple_plugins;
|
21 |
|
22 |
/**
|
23 |
* Integration constructor.
|
28 |
* @param $integration_handler string The name of the class that should be instantiated when this integration gets activated.
|
29 |
* @param $hide_from_suggestions boolean If you want to hide this plugin from the suggestion list, set this to true
|
30 |
* @param $url string The link to the plugin store, default will set it based on the slug
|
31 |
+
* @param $has_multiple_plugins boolean If true the plugin will search using the basename (some plugins have different directories depending on license)
|
32 |
*/
|
33 |
+
public function __construct($slug, $name, $class, $integration_handler, $hide_from_suggestions, $url = null, $has_multiple_plugins = false)
|
34 |
{
|
35 |
$this->slug = $slug;
|
36 |
$this->name = $name;
|
38 |
$this->integrationHandler = $integration_handler;
|
39 |
$this->hide_from_suggestions = $hide_from_suggestions;
|
40 |
$this->url = is_null($url) ? "/wordpress/wp-admin/plugin-install.php?tab=plugin-information&plugin=$slug&TB_iframe=true&width=772&height=1144" : $url;
|
41 |
+
$this->has_multiple_plugins = $has_multiple_plugins;
|
42 |
}
|
43 |
|
44 |
/**
|
100 |
{
|
101 |
return $this->url;
|
102 |
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Use basename if integration has multiple plugins with different directories
|
106 |
+
*
|
107 |
+
* @return bool
|
108 |
+
*/
|
109 |
+
public function use_basename()
|
110 |
+
{
|
111 |
+
return $this->has_multiple_plugins;
|
112 |
+
}
|
113 |
}
|
src/managers/AdminManager.php
CHANGED
@@ -35,7 +35,9 @@ class AdminManager
|
|
35 |
const ADMIN_AJAX_NONCE = 'ajax-nonce';
|
36 |
const ADMIN_NONCE = 'nonce';
|
37 |
|
|
|
38 |
const DOMAIN_CE4WP = 'ce4wp';
|
|
|
39 |
|
40 |
/**
|
41 |
* AdminManager constructor.
|
@@ -64,9 +66,13 @@ class AdminManager
|
|
64 |
add_action(self::ADMIN_MENU_HOOK, array( $this, 'build_menu' ));
|
65 |
add_action(self::ADMIN_ENQUEUE_SCRIPTS_HOOK, array( $this, 'add_assets' ));
|
66 |
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_notice_permalink' ));
|
|
|
|
|
|
|
67 |
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_notice_review' ));
|
68 |
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_get_started_banner' ));
|
69 |
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_feedback_notice' ));
|
|
|
70 |
add_action(self::ADMIN_INIT_HOOK, array($this, 'activation_redirect' ));
|
71 |
add_action(self::ADMIN_INIT_HOOK, array($this, 'ignore_review_notice' ));
|
72 |
|
@@ -101,20 +107,13 @@ class AdminManager
|
|
101 |
return wp_create_nonce(self::ADMIN_AJAX_NONCE);
|
102 |
}
|
103 |
|
104 |
-
function
|
105 |
-
{
|
106 |
-
// Check for nonce security
|
107 |
-
$this->check_nonce();
|
108 |
-
|
109 |
-
$linkReference = array_key_exists('link_reference', $_POST) ? $_POST['link_reference'] : null;
|
110 |
-
$linkParameters = array_key_exists('link_parameters', $_POST) ? $_POST['link_parameters'] : null;
|
111 |
-
|
112 |
$sso = $this->get_sso_link($linkReference, $linkParameters);
|
113 |
|
114 |
-
|
115 |
-
|
|
|
116 |
|
117 |
-
if (is_null($sso)) {
|
118 |
$redirectUrl = EnvironmentHelper::get_app_gateway_url('wordpress/v1.0/instances/open?clearSession=true&redirectUrl=');
|
119 |
$onboardingUrl = EnvironmentHelper::get_app_url() . 'marketing/onboarding/signup?wp_site_name=' . $this->instance_name
|
120 |
. '&wp_site_uuid=' . $this->instance_uuid
|
@@ -122,7 +121,10 @@ class AdminManager
|
|
122 |
. '&wp_callback_url=' . $this->instance_callback_url
|
123 |
. '&wp_instance_url=' . $this->instance_url
|
124 |
. '&wp_version=' . get_bloginfo('version')
|
125 |
-
. '&plugin_version=' . CE4WP_PLUGIN_VERSION
|
|
|
|
|
|
|
126 |
$referred_by = OptionsHelper::get_referred_by();
|
127 |
if (isset($referred_by)) {
|
128 |
$utm_campaign = '';
|
@@ -133,8 +135,22 @@ class AdminManager
|
|
133 |
}
|
134 |
$onboardingUrl .= '&utm_source=wordpress&utm_medium=plugin&utm_campaign=' . $utm_campaign;
|
135 |
}
|
136 |
-
|
137 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
wp_send_json_success($response);
|
139 |
}
|
140 |
|
@@ -193,7 +209,7 @@ class AdminManager
|
|
193 |
return;
|
194 |
}
|
195 |
wp_enqueue_script('ce4wp_deactivate_survey', CE4WP_PLUGIN_URL.'assets/js/deactivation.js', null,null,true);
|
196 |
-
wp_localize_script('ce4wp_deactivate_survey',
|
197 |
'url' => admin_url('admin-ajax.php'),
|
198 |
'nonce' => $this->create_nonce()
|
199 |
));
|
@@ -270,7 +286,7 @@ class AdminManager
|
|
270 |
|
271 |
/* translators: text. */
|
272 |
printf(
|
273 |
-
__('Awesome, you\'ve been using <a href="admin.php?page=creativemail">Creative Mail</a> for more than 1 week. May we ask you to give it a 5-star rating on WordPress? | <a href="%2$s" target="_blank">Ok, you deserved it</a> | <a href="%1$s">I already did</a> | <a href="%1$s">No, not good enough</a>',
|
274 |
'https://wordpress.org/plugins/creative-mail-by-constant-contact/'
|
275 |
);
|
276 |
echo "</p></div>";
|
@@ -313,6 +329,42 @@ class AdminManager
|
|
313 |
return $footer_text;
|
314 |
}
|
315 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
316 |
|
317 |
function is_cm_screen_and_show_footer() {
|
318 |
$screen = get_current_screen();
|
@@ -436,25 +488,31 @@ class AdminManager
|
|
436 |
|
437 |
//add woocommerce sub menu page
|
438 |
add_submenu_page(
|
439 |
-
|
440 |
esc_html__('Creative Mail', self::DOMAIN_CE4WP),
|
441 |
esc_html__('Creative Mail', self::DOMAIN_CE4WP),
|
442 |
'manage_woocommerce',
|
443 |
'ce4wp-woo-settings',
|
444 |
-
|
445 |
);
|
446 |
}
|
447 |
|
448 |
public function add_admin_notice_permalink()
|
449 |
{
|
450 |
-
if (CreativeMail::get_instance()->get_integration_manager()->is_plugin_active(
|
451 |
if (! CreativeMail::get_instance()->get_integration_manager()->get_permalinks_enabled() ) {
|
452 |
-
print( '<div class="notice notice-error is-dismissible"><p>Ohoh, pretty permalinks are disabled. To enable the CreativeMail WooCommerce integration <a href="/wp-admin/options-permalink.php">please update your permalink settings</a>.</p></div>');
|
453 |
return;
|
454 |
}
|
455 |
}
|
456 |
}
|
457 |
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
public function add_admin_get_started_banner()
|
459 |
{
|
460 |
$ce_has_account = OptionsHelper::get_instance_id() != null;
|
@@ -482,7 +540,7 @@ class AdminManager
|
|
482 |
{
|
483 |
$widget_title = wp_kses(
|
484 |
/* translators: Placeholder is a CreativeMail logo. */
|
485 |
-
__( 'Email Marketing <span class="floater">By<div class="ce4wp_dashboard_icon"></div></span>',
|
486 |
array( 'span' => array( 'class' => array() ), 'div' => array( 'class' => array() ) )
|
487 |
);
|
488 |
|
@@ -520,7 +578,7 @@ class AdminManager
|
|
520 |
|
521 |
private function enqueue_dashboard_js() {
|
522 |
wp_enqueue_script('ce4wp_dashboard', CE4WP_PLUGIN_URL.'assets/js/dashboard.js', 'jquery',CE4WP_PLUGIN_VERSION);
|
523 |
-
wp_localize_script('ce4wp_dashboard',
|
524 |
'url' => admin_url('admin-ajax.php'),
|
525 |
'nonce' => $this->create_nonce()
|
526 |
));
|
35 |
const ADMIN_AJAX_NONCE = 'ajax-nonce';
|
36 |
const ADMIN_NONCE = 'nonce';
|
37 |
|
38 |
+
const ADMIN_WOOCOMMERCE = 'woocommerce';
|
39 |
const DOMAIN_CE4WP = 'ce4wp';
|
40 |
+
const ADMIN_CE4WP_DATA_VAR = 'ce4wp_data';
|
41 |
|
42 |
/**
|
43 |
* AdminManager constructor.
|
66 |
add_action(self::ADMIN_MENU_HOOK, array( $this, 'build_menu' ));
|
67 |
add_action(self::ADMIN_ENQUEUE_SCRIPTS_HOOK, array( $this, 'add_assets' ));
|
68 |
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_notice_permalink' ));
|
69 |
+
if (in_array('password-protected/password-protected.php', apply_filters('active_plugins', get_option('active_plugins')))) {
|
70 |
+
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_notice_password_protected'));
|
71 |
+
}
|
72 |
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_notice_review' ));
|
73 |
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_get_started_banner' ));
|
74 |
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_feedback_notice' ));
|
75 |
+
add_action(self::ADMIN_NOTICES_HOOK, array($this, 'add_admin_woocommerce_banner' ));
|
76 |
add_action(self::ADMIN_INIT_HOOK, array($this, 'activation_redirect' ));
|
77 |
add_action(self::ADMIN_INIT_HOOK, array($this, 'ignore_review_notice' ));
|
78 |
|
107 |
return wp_create_nonce(self::ADMIN_AJAX_NONCE);
|
108 |
}
|
109 |
|
110 |
+
function request_single_sign_on_url_internal($linkReference = null, $linkParameters = null) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
$sso = $this->get_sso_link($linkReference, $linkParameters);
|
112 |
|
113 |
+
if (is_null($sso))
|
114 |
+
{
|
115 |
+
$current_user = wp_get_current_user();
|
116 |
|
|
|
117 |
$redirectUrl = EnvironmentHelper::get_app_gateway_url('wordpress/v1.0/instances/open?clearSession=true&redirectUrl=');
|
118 |
$onboardingUrl = EnvironmentHelper::get_app_url() . 'marketing/onboarding/signup?wp_site_name=' . $this->instance_name
|
119 |
. '&wp_site_uuid=' . $this->instance_uuid
|
121 |
. '&wp_callback_url=' . $this->instance_callback_url
|
122 |
. '&wp_instance_url=' . $this->instance_url
|
123 |
. '&wp_version=' . get_bloginfo('version')
|
124 |
+
. '&plugin_version=' . CE4WP_PLUGIN_VERSION
|
125 |
+
. '&first_name=' . urlencode( $current_user->user_firstname )
|
126 |
+
. '&last_name=' . urlencode( $current_user->user_lastname )
|
127 |
+
. '&email=' . urlencode( $current_user->user_email );
|
128 |
$referred_by = OptionsHelper::get_referred_by();
|
129 |
if (isset($referred_by)) {
|
130 |
$utm_campaign = '';
|
135 |
}
|
136 |
$onboardingUrl .= '&utm_source=wordpress&utm_medium=plugin&utm_campaign=' . $utm_campaign;
|
137 |
}
|
138 |
+
return $redirectUrl . rawurlencode($onboardingUrl);
|
139 |
}
|
140 |
+
return $sso;
|
141 |
+
}
|
142 |
+
|
143 |
+
function request_single_sign_on_url()
|
144 |
+
{
|
145 |
+
// Check for nonce security
|
146 |
+
$this->check_nonce();
|
147 |
+
|
148 |
+
$linkReference = array_key_exists('link_reference', $_POST) ? $_POST['link_reference'] : null;
|
149 |
+
$linkParameters = array_key_exists('link_parameters', $_POST) ? $_POST['link_parameters'] : null;
|
150 |
+
|
151 |
+
$response = new stdClass();
|
152 |
+
$response->url = $this->request_single_sign_on_url_internal($linkReference, $linkParameters);
|
153 |
+
|
154 |
wp_send_json_success($response);
|
155 |
}
|
156 |
|
209 |
return;
|
210 |
}
|
211 |
wp_enqueue_script('ce4wp_deactivate_survey', CE4WP_PLUGIN_URL.'assets/js/deactivation.js', null,null,true);
|
212 |
+
wp_localize_script('ce4wp_deactivate_survey', self::ADMIN_CE4WP_DATA_VAR, array(
|
213 |
'url' => admin_url('admin-ajax.php'),
|
214 |
'nonce' => $this->create_nonce()
|
215 |
));
|
286 |
|
287 |
/* translators: text. */
|
288 |
printf(
|
289 |
+
__('Awesome, you\'ve been using <a href="admin.php?page=creativemail">Creative Mail</a> for more than 1 week. May we ask you to give it a 5-star rating on WordPress? | <a href="%2$s" target="_blank">Ok, you deserved it</a> | <a href="%1$s">I already did</a> | <a href="%1$s">No, not good enough</a>', self::DOMAIN_CE4WP), '?ce4wp-ignore-notice=0',
|
290 |
'https://wordpress.org/plugins/creative-mail-by-constant-contact/'
|
291 |
);
|
292 |
echo "</p></div>";
|
329 |
return $footer_text;
|
330 |
}
|
331 |
|
332 |
+
function add_admin_woocommerce_banner() {
|
333 |
+
$screen = get_current_screen();
|
334 |
+
if ($screen->id === 'woocommerce_page_wc-admin') {
|
335 |
+
wp_enqueue_script('ce4wp_woocommerce_notice', CE4WP_PLUGIN_URL.'assets/js/woocommerce_notice.js', null,CE4WP_PLUGIN_VERSION,true);
|
336 |
+
wp_localize_script('ce4wp_woocommerce_notice', self::ADMIN_CE4WP_DATA_VAR, array(
|
337 |
+
'url' => admin_url('admin-ajax.php'),
|
338 |
+
'nonce' => wp_create_nonce('ajax-nonce'),
|
339 |
+
'hide_banner_url' => get_rest_url( null, 'creativemail/v1/hide_banner?banner=' ),
|
340 |
+
));
|
341 |
+
|
342 |
+
$ce_has_account = OptionsHelper::get_instance_id() != null;
|
343 |
+
if ( !$ce_has_account ) {
|
344 |
+
if (OptionsHelper::get_hide_banner('woocommerce_dashboard_setup_notice')) {
|
345 |
+
return;
|
346 |
+
}
|
347 |
+
|
348 |
+
include CE4WP_PLUGIN_DIR . 'src/views/admin-wc-notice/setup.php';
|
349 |
+
return;
|
350 |
+
}
|
351 |
+
if (OptionsHelper::get_hide_banner('woocommerce_abandoned_cart_notice')) {
|
352 |
+
return;
|
353 |
+
}
|
354 |
+
|
355 |
+
$email_manager = CreativeMail::get_instance()->get_email_manager();
|
356 |
+
$supported_email_notifications = $email_manager->get_managed_email_notifications();
|
357 |
+
$active_email_notifications = array_filter($supported_email_notifications, function ($email_notification) {
|
358 |
+
return $email_notification->active === true;
|
359 |
+
});
|
360 |
+
// if number of active template is zero then show banner
|
361 |
+
$number_of_active_notifications = count($active_email_notifications);
|
362 |
+
if ($number_of_active_notifications === 0) {
|
363 |
+
include CE4WP_PLUGIN_DIR . 'src/views/admin-wc-notice/recovercart.php';
|
364 |
+
}
|
365 |
+
}
|
366 |
+
}
|
367 |
+
|
368 |
|
369 |
function is_cm_screen_and_show_footer() {
|
370 |
$screen = get_current_screen();
|
488 |
|
489 |
//add woocommerce sub menu page
|
490 |
add_submenu_page(
|
491 |
+
self::ADMIN_WOOCOMMERCE,
|
492 |
esc_html__('Creative Mail', self::DOMAIN_CE4WP),
|
493 |
esc_html__('Creative Mail', self::DOMAIN_CE4WP),
|
494 |
'manage_woocommerce',
|
495 |
'ce4wp-woo-settings',
|
496 |
+
$main_action
|
497 |
);
|
498 |
}
|
499 |
|
500 |
public function add_admin_notice_permalink()
|
501 |
{
|
502 |
+
if (CreativeMail::get_instance()->get_integration_manager()->is_plugin_active(self::ADMIN_WOOCOMMERCE)) {
|
503 |
if (! CreativeMail::get_instance()->get_integration_manager()->get_permalinks_enabled() ) {
|
504 |
+
print( '<div class="notice notice-error is-dismissible"><p>'. esc_html__('Ohoh, pretty permalinks are disabled. To enable the CreativeMail WooCommerce integration', self::DOMAIN_CE4WP) .' <a href="/wp-admin/options-permalink.php">'. esc_html__('please update your permalink settings', self::DOMAIN_CE4WP) .'</a>.</p></div>');
|
505 |
return;
|
506 |
}
|
507 |
}
|
508 |
}
|
509 |
|
510 |
+
public function add_admin_notice_password_protected()
|
511 |
+
{
|
512 |
+
print( '<div class="notice notice-error is-dismissible"><p>'. esc_html__('We see that you have the Password Protected plugin installed and activated on your WordPress site. While this plugin is active, CreativeMail wont be able to complete the setup since the Password Protected plugin is prohibiting us from interacting with your WordPress site.', self::DOMAIN_CE4WP) .' '. esc_html__('Please disable this plugin to start using CreativeMail.', self::DOMAIN_CE4WP) .'</p></div>');
|
513 |
+
return;
|
514 |
+
}
|
515 |
+
|
516 |
public function add_admin_get_started_banner()
|
517 |
{
|
518 |
$ce_has_account = OptionsHelper::get_instance_id() != null;
|
540 |
{
|
541 |
$widget_title = wp_kses(
|
542 |
/* translators: Placeholder is a CreativeMail logo. */
|
543 |
+
__( 'Email Marketing <span class="floater">By<div class="ce4wp_dashboard_icon"></div></span>', self::DOMAIN_CE4WP),
|
544 |
array( 'span' => array( 'class' => array() ), 'div' => array( 'class' => array() ) )
|
545 |
);
|
546 |
|
578 |
|
579 |
private function enqueue_dashboard_js() {
|
580 |
wp_enqueue_script('ce4wp_dashboard', CE4WP_PLUGIN_URL.'assets/js/dashboard.js', 'jquery',CE4WP_PLUGIN_VERSION);
|
581 |
+
wp_localize_script('ce4wp_dashboard', self::ADMIN_CE4WP_DATA_VAR, array(
|
582 |
'url' => admin_url('admin-ajax.php'),
|
583 |
'nonce' => $this->create_nonce()
|
584 |
));
|
src/managers/EmailManager.php
CHANGED
@@ -4,9 +4,9 @@
|
|
4 |
namespace CreativeMail\Managers;
|
5 |
|
6 |
use CreativeMail\CreativeMail;
|
|
|
7 |
use CreativeMail\Helpers\EnvironmentHelper;
|
8 |
use CreativeMail\Helpers\OptionsHelper;
|
9 |
-
use CreativeMail\Modules\Api\Models\ApiRequestItem;
|
10 |
use stdClass;
|
11 |
|
12 |
/**
|
@@ -78,9 +78,18 @@ class EmailManager
|
|
78 |
add_filter('woocommerce_after_order_notes', array($this, 'add_checkout_field'));
|
79 |
add_action('woocommerce_checkout_update_order_meta', array($this, 'ce_checkout_order_meta'));
|
80 |
}
|
|
|
|
|
81 |
}
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
public function ce_checkout_order_meta( $order_id )
|
85 |
{
|
86 |
if (isset($_POST[self::CHECKOUT_CONSENT_CHECKBOX_ID])) {
|
@@ -193,6 +202,8 @@ class EmailManager
|
|
193 |
|
194 |
if ($this->is_email_managed($email->id) ) {
|
195 |
echo '<span class="status-creativemail tips" data-tip="' . esc_attr__('Managed by Creative Mail', 'ce4wp') . '">' . esc_html__('Managed by CreativeMail', 'ce4wp') . '</span>';
|
|
|
|
|
196 |
} elseif ($email->is_manual() ) {
|
197 |
echo '<span class="status-manual tips" data-tip="' . esc_attr__('Manually sent', 'woocommerce') . '">' . esc_html__('Manual', 'woocommerce') . '</span>';
|
198 |
} elseif ($email->is_enabled() ) {
|
@@ -663,9 +674,9 @@ class EmailManager
|
|
663 |
*/
|
664 |
public function redirect_managed_email_settings_to_creative_mail( $email )
|
665 |
{
|
666 |
-
|
667 |
-
|
668 |
-
wp_redirect(
|
669 |
exit;
|
670 |
}
|
671 |
}
|
4 |
namespace CreativeMail\Managers;
|
5 |
|
6 |
use CreativeMail\CreativeMail;
|
7 |
+
use CreativeMail\Modules\Woocommerce\Emails\AbandonedCartEmail;
|
8 |
use CreativeMail\Helpers\EnvironmentHelper;
|
9 |
use CreativeMail\Helpers\OptionsHelper;
|
|
|
10 |
use stdClass;
|
11 |
|
12 |
/**
|
78 |
add_filter('woocommerce_after_order_notes', array($this, 'add_checkout_field'));
|
79 |
add_action('woocommerce_checkout_update_order_meta', array($this, 'ce_checkout_order_meta'));
|
80 |
}
|
81 |
+
// Modify emails emails.
|
82 |
+
add_filter( 'woocommerce_email_classes', array( $this, 'add_emails' ), 20 );
|
83 |
}
|
84 |
}
|
85 |
|
86 |
+
public function add_emails( $email_classes ) {
|
87 |
+
// Add fake email
|
88 |
+
$email_classes['AbandonedCartEmail'] = new AbandonedCartEmail( $email_classes );
|
89 |
+
|
90 |
+
return $email_classes;
|
91 |
+
}
|
92 |
+
|
93 |
public function ce_checkout_order_meta( $order_id )
|
94 |
{
|
95 |
if (isset($_POST[self::CHECKOUT_CONSENT_CHECKBOX_ID])) {
|
202 |
|
203 |
if ($this->is_email_managed($email->id) ) {
|
204 |
echo '<span class="status-creativemail tips" data-tip="' . esc_attr__('Managed by Creative Mail', 'ce4wp') . '">' . esc_html__('Managed by CreativeMail', 'ce4wp') . '</span>';
|
205 |
+
} elseif($email->id === 'cart_abandoned_ce4wp') {
|
206 |
+
echo '<span class="status-disabled tips" data-tip="' . esc_attr__('Disabled', 'woocommerce') . '">-</span>';
|
207 |
} elseif ($email->is_manual() ) {
|
208 |
echo '<span class="status-manual tips" data-tip="' . esc_attr__('Manually sent', 'woocommerce') . '">' . esc_html__('Manual', 'woocommerce') . '</span>';
|
209 |
} elseif ($email->is_enabled() ) {
|
674 |
*/
|
675 |
public function redirect_managed_email_settings_to_creative_mail( $email )
|
676 |
{
|
677 |
+
if ($this->is_email_managed($email->id) || $email->id === 'cart_abandoned_ce4wp') {
|
678 |
+
$url = CreativeMail::get_instance()->get_admin_manager()->request_single_sign_on_url_internal("1fabdbe2-95ed-4e1e-a2f3-ba0278f5096f");
|
679 |
+
wp_redirect($url);
|
680 |
exit;
|
681 |
}
|
682 |
}
|
src/managers/IntegrationManager.php
CHANGED
@@ -8,6 +8,7 @@ use CreativeMail\Integrations\Integration;
|
|
8 |
use CreativeMail\Modules\Contacts\Handlers\BlueHostBuilderPluginHandler;
|
9 |
use CreativeMail\Modules\Contacts\Handlers\ContactFormSevenPluginHandler;
|
10 |
use CreativeMail\Modules\Contacts\Handlers\ElementorPluginHandler;
|
|
|
11 |
use CreativeMail\Modules\Contacts\Handlers\GravityFormsPluginHandler;
|
12 |
use CreativeMail\Modules\Contacts\Handlers\NewsLetterContactFormPluginHandler;
|
13 |
use CreativeMail\Modules\Contacts\Handlers\WooCommercePluginHandler;
|
@@ -46,7 +47,8 @@ class IntegrationManager
|
|
46 |
new Integration('elementor', 'Elementor', 'elementor/elementor.php', ElementorPluginHandler::class, false),
|
47 |
new Integration('ninjaforms', 'Ninja Forms', 'ninja-forms/ninja-forms.php', NinjaFormsPluginHandler::class, false, '/wordpress/wp-admin/plugin-install.php?tab=plugin-information&plugin=ninja-forms&TB_iframe=true&width=772&height=1144'),
|
48 |
new Integration('caldera', 'Caldera Forms', 'caldera-forms/caldera-core.php', CalderaPluginHandler::class, false, '/wordpress/wp-admin/plugin-install.php?tab=plugin-information&plugin=caldera-forms&TB_iframe=true&width=772&height=1144'),
|
49 |
-
new Integration('bluehost', 'Bluehost Builder', 'wb4wp-wordpress-plugin-bluehost/wb4wp-plugin.php', BlueHostBuilderPluginHandler::class, false, 'https://www.bluehost.com/')
|
|
|
50 |
);
|
51 |
}
|
52 |
|
@@ -57,14 +59,12 @@ class IntegrationManager
|
|
57 |
{
|
58 |
$active_plugins = array_filter(
|
59 |
$this->get_active_plugins(), function ($item) {
|
60 |
-
|
61 |
-
|
62 |
);
|
63 |
|
64 |
-
foreach ($active_plugins as $active_plugin)
|
65 |
-
|
66 |
-
try
|
67 |
-
{
|
68 |
if (array_key_exists($active_plugin->get_slug(), $this->active_integrations) === false) {
|
69 |
// use reflection to create instance of class
|
70 |
$class = new ReflectionClass($active_plugin->get_integration_handler());
|
@@ -83,7 +83,7 @@ class IntegrationManager
|
|
83 |
*/
|
84 |
public function remove_hooks()
|
85 |
{
|
86 |
-
foreach($this->active_integrations as $active_integration){
|
87 |
$active_integration->unregisterHooks();
|
88 |
}
|
89 |
}
|
@@ -99,9 +99,12 @@ class IntegrationManager
|
|
99 |
$activated_plugins = array();
|
100 |
|
101 |
foreach ($this->supported_integrations as $integration) {
|
|
|
|
|
|
|
102 |
|
103 |
// Check if the plugin is activated
|
104 |
-
if (in_array($integration->get_class(),
|
105 |
array_push($activated_plugins, $integration);
|
106 |
}
|
107 |
}
|
@@ -111,7 +114,7 @@ class IntegrationManager
|
|
111 |
|
112 |
public function is_plugin_active($slug)
|
113 |
{
|
114 |
-
|
115 |
}
|
116 |
|
117 |
/**
|
@@ -158,8 +161,8 @@ class IntegrationManager
|
|
158 |
{
|
159 |
return array_filter(
|
160 |
$this->get_active_plugins(), function ($item) {
|
161 |
-
|
162 |
-
|
163 |
);
|
164 |
}
|
165 |
|
@@ -170,13 +173,14 @@ class IntegrationManager
|
|
170 |
*/
|
171 |
private function get_not_installed()
|
172 |
{
|
173 |
-
|
174 |
$supported_plugins = array();
|
175 |
-
|
176 |
foreach ($this->supported_integrations as $integration) {
|
|
|
|
|
|
|
177 |
|
178 |
// Check if the plugin is activated
|
179 |
-
if (!in_array($integration->get_class(),
|
180 |
array_push($supported_plugins, $integration);
|
181 |
}
|
182 |
}
|
@@ -191,7 +195,7 @@ class IntegrationManager
|
|
191 |
*/
|
192 |
public function get_supported_integrations($filter_on_already_installed = false)
|
193 |
{
|
194 |
-
if($filter_on_already_installed) {
|
195 |
return $this->get_not_installed();
|
196 |
}
|
197 |
return $this->supported_integrations;
|
8 |
use CreativeMail\Modules\Contacts\Handlers\BlueHostBuilderPluginHandler;
|
9 |
use CreativeMail\Modules\Contacts\Handlers\ContactFormSevenPluginHandler;
|
10 |
use CreativeMail\Modules\Contacts\Handlers\ElementorPluginHandler;
|
11 |
+
use CreativeMail\Modules\Contacts\Handlers\FormidablePluginHandler;
|
12 |
use CreativeMail\Modules\Contacts\Handlers\GravityFormsPluginHandler;
|
13 |
use CreativeMail\Modules\Contacts\Handlers\NewsLetterContactFormPluginHandler;
|
14 |
use CreativeMail\Modules\Contacts\Handlers\WooCommercePluginHandler;
|
47 |
new Integration('elementor', 'Elementor', 'elementor/elementor.php', ElementorPluginHandler::class, false),
|
48 |
new Integration('ninjaforms', 'Ninja Forms', 'ninja-forms/ninja-forms.php', NinjaFormsPluginHandler::class, false, '/wordpress/wp-admin/plugin-install.php?tab=plugin-information&plugin=ninja-forms&TB_iframe=true&width=772&height=1144'),
|
49 |
new Integration('caldera', 'Caldera Forms', 'caldera-forms/caldera-core.php', CalderaPluginHandler::class, false, '/wordpress/wp-admin/plugin-install.php?tab=plugin-information&plugin=caldera-forms&TB_iframe=true&width=772&height=1144'),
|
50 |
+
new Integration('bluehost', 'Bluehost Builder', 'wb4wp-wordpress-plugin-bluehost/wb4wp-plugin.php', BlueHostBuilderPluginHandler::class, false, 'https://www.bluehost.com/'),
|
51 |
+
new Integration('formidable', 'Formidable', 'formidable/formidable.php', FormidablePluginHandler::class, false, '/wordpress/wp-admin/plugin-install.php?tab=plugin-information&plugin=formidable&TB_iframe=true&width=772&height=1144\'')
|
52 |
);
|
53 |
}
|
54 |
|
59 |
{
|
60 |
$active_plugins = array_filter(
|
61 |
$this->get_active_plugins(), function ($item) {
|
62 |
+
return array_search($item->get_slug(), $this->get_activated_plugins(), true) !== false;
|
63 |
+
}
|
64 |
);
|
65 |
|
66 |
+
foreach ($active_plugins as $active_plugin) {
|
67 |
+
try {
|
|
|
|
|
68 |
if (array_key_exists($active_plugin->get_slug(), $this->active_integrations) === false) {
|
69 |
// use reflection to create instance of class
|
70 |
$class = new ReflectionClass($active_plugin->get_integration_handler());
|
83 |
*/
|
84 |
public function remove_hooks()
|
85 |
{
|
86 |
+
foreach ($this->active_integrations as $active_integration) {
|
87 |
$active_integration->unregisterHooks();
|
88 |
}
|
89 |
}
|
99 |
$activated_plugins = array();
|
100 |
|
101 |
foreach ($this->supported_integrations as $integration) {
|
102 |
+
$activePlugins = $integration->use_basename()
|
103 |
+
? array_map('basename', apply_filters('active_plugins', get_option('active_plugins')))
|
104 |
+
: apply_filters('active_plugins', get_option('active_plugins'));
|
105 |
|
106 |
// Check if the plugin is activated
|
107 |
+
if (in_array($integration->get_class(), $activePlugins)) {
|
108 |
array_push($activated_plugins, $integration);
|
109 |
}
|
110 |
}
|
114 |
|
115 |
public function is_plugin_active($slug)
|
116 |
{
|
117 |
+
return array_key_exists($slug, $this->active_integrations);
|
118 |
}
|
119 |
|
120 |
/**
|
161 |
{
|
162 |
return array_filter(
|
163 |
$this->get_active_plugins(), function ($item) {
|
164 |
+
return array_search($item->get_slug(), $this->get_activated_plugins(), true) !== false;
|
165 |
+
}
|
166 |
);
|
167 |
}
|
168 |
|
173 |
*/
|
174 |
private function get_not_installed()
|
175 |
{
|
|
|
176 |
$supported_plugins = array();
|
|
|
177 |
foreach ($this->supported_integrations as $integration) {
|
178 |
+
$activePlugins = $integration->use_basename()
|
179 |
+
? array_map('basename', apply_filters('active_plugins', get_option('active_plugins')))
|
180 |
+
: apply_filters('active_plugins', get_option('active_plugins'));
|
181 |
|
182 |
// Check if the plugin is activated
|
183 |
+
if (!in_array($integration->get_class(), $activePlugins)) {
|
184 |
array_push($supported_plugins, $integration);
|
185 |
}
|
186 |
}
|
195 |
*/
|
196 |
public function get_supported_integrations($filter_on_already_installed = false)
|
197 |
{
|
198 |
+
if ($filter_on_already_installed) {
|
199 |
return $this->get_not_installed();
|
200 |
}
|
201 |
return $this->supported_integrations;
|
src/modules/contacts/Handlers/BaseContactFormPluginHandler.php
CHANGED
@@ -14,15 +14,14 @@ abstract class BaseContactFormPluginHandler
|
|
14 |
public abstract function unregisterHooks();
|
15 |
public abstract function get_contacts($limit = null);
|
16 |
|
17 |
-
protected $birthdayFields = array('birthday', 'date-of-birth', 'date_of_birth', 'birth_date', 'birth-date');
|
18 |
-
protected $phoneFields = array('phone', 'phone_number', 'telephone', 'tel', 'tel-number', 'tel_number', 'mobile_number');
|
19 |
protected $emailFields = array('your-email', 'email', 'e-mail', 'emailaddress', 'email_address', 'email address', 'email-address', 'e-mail address');
|
20 |
-
|
21 |
-
|
22 |
|
23 |
public function upsertContact($model)
|
24 |
{
|
25 |
-
|
26 |
if (!isset($model)) {
|
27 |
throw new Exception('No model provided');
|
28 |
}
|
@@ -34,7 +33,6 @@ abstract class BaseContactFormPluginHandler
|
|
34 |
else {
|
35 |
$contactModel = $model;
|
36 |
}
|
37 |
-
|
38 |
$this->contactSyncService->upsertContact($contactModel);
|
39 |
}
|
40 |
|
14 |
public abstract function unregisterHooks();
|
15 |
public abstract function get_contacts($limit = null);
|
16 |
|
17 |
+
protected $birthdayFields = array('birthday', 'date-of-birth', 'date_of_birth', 'birth_date', 'birth-date', 'birth date', 'birth day', 'date of birth');
|
18 |
+
protected $phoneFields = array('phone', 'phone_number', 'telephone', 'tel', 'tel-number', 'tel_number', 'mobile_number', 'mobile number', 'phone number');
|
19 |
protected $emailFields = array('your-email', 'email', 'e-mail', 'emailaddress', 'email_address', 'email address', 'email-address', 'e-mail address');
|
20 |
+
protected $firstnameFields = array('firstname', 'first_name', 'name', 'your-name', 'first name', 'first-name', 'first');
|
21 |
+
protected $lastnameFields = array('lastname', 'last_name', 'last name', 'last-name', 'last');
|
22 |
|
23 |
public function upsertContact($model)
|
24 |
{
|
|
|
25 |
if (!isset($model)) {
|
26 |
throw new Exception('No model provided');
|
27 |
}
|
33 |
else {
|
34 |
$contactModel = $model;
|
35 |
}
|
|
|
36 |
$this->contactSyncService->upsertContact($contactModel);
|
37 |
}
|
38 |
|
src/modules/contacts/Handlers/BlueHostBuilderPluginHandler.php
CHANGED
@@ -21,13 +21,12 @@ class BlueHostBuilderPluginHandler extends BaseContactFormPluginHandler
|
|
21 |
$contactModel->setEmail($email);
|
22 |
$contactModel->setEventType(CE4WP_WB4WP_EVENTTYPE);
|
23 |
|
24 |
-
if ($contact->opt_in && !$contact->opt_out) {
|
25 |
-
|
26 |
-
$contactModel->setOptIn($contact->opt_in);
|
27 |
$contactModel->setOptActionBy(OptActionBy::Owner);
|
28 |
}
|
29 |
|
30 |
-
if ($contact->opt_out) {
|
31 |
$contactModel->setOptOut($contact->opt_out);
|
32 |
$contactModel->setOptActionBy(OptActionBy::User);
|
33 |
}
|
@@ -42,7 +41,7 @@ class BlueHostBuilderPluginHandler extends BaseContactFormPluginHandler
|
|
42 |
$contactModel->setPhone($contact->phone);
|
43 |
}
|
44 |
if (!empty($contact->birthday)) {
|
45 |
-
$contactModel->
|
46 |
}
|
47 |
|
48 |
return $contactModel;
|
@@ -78,7 +77,7 @@ class BlueHostBuilderPluginHandler extends BaseContactFormPluginHandler
|
|
78 |
$limit = null;
|
79 |
}
|
80 |
|
81 |
-
if (in_array('wb4wp-
|
82 |
global $wpdb;
|
83 |
|
84 |
$contactsArray = array();
|
21 |
$contactModel->setEmail($email);
|
22 |
$contactModel->setEventType(CE4WP_WB4WP_EVENTTYPE);
|
23 |
|
24 |
+
if (!empty($contact->opt_in) && (!$contact->opt_out || $contact->opt_out < $contact->opt_in)) {
|
25 |
+
$contactModel->setOptIn(true);
|
|
|
26 |
$contactModel->setOptActionBy(OptActionBy::Owner);
|
27 |
}
|
28 |
|
29 |
+
if (!empty($contact->opt_out) && (!$contact->opt_in || $contact->opt_out > $contact->opt_in)) {
|
30 |
$contactModel->setOptOut($contact->opt_out);
|
31 |
$contactModel->setOptActionBy(OptActionBy::User);
|
32 |
}
|
41 |
$contactModel->setPhone($contact->phone);
|
42 |
}
|
43 |
if (!empty($contact->birthday)) {
|
44 |
+
$contactModel->setBirthday($contact->birthday);
|
45 |
}
|
46 |
|
47 |
return $contactModel;
|
77 |
$limit = null;
|
78 |
}
|
79 |
|
80 |
+
if (in_array('wb4wp-plugin.php', array_map('basename', apply_filters('active_plugins', get_option('active_plugins'))))) {
|
81 |
global $wpdb;
|
82 |
|
83 |
$contactsArray = array();
|
src/modules/contacts/Handlers/CalderaPluginHandler.php
CHANGED
@@ -88,7 +88,7 @@ class CalderaPluginHandler extends BaseContactFormPluginHandler
|
|
88 |
$contactModel->setPhone($contact->phone);
|
89 |
}
|
90 |
if (!empty($contact->birthday)) {
|
91 |
-
$contactModel->
|
92 |
}
|
93 |
|
94 |
return $contactModel;
|
88 |
$contactModel->setPhone($contact->phone);
|
89 |
}
|
90 |
if (!empty($contact->birthday)) {
|
91 |
+
$contactModel->setBirthday($contact->birthday);
|
92 |
}
|
93 |
|
94 |
return $contactModel;
|
src/modules/contacts/Handlers/ContactFormSevenPluginHandler.php
CHANGED
@@ -11,9 +11,6 @@ use CreativeMail\Modules\Contacts\Models\OptActionBy;
|
|
11 |
|
12 |
class ContactFormSevenPluginHandler extends BaseContactFormPluginHandler
|
13 |
{
|
14 |
-
private $firstnameFields = array('firstname', 'first_name', 'name', 'your-name');
|
15 |
-
private $lastnameFields = array('lastname', 'last_name');
|
16 |
-
|
17 |
private function findValue($data, $fieldOptions)
|
18 |
{
|
19 |
foreach ($fieldOptions as $fieldOption) {
|
@@ -64,7 +61,7 @@ class ContactFormSevenPluginHandler extends BaseContactFormPluginHandler
|
|
64 |
}
|
65 |
$birthday = $this->findValue($contactForm, $this->birthdayFields);
|
66 |
if (!empty($birthday)) {
|
67 |
-
$contactModel->
|
68 |
}
|
69 |
|
70 |
$contactModel->setOptIn(false);
|
@@ -134,7 +131,7 @@ class ContactFormSevenPluginHandler extends BaseContactFormPluginHandler
|
|
134 |
}
|
135 |
$birthday = $this->findValueFromDb($form_data, $this->birthdayFields);
|
136 |
if (!empty($birthday)) {
|
137 |
-
$contactModel->
|
138 |
}
|
139 |
} catch (\Exception $exception) {
|
140 |
RaygunManager::get_instance()->exception_handler($exception);
|
11 |
|
12 |
class ContactFormSevenPluginHandler extends BaseContactFormPluginHandler
|
13 |
{
|
|
|
|
|
|
|
14 |
private function findValue($data, $fieldOptions)
|
15 |
{
|
16 |
foreach ($fieldOptions as $fieldOption) {
|
61 |
}
|
62 |
$birthday = $this->findValue($contactForm, $this->birthdayFields);
|
63 |
if (!empty($birthday)) {
|
64 |
+
$contactModel->setBirthday($birthday);
|
65 |
}
|
66 |
|
67 |
$contactModel->setOptIn(false);
|
131 |
}
|
132 |
$birthday = $this->findValueFromDb($form_data, $this->birthdayFields);
|
133 |
if (!empty($birthday)) {
|
134 |
+
$contactModel->setBirthday($birthday);
|
135 |
}
|
136 |
} catch (\Exception $exception) {
|
137 |
RaygunManager::get_instance()->exception_handler($exception);
|
src/modules/contacts/Handlers/ElementorPluginHandler.php
CHANGED
@@ -67,7 +67,7 @@ class ElementorPluginHandler extends BaseContactFormPluginHandler
|
|
67 |
$contactModel->setPhone($contact->phone);
|
68 |
}
|
69 |
if (!empty($contact->birthday)) {
|
70 |
-
$contactModel->
|
71 |
}
|
72 |
return $contactModel;
|
73 |
}
|
67 |
$contactModel->setPhone($contact->phone);
|
68 |
}
|
69 |
if (!empty($contact->birthday)) {
|
70 |
+
$contactModel->setBirthday($contact->birthday);
|
71 |
}
|
72 |
return $contactModel;
|
73 |
}
|
src/modules/contacts/Handlers/FormidablePluginHandler.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace CreativeMail\Modules\Contacts\Handlers;
|
4 |
+
|
5 |
+
define('CE4WP_FRM_EVENTTYPE', 'WordPress - Formidable');
|
6 |
+
|
7 |
+
use CreativeMail\Managers\RaygunManager;
|
8 |
+
use CreativeMail\Modules\Contacts\Models\ContactModel;
|
9 |
+
use CreativeMail\Modules\Contacts\Models\OptActionBy;
|
10 |
+
|
11 |
+
class FormidablePluginHandler extends BaseContactFormPluginHandler
|
12 |
+
{
|
13 |
+
function __construct()
|
14 |
+
{
|
15 |
+
parent::__construct();
|
16 |
+
}
|
17 |
+
|
18 |
+
private function FindEntryValues($entry, $formidableContact)
|
19 |
+
{
|
20 |
+
if ($this->isNullOrEmpty($entry)) {
|
21 |
+
return null;
|
22 |
+
}
|
23 |
+
foreach ($entry as $field) {
|
24 |
+
$fieldName = strtolower($field->fieldName);
|
25 |
+
if ($field->fieldType == 'phone' || in_array($fieldName, $this->phoneFields)) {
|
26 |
+
$formidableContact->phone = $field->entryValue;
|
27 |
+
} elseif ($field->fieldType == 'text' && in_array($fieldName, $this->firstnameFields)) {
|
28 |
+
$formidableContact->firstName = $field->entryValue;
|
29 |
+
} elseif ($field->fieldType == 'text' && in_array($fieldName, $this->lastnameFields)) {
|
30 |
+
$formidableContact->lastName = $field->entryValue;
|
31 |
+
} elseif ($field->fieldType == 'date' && in_array($fieldName, $this->birthdayFields)) {
|
32 |
+
$formidableContact->birthday = $field->entryValue;
|
33 |
+
} elseif ($field->fieldType == 'email') {
|
34 |
+
$formidableContact->email = $field->entryValue;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
public function convertToContactModel($contact)
|
40 |
+
{
|
41 |
+
$contactModel = new ContactModel();
|
42 |
+
|
43 |
+
$contactModel->setEventType(CE4WP_FRM_EVENTTYPE);
|
44 |
+
|
45 |
+
if (isset($contact->isSync) && $contact->isSync) {
|
46 |
+
$contactModel->setOptIn(true);
|
47 |
+
$contactModel->setOptOut(false);
|
48 |
+
$contactModel->setOptActionBy(OptActionBy::Owner);
|
49 |
+
}
|
50 |
+
|
51 |
+
//Formidable doesn't seem to have a consent checkbox
|
52 |
+
|
53 |
+
if (!empty($contact->email)) {
|
54 |
+
$contactModel->setEmail($contact->email);
|
55 |
+
}
|
56 |
+
|
57 |
+
if (!empty($contact->firstName)) {
|
58 |
+
$contactModel->setFirstName($contact->firstName);
|
59 |
+
}
|
60 |
+
|
61 |
+
if (!empty($contact->lastName)) {
|
62 |
+
$contactModel->setLastName($contact->lastName);
|
63 |
+
}
|
64 |
+
|
65 |
+
if (!empty($contact->phone)) {
|
66 |
+
$contactModel->setPhone($contact->phone);
|
67 |
+
}
|
68 |
+
if (!empty($contact->birthday)) {
|
69 |
+
$contactModel->setBirthday($contact->birthday);
|
70 |
+
}
|
71 |
+
return $contactModel;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function ceHandleFormidableFormSubmission($entry_id, $form_id)
|
75 |
+
{
|
76 |
+
try {
|
77 |
+
//map entry values to the field meta
|
78 |
+
$entry = \FrmField::get_all_for_form($form_id);
|
79 |
+
$entryFieldData = $_POST["item_meta"];
|
80 |
+
foreach ($entry as $field) {
|
81 |
+
if (!empty($entryFieldData[$field->id])) {
|
82 |
+
$field->entryValue = $entryFieldData[$field->id];
|
83 |
+
$field->fieldType = $field->type;
|
84 |
+
$field->fieldName = $field->name;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
$formidableContact = new \stdClass();
|
88 |
+
|
89 |
+
//Convert to contactModel
|
90 |
+
$this->FindEntryValues($entry, $formidableContact);
|
91 |
+
|
92 |
+
if (empty($formidableContact->email)) {
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
$this->upsertContact($this->convertToContactModel($formidableContact));
|
96 |
+
} catch (\Exception $exception) {
|
97 |
+
RaygunManager::get_instance()->exception_handler($exception);
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
public function registerHooks()
|
102 |
+
{
|
103 |
+
add_action('frm_after_create_entry', array($this, 'ceHandleFormidableFormSubmission'), 30, 2);
|
104 |
+
}
|
105 |
+
|
106 |
+
public function unregisterHooks()
|
107 |
+
{
|
108 |
+
remove_action('frm_after_create_entry', array($this, 'ceHandleFormidableFormSubmission'));
|
109 |
+
}
|
110 |
+
|
111 |
+
public function get_contacts($limit = null)
|
112 |
+
{
|
113 |
+
if (!is_int($limit) || $limit <= 0) {
|
114 |
+
$limit = null;
|
115 |
+
}
|
116 |
+
|
117 |
+
if (in_array('formidable/formidable.php', apply_filters('active_plugins', get_option('active_plugins')))) {
|
118 |
+
global $wpdb;
|
119 |
+
$contactsArray = array();
|
120 |
+
|
121 |
+
$forms = \FrmForm::getAll();
|
122 |
+
foreach ($forms as $form) {
|
123 |
+
$entriesQuery = "SELECT e.item_id AS entryId, e.meta_value AS entryValue, f.name AS fieldName, f.description AS fieldDescription, f.type AS fieldType
|
124 |
+
FROM wp_frm_item_metas e
|
125 |
+
INNER JOIN wp_frm_fields f ON f.id = e.field_id WHERE f.form_id = {$form->id} ORDER BY e.item_id";
|
126 |
+
|
127 |
+
$entryResults = $wpdb->get_results($wpdb->prepare($entriesQuery));
|
128 |
+
if (empty($entryResults)) {
|
129 |
+
continue;
|
130 |
+
}
|
131 |
+
|
132 |
+
$mappedEntries = $this->CombineEntryData($entryResults);
|
133 |
+
|
134 |
+
//Get the contact data for each entry
|
135 |
+
foreach ($mappedEntries as $entry) {
|
136 |
+
$formidableContact = new \stdClass();
|
137 |
+
|
138 |
+
//Convert to contactModel
|
139 |
+
$this->FindEntryValues($entry, $formidableContact);
|
140 |
+
|
141 |
+
if (empty($formidableContact->email)) {
|
142 |
+
continue;
|
143 |
+
}
|
144 |
+
$formidableContact->isSync = true;
|
145 |
+
try {
|
146 |
+
$contactModel = null;
|
147 |
+
$contactModel = $this->convertToContactModel($formidableContact);
|
148 |
+
} catch (\Exception $exception) {
|
149 |
+
RaygunManager::get_instance()->exception_handler($exception);
|
150 |
+
continue;
|
151 |
+
}
|
152 |
+
if (!empty($contactModel->email)) {
|
153 |
+
array_push($contactsArray, $contactModel);
|
154 |
+
}
|
155 |
+
if (isset($limit) && count($contactsArray) >= $limit) {
|
156 |
+
break;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
if (!empty($contactsArray)) {
|
161 |
+
return $contactsArray;
|
162 |
+
}
|
163 |
+
return null;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
private function CombineEntryData(array $entryResults)
|
168 |
+
{
|
169 |
+
$entries = array();
|
170 |
+
foreach ($entryResults as $entryRow) {
|
171 |
+
if (isset($entryRow->entryId)) {
|
172 |
+
$entries[$entryRow->entryId][] = $entryRow;
|
173 |
+
} elseif (isset($entryRow->id)) {
|
174 |
+
$entries[$entryRow->id][] = $entryRow;
|
175 |
+
}
|
176 |
+
}
|
177 |
+
return $entries;
|
178 |
+
}
|
179 |
+
}
|
src/modules/contacts/Handlers/GravityFormsPluginHandler.php
CHANGED
@@ -51,7 +51,7 @@ class GravityFormsPluginHandler extends BaseContactFormPluginHandler
|
|
51 |
$contactModel->setPhone($user->phone);
|
52 |
}
|
53 |
if (!empty($user->birthday)) {
|
54 |
-
$contactModel->
|
55 |
}
|
56 |
|
57 |
return $contactModel;
|
@@ -117,7 +117,7 @@ class GravityFormsPluginHandler extends BaseContactFormPluginHandler
|
|
117 |
private function FindFormData($contact, $entry, $form)
|
118 |
{
|
119 |
foreach ($form['fields'] as $field) {
|
120 |
-
if (strtolower($field["type"]) === 'phone'
|
121 |
$contact->phone = rgar($entry, $field["id"]);
|
122 |
} elseif (strtolower($field["type"]) === 'date' && in_array(strtolower($field["label"]), $this->birthdayFields)) {
|
123 |
$contact->birthday = rgar($entry, $field["id"]);
|
51 |
$contactModel->setPhone($user->phone);
|
52 |
}
|
53 |
if (!empty($user->birthday)) {
|
54 |
+
$contactModel->setBirthday($user->birthday);
|
55 |
}
|
56 |
|
57 |
return $contactModel;
|
117 |
private function FindFormData($contact, $entry, $form)
|
118 |
{
|
119 |
foreach ($form['fields'] as $field) {
|
120 |
+
if (strtolower($field["type"]) === 'phone') {
|
121 |
$contact->phone = rgar($entry, $field["id"]);
|
122 |
} elseif (strtolower($field["type"]) === 'date' && in_array(strtolower($field["label"]), $this->birthdayFields)) {
|
123 |
$contact->birthday = rgar($entry, $field["id"]);
|
src/modules/contacts/Handlers/JetpackPluginHandler.php
CHANGED
@@ -47,7 +47,7 @@ class JetpackPluginHandler extends BaseContactFormPluginHandler
|
|
47 |
$contactModel->setPhone($contact->phone);
|
48 |
}
|
49 |
if (!empty($contact->birthday)) {
|
50 |
-
$contactModel->
|
51 |
}
|
52 |
return $contactModel;
|
53 |
}
|
@@ -74,7 +74,7 @@ class JetpackPluginHandler extends BaseContactFormPluginHandler
|
|
74 |
$contact->email = $nameAndEmail["email"];
|
75 |
$contact->name = $nameAndEmail["name"];
|
76 |
|
77 |
-
$contact->opt_in = boolval($all_values['email_marketing_consent']);
|
78 |
|
79 |
if (empty($contact->email)) {
|
80 |
return;
|
47 |
$contactModel->setPhone($contact->phone);
|
48 |
}
|
49 |
if (!empty($contact->birthday)) {
|
50 |
+
$contactModel->setBirthday($contact->birthday);
|
51 |
}
|
52 |
return $contactModel;
|
53 |
}
|
74 |
$contact->email = $nameAndEmail["email"];
|
75 |
$contact->name = $nameAndEmail["name"];
|
76 |
|
77 |
+
$contact->opt_in = boolval(isset($all_values['email_marketing_consent']) && $all_values['email_marketing_consent']);
|
78 |
|
79 |
if (empty($contact->email)) {
|
80 |
return;
|
src/modules/contacts/Handlers/NinjaFormsPluginHandler.php
CHANGED
@@ -87,7 +87,7 @@ class NinjaFormsPluginHandler extends BaseContactFormPluginHandler
|
|
87 |
$contactModel->setPhone($contact->phone);
|
88 |
}
|
89 |
if (!empty($contact->birthday)) {
|
90 |
-
$contactModel->
|
91 |
}
|
92 |
|
93 |
return $contactModel;
|
87 |
$contactModel->setPhone($contact->phone);
|
88 |
}
|
89 |
if (!empty($contact->birthday)) {
|
90 |
+
$contactModel->setBirthday($contact->birthday);
|
91 |
}
|
92 |
|
93 |
return $contactModel;
|
src/modules/contacts/Handlers/WpFormsPluginHandler.php
CHANGED
@@ -63,7 +63,7 @@ class WpFormsPluginHandler extends BaseContactFormPluginHandler
|
|
63 |
}
|
64 |
|
65 |
$phoneField = $this->get_form_type_field($formData, 'phone');
|
66 |
-
if (!empty($phoneField)
|
67 |
if (!empty($phoneField['value'])) {
|
68 |
$contactModel->setPhone($phoneField['value']);
|
69 |
}
|
@@ -72,7 +72,7 @@ class WpFormsPluginHandler extends BaseContactFormPluginHandler
|
|
72 |
$dateField = $this->get_form_type_field($formData, 'date-time');
|
73 |
if (!empty($dateField) && array_key_exists('date', $dateField)) {
|
74 |
if (!empty($dateField['date']) && in_array(strtolower($dateField['name']), $this->birthdayFields)) {
|
75 |
-
$contactModel->
|
76 |
}
|
77 |
}
|
78 |
|
63 |
}
|
64 |
|
65 |
$phoneField = $this->get_form_type_field($formData, 'phone');
|
66 |
+
if (!empty($phoneField)) {
|
67 |
if (!empty($phoneField['value'])) {
|
68 |
$contactModel->setPhone($phoneField['value']);
|
69 |
}
|
72 |
$dateField = $this->get_form_type_field($formData, 'date-time');
|
73 |
if (!empty($dateField) && array_key_exists('date', $dateField)) {
|
74 |
if (!empty($dateField['date']) && in_array(strtolower($dateField['name']), $this->birthdayFields)) {
|
75 |
+
$contactModel->setBirthday($dateField['date']);
|
76 |
}
|
77 |
}
|
78 |
|
src/modules/contacts/Services/ContactsSyncService.php
CHANGED
@@ -264,7 +264,7 @@ class ContactsSyncService
|
|
264 |
strval($contactAddressModel->getCountryCode()), strval($contactAddressModel->getState()));
|
265 |
}
|
266 |
|
267 |
-
array_push($contact_fields, strval($contactModel->getPhone()), strval($contactModel->
|
268 |
strval($contactModel->getOptIn()), strval($contactModel->getOptOut()), strval($contactModel->getEventType()));
|
269 |
return $contact_fields;
|
270 |
}
|
264 |
strval($contactAddressModel->getCountryCode()), strval($contactAddressModel->getState()));
|
265 |
}
|
266 |
|
267 |
+
array_push($contact_fields, strval($contactModel->getPhone()), strval($contactModel->getBirthday()), strval($contactModel->getCompanyName()), '', // JobTitle
|
268 |
strval($contactModel->getOptIn()), strval($contactModel->getOptOut()), strval($contactModel->getEventType()));
|
269 |
return $contact_fields;
|
270 |
}
|
src/modules/contacts/models/ContactModel.php
CHANGED
@@ -143,12 +143,12 @@ class ContactModel
|
|
143 |
return $this->eventType;
|
144 |
}
|
145 |
|
146 |
-
public function
|
147 |
{
|
148 |
return $this->birthday;
|
149 |
}
|
150 |
|
151 |
-
public function
|
152 |
{
|
153 |
$this->birthday = $birthday;
|
154 |
}
|
@@ -158,6 +158,7 @@ class ContactModel
|
|
158 |
$result = array(
|
159 |
"email" => $this->getEmail(),
|
160 |
"phone" => $this->getPhone(),
|
|
|
161 |
"company_name" => $this->getCompanyName(),
|
162 |
"name" => $this->getName(),
|
163 |
"first_name" => $this->getFirstName(),
|
143 |
return $this->eventType;
|
144 |
}
|
145 |
|
146 |
+
public function getBirthday()
|
147 |
{
|
148 |
return $this->birthday;
|
149 |
}
|
150 |
|
151 |
+
public function setBirthday($birthday)
|
152 |
{
|
153 |
$this->birthday = $birthday;
|
154 |
}
|
158 |
$result = array(
|
159 |
"email" => $this->getEmail(),
|
160 |
"phone" => $this->getPhone(),
|
161 |
+
"birthday" => $this->getBirthday(),
|
162 |
"company_name" => $this->getCompanyName(),
|
163 |
"name" => $this->getName(),
|
164 |
"first_name" => $this->getFirstName(),
|
src/modules/woocommerce/emails/AbandonedCartEmail.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace CreativeMail\Modules\Woocommerce\Emails;
|
3 |
+
|
4 |
+
use WC_Email;
|
5 |
+
use WC_Order;
|
6 |
+
|
7 |
+
class AbandonedCartEmail extends WC_Email {
|
8 |
+
/**
|
9 |
+
* Constructor.
|
10 |
+
*
|
11 |
+
* @param WC_Email[] $email_classes All existing instances of WooCommerce emails.
|
12 |
+
*/
|
13 |
+
public function __construct( $email_classes = array() ) {
|
14 |
+
$this->id = 'cart_abandoned_ce4wp';
|
15 |
+
$this->title = __( 'Abandoned cart', 'ce4wp' );
|
16 |
+
$this->description = __( 'Send customers a reminder after they abandoned their shopping cart', 'ce4wp' );
|
17 |
+
$this->customer_email = true;
|
18 |
+
$this->enabled = false;
|
19 |
+
|
20 |
+
// We want all the parent's methods, with none of its properties, so call its parent's constructor, rather than my parent constructor.
|
21 |
+
parent::__construct();
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Triggers the email.
|
26 |
+
*
|
27 |
+
* @param WC_Order $order The order.
|
28 |
+
*/
|
29 |
+
public function trigger( $order ) {
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
}
|
src/views/admin-wc-notice/recovercart.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="ce4wp-wc-dashboard-notice" class="ce4wp-notice ce4wp-notice-secondary">
|
2 |
+
<img class="icon" src="<?= CE4WP_PLUGIN_URL . 'assets/images/woocommerce-banners/active-cm-wc.png'; ?>" alt="Abandoned cart"/>
|
3 |
+
<section class="content">
|
4 |
+
<h1>
|
5 |
+
<strong><?= __( 'Reclaim your profits. Increase store conversion by 10%*', 'ce4wp' ); ?></strong>
|
6 |
+
</h1>
|
7 |
+
<p>
|
8 |
+
<?= __( '3 out of 4 people add something to their shopping cart, but leave before the actual purchase.', 'ce4wp' ); ?>
|
9 |
+
</p>
|
10 |
+
<button class="button button-primary" onclick="ce4wpNavigateToDashboard(this, '1fabdbe2-95ed-4e1e-a2f3-ba0278f5096f', { source: 'woocommerce_abandoned_cart_notice' }, ce4wpWidgetStartCallback, ce4wpWidgetFinishCallback)"><?= __( 'Recover abandoned carts with Creative Mail', 'ce4wp' ); ?></button>
|
11 |
+
</section>
|
12 |
+
<span id="close" onclick="hideAdminWooCommerceNotice('woocommerce_abandoned_cart_notice')"></span>
|
13 |
+
</div>
|
src/views/admin-wc-notice/setup.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="ce4wp-wc-dashboard-notice" class="ce4wp-notice ce4wp-notice-primary">
|
2 |
+
<img class="icon" src="<?= CE4WP_PLUGIN_URL . 'assets/images/woocommerce-banners/setup-cm-wc.png'; ?>" alt="Setup"/>
|
3 |
+
<section class="content">
|
4 |
+
<h1>
|
5 |
+
<strong><?= __( 'Supercharge your WooCommerce store', 'ce4wp' ); ?></strong>
|
6 |
+
</h1>
|
7 |
+
<p>
|
8 |
+
<?= __( 'Salvage abandoned carts, and make your WooCommerce order emails look amazing with the flip of a switch.', 'ce4wp' ); ?>
|
9 |
+
</p>
|
10 |
+
<button class="button button-primary" onclick="ce4wpNavigateToDashboard(this, 'd25f690a-217a-4d68-9c58-8693965d4673', { source: 'woocommerce_setup_notice' }, ce4wpWidgetStartCallback, ce4wpWidgetFinishCallback)"><?= __( 'Setup Creative Mail now', 'ce4wp' ); ?></button>
|
11 |
+
</section>
|
12 |
+
<span id="close" onclick="hideAdminWooCommerceNotice('woocommerce_dashboard_setup_notice')"></span>
|
13 |
+
</div>
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit83cf50d27aa37019821234fe9c68de1f::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -35,6 +35,7 @@ return array(
|
|
35 |
'CreativeMail\\Modules\\Contacts\\Handlers\\CalderaPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/CalderaPluginHandler.php',
|
36 |
'CreativeMail\\Modules\\Contacts\\Handlers\\ContactFormSevenPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/ContactFormSevenPluginHandler.php',
|
37 |
'CreativeMail\\Modules\\Contacts\\Handlers\\ElementorPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/ElementorPluginHandler.php',
|
|
|
38 |
'CreativeMail\\Modules\\Contacts\\Handlers\\GravityFormsPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/GravityFormsPluginHandler.php',
|
39 |
'CreativeMail\\Modules\\Contacts\\Handlers\\JetpackPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/JetpackPluginHandler.php',
|
40 |
'CreativeMail\\Modules\\Contacts\\Handlers\\NewsLetterContactFormPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/NewsLetterContactFormPluginHandler.php',
|
@@ -53,6 +54,7 @@ return array(
|
|
53 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCInformationModel' => $baseDir . '/src/modules/woocommerce/models/WCInformationModel.php',
|
54 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCProductModel' => $baseDir . '/src/modules/woocommerce/models/WCProductModel.php',
|
55 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCStoreInformation' => $baseDir . '/src/modules/woocommerce/models/WCStoreInformation.php',
|
|
|
56 |
'CreativeMail\\Modules\\contacts\\Exceptions\\InvalidContactSyncBackgroundRequestException' => $baseDir . '/src/modules/contacts/Exceptions/InvalidContactSyncBackgroundRequestException.php',
|
57 |
'CreativeMail\\Modules\\contacts\\Exceptions\\InvalidHandlerContactSyncRequestException' => $baseDir . '/src/modules/contacts/Exceptions/InvalidHandlerContactSyncRequestException.php',
|
58 |
'Defuse\\Crypto\\Core' => $vendorDir . '/defuse/php-encryption/src/Core.php',
|
35 |
'CreativeMail\\Modules\\Contacts\\Handlers\\CalderaPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/CalderaPluginHandler.php',
|
36 |
'CreativeMail\\Modules\\Contacts\\Handlers\\ContactFormSevenPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/ContactFormSevenPluginHandler.php',
|
37 |
'CreativeMail\\Modules\\Contacts\\Handlers\\ElementorPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/ElementorPluginHandler.php',
|
38 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\FormidablePluginHandler' => $baseDir . '/src/modules/contacts/Handlers/FormidablePluginHandler.php',
|
39 |
'CreativeMail\\Modules\\Contacts\\Handlers\\GravityFormsPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/GravityFormsPluginHandler.php',
|
40 |
'CreativeMail\\Modules\\Contacts\\Handlers\\JetpackPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/JetpackPluginHandler.php',
|
41 |
'CreativeMail\\Modules\\Contacts\\Handlers\\NewsLetterContactFormPluginHandler' => $baseDir . '/src/modules/contacts/Handlers/NewsLetterContactFormPluginHandler.php',
|
54 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCInformationModel' => $baseDir . '/src/modules/woocommerce/models/WCInformationModel.php',
|
55 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCProductModel' => $baseDir . '/src/modules/woocommerce/models/WCProductModel.php',
|
56 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCStoreInformation' => $baseDir . '/src/modules/woocommerce/models/WCStoreInformation.php',
|
57 |
+
'CreativeMail\\Modules\\Woocommerce\\Emails\\AbandonedCartEmail' => $baseDir . '/src/modules/woocommerce/emails/AbandonedCartEmail.php',
|
58 |
'CreativeMail\\Modules\\contacts\\Exceptions\\InvalidContactSyncBackgroundRequestException' => $baseDir . '/src/modules/contacts/Exceptions/InvalidContactSyncBackgroundRequestException.php',
|
59 |
'CreativeMail\\Modules\\contacts\\Exceptions\\InvalidHandlerContactSyncRequestException' => $baseDir . '/src/modules/contacts/Exceptions/InvalidHandlerContactSyncRequestException.php',
|
60 |
'Defuse\\Crypto\\Core' => $vendorDir . '/defuse/php-encryption/src/Core.php',
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitf4a1df0de7aa58f6561a7b6d4a6b9e9c
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit83cf50d27aa37019821234fe9c68de1f
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit83cf50d27aa37019821234fe9c68de1f', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit83cf50d27aa37019821234fe9c68de1f', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit83cf50d27aa37019821234fe9c68de1f::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'F' =>
|
@@ -101,6 +101,7 @@ class ComposerStaticInitf4a1df0de7aa58f6561a7b6d4a6b9e9c
|
|
101 |
'CreativeMail\\Modules\\Contacts\\Handlers\\CalderaPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/CalderaPluginHandler.php',
|
102 |
'CreativeMail\\Modules\\Contacts\\Handlers\\ContactFormSevenPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/ContactFormSevenPluginHandler.php',
|
103 |
'CreativeMail\\Modules\\Contacts\\Handlers\\ElementorPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/ElementorPluginHandler.php',
|
|
|
104 |
'CreativeMail\\Modules\\Contacts\\Handlers\\GravityFormsPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/GravityFormsPluginHandler.php',
|
105 |
'CreativeMail\\Modules\\Contacts\\Handlers\\JetpackPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/JetpackPluginHandler.php',
|
106 |
'CreativeMail\\Modules\\Contacts\\Handlers\\NewsLetterContactFormPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/NewsLetterContactFormPluginHandler.php',
|
@@ -119,6 +120,7 @@ class ComposerStaticInitf4a1df0de7aa58f6561a7b6d4a6b9e9c
|
|
119 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCInformationModel' => __DIR__ . '/../..' . '/src/modules/woocommerce/models/WCInformationModel.php',
|
120 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCProductModel' => __DIR__ . '/../..' . '/src/modules/woocommerce/models/WCProductModel.php',
|
121 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCStoreInformation' => __DIR__ . '/../..' . '/src/modules/woocommerce/models/WCStoreInformation.php',
|
|
|
122 |
'CreativeMail\\Modules\\contacts\\Exceptions\\InvalidContactSyncBackgroundRequestException' => __DIR__ . '/../..' . '/src/modules/contacts/Exceptions/InvalidContactSyncBackgroundRequestException.php',
|
123 |
'CreativeMail\\Modules\\contacts\\Exceptions\\InvalidHandlerContactSyncRequestException' => __DIR__ . '/../..' . '/src/modules/contacts/Exceptions/InvalidHandlerContactSyncRequestException.php',
|
124 |
'Defuse\\Crypto\\Core' => __DIR__ . '/..' . '/defuse/php-encryption/src/Core.php',
|
@@ -157,10 +159,10 @@ class ComposerStaticInitf4a1df0de7aa58f6561a7b6d4a6b9e9c
|
|
157 |
public static function getInitializer(ClassLoader $loader)
|
158 |
{
|
159 |
return \Closure::bind(function () use ($loader) {
|
160 |
-
$loader->prefixLengthsPsr4 =
|
161 |
-
$loader->prefixDirsPsr4 =
|
162 |
-
$loader->prefixesPsr0 =
|
163 |
-
$loader->classMap =
|
164 |
|
165 |
}, null, ClassLoader::class);
|
166 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit83cf50d27aa37019821234fe9c68de1f
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'F' =>
|
101 |
'CreativeMail\\Modules\\Contacts\\Handlers\\CalderaPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/CalderaPluginHandler.php',
|
102 |
'CreativeMail\\Modules\\Contacts\\Handlers\\ContactFormSevenPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/ContactFormSevenPluginHandler.php',
|
103 |
'CreativeMail\\Modules\\Contacts\\Handlers\\ElementorPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/ElementorPluginHandler.php',
|
104 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\FormidablePluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/FormidablePluginHandler.php',
|
105 |
'CreativeMail\\Modules\\Contacts\\Handlers\\GravityFormsPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/GravityFormsPluginHandler.php',
|
106 |
'CreativeMail\\Modules\\Contacts\\Handlers\\JetpackPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/JetpackPluginHandler.php',
|
107 |
'CreativeMail\\Modules\\Contacts\\Handlers\\NewsLetterContactFormPluginHandler' => __DIR__ . '/../..' . '/src/modules/contacts/Handlers/NewsLetterContactFormPluginHandler.php',
|
120 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCInformationModel' => __DIR__ . '/../..' . '/src/modules/woocommerce/models/WCInformationModel.php',
|
121 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCProductModel' => __DIR__ . '/../..' . '/src/modules/woocommerce/models/WCProductModel.php',
|
122 |
'CreativeMail\\Modules\\WooCommerce\\Models\\WCStoreInformation' => __DIR__ . '/../..' . '/src/modules/woocommerce/models/WCStoreInformation.php',
|
123 |
+
'CreativeMail\\Modules\\Woocommerce\\Emails\\AbandonedCartEmail' => __DIR__ . '/../..' . '/src/modules/woocommerce/emails/AbandonedCartEmail.php',
|
124 |
'CreativeMail\\Modules\\contacts\\Exceptions\\InvalidContactSyncBackgroundRequestException' => __DIR__ . '/../..' . '/src/modules/contacts/Exceptions/InvalidContactSyncBackgroundRequestException.php',
|
125 |
'CreativeMail\\Modules\\contacts\\Exceptions\\InvalidHandlerContactSyncRequestException' => __DIR__ . '/../..' . '/src/modules/contacts/Exceptions/InvalidHandlerContactSyncRequestException.php',
|
126 |
'Defuse\\Crypto\\Core' => __DIR__ . '/..' . '/defuse/php-encryption/src/Core.php',
|
159 |
public static function getInitializer(ClassLoader $loader)
|
160 |
{
|
161 |
return \Closure::bind(function () use ($loader) {
|
162 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit83cf50d27aa37019821234fe9c68de1f::$prefixLengthsPsr4;
|
163 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit83cf50d27aa37019821234fe9c68de1f::$prefixDirsPsr4;
|
164 |
+
$loader->prefixesPsr0 = ComposerStaticInit83cf50d27aa37019821234fe9c68de1f::$prefixesPsr0;
|
165 |
+
$loader->classMap = ComposerStaticInit83cf50d27aa37019821234fe9c68de1f::$classMap;
|
166 |
|
167 |
}, null, ClassLoader::class);
|
168 |
}
|