Version Description
Download this release
Release Info
Developer | constantcontact |
Plugin | Creative Mail – Easier WordPress & WooCommerce Email Marketing |
Version | 1.4.8 |
Comparing to | |
See all releases |
Code changes from version 1.4.7 to 1.4.8
- CHANGELOG.md +5 -0
- README.md +2 -1
- creative-mail-plugin.php +3 -3
- readme.txt +2 -1
- src/CreativeMail.php +5 -2
- src/Managers/ApiManager.php +0 -1
- src/Managers/CheckoutManager.php +166 -2
- src/Managers/EmailManager.php +10 -1
- src/Modules/Contacts/Handlers/BaseContactFormPluginHandler.php +3 -3
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +5 -5
CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 1.4.7 - October 7 2021
|
5 |
- Fix currency type being shown in "Abandoned Cart" emails for WooCommerce.
|
6 |
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 1.4.8 - December 1 2021
|
5 |
+
- Redirect to main Creativ Email templates page when user has abandoned cart template deactivated.
|
6 |
+
- Fix sync error with contact form 7
|
7 |
+
- Added automation trigger for customer buying products
|
8 |
+
|
9 |
#### 1.4.7 - October 7 2021
|
10 |
- Fix currency type being shown in "Abandoned Cart" emails for WooCommerce.
|
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.8
|
6 |
-
Stable tag: 1.4.
|
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 LogoBuilder
|
91 |
|
92 |
== Changelog ==
|
|
|
93 |
* 1.4.7 - Fix currency type being shown in "Abandoned Cart" emails for WooCommerce.
|
94 |
* 1.4.6 - Add phone number handling for Jetpack Forms. Bug fixes.
|
95 |
* 1.4.5 - This version contains a fix for Creative mail customers who also use the Bluehost Websitebuilder functionality to build their WordPress site.
|
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.8
|
6 |
+
Stable tag: 1.4.8
|
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 LogoBuilder
|
91 |
|
92 |
== Changelog ==
|
93 |
+
* 1.4.8 - Redirect to main Creativ Email templates page when user has abandoned cart template deactivated. Fix sync error with contact form 7. Added automation trigger for customer buying products.
|
94 |
* 1.4.7 - Fix currency type being shown in "Abandoned Cart" emails for WooCommerce.
|
95 |
* 1.4.6 - Add phone number handling for Jetpack Forms. Bug fixes.
|
96 |
* 1.4.5 - This version contains a fix for Creative mail customers who also use the Bluehost Websitebuilder functionality to build their WordPress site.
|
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.4.
|
13 |
* Author URI: https://www.constantcontact.com
|
14 |
* WC requires at least: 3.0.0
|
15 |
* WC tested up to: 5.1.0
|
@@ -27,7 +27,7 @@ function _load_ce4wp_plugin()
|
|
27 |
define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
|
28 |
define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
|
29 |
define('CE4WP_PLUGIN_FILE', __FILE__);
|
30 |
-
define('CE4WP_PLUGIN_VERSION', '1.4.
|
31 |
define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
|
32 |
define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
|
33 |
define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
|
@@ -44,7 +44,7 @@ function _load_ce4wp_plugin()
|
|
44 |
define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
|
45 |
define('CE4WP_APP_URL', 'https://app.creativemail.com/');
|
46 |
define('CE4WP_ENVIRONMENT', 'PRODUCTION');
|
47 |
-
define('CE4WP_BUILD_NUMBER', '
|
48 |
define('CE4WP_RAYGUN_PHP_KEY', 'Z85xL3mkgnW13Ri9DajGUg');
|
49 |
define('CE4WP_BATCH_SIZE', 500);
|
50 |
define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
|
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.4.8
|
13 |
* Author URI: https://www.constantcontact.com
|
14 |
* WC requires at least: 3.0.0
|
15 |
* WC tested up to: 5.1.0
|
27 |
define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
|
28 |
define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
|
29 |
define('CE4WP_PLUGIN_FILE', __FILE__);
|
30 |
+
define('CE4WP_PLUGIN_VERSION', '1.4.8');
|
31 |
define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
|
32 |
define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
|
33 |
define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
|
44 |
define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
|
45 |
define('CE4WP_APP_URL', 'https://app.creativemail.com/');
|
46 |
define('CE4WP_ENVIRONMENT', 'PRODUCTION');
|
47 |
+
define('CE4WP_BUILD_NUMBER', '1509');
|
48 |
define('CE4WP_RAYGUN_PHP_KEY', 'Z85xL3mkgnW13Ri9DajGUg');
|
49 |
define('CE4WP_BATCH_SIZE', 500);
|
50 |
define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
|
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.8
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
@@ -104,6 +104,7 @@ Creative Mail by Constant Contact [Privacy Notice](https://www.endurance.com/pri
|
|
104 |
6. Enhance your brand with LogoBuilder
|
105 |
|
106 |
== Changelog ==
|
|
|
107 |
* 1.4.7 - Fix currency type being shown in "Abandoned Cart" emails for WooCommerce.
|
108 |
* 1.4.6 - Add phone number handling for Jetpack Forms. Bug fixes.
|
109 |
* 1.4.5 - This version contains a fix for Creative mail customers who also use the Bluehost Websitebuilder functionality to build their WordPress site.
|
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.8
|
6 |
+
Stable tag: 1.4.8
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
104 |
6. Enhance your brand with LogoBuilder
|
105 |
|
106 |
== Changelog ==
|
107 |
+
* 1.4.8 - Redirect to main Creativ Email templates page when user has abandoned cart template deactivated. Fix sync error with contact form 7. Added automation trigger for customer buying products.
|
108 |
* 1.4.7 - Fix currency type being shown in "Abandoned Cart" emails for WooCommerce.
|
109 |
* 1.4.6 - Add phone number handling for Jetpack Forms. Bug fixes.
|
110 |
* 1.4.5 - This version contains a fix for Creative mail customers who also use the Bluehost Websitebuilder functionality to build their WordPress site.
|
src/CreativeMail.php
CHANGED
@@ -64,10 +64,13 @@ class CreativeMail
|
|
64 |
|
65 |
// check if abandoned cart email is managed by creative mail
|
66 |
$enabled = $this->email_manager->is_email_managed('cart_abandoned_ce4wp');
|
67 |
-
if ($enabled)
|
68 |
-
{
|
69 |
$this->checkout_manager->add_hooks();
|
70 |
}
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
public function get_database_manager()
|
64 |
|
65 |
// check if abandoned cart email is managed by creative mail
|
66 |
$enabled = $this->email_manager->is_email_managed('cart_abandoned_ce4wp');
|
67 |
+
if ($enabled) {
|
|
|
68 |
$this->checkout_manager->add_hooks();
|
69 |
}
|
70 |
+
// adding WC hook to catch the orders as soon as order is completed
|
71 |
+
if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
|
72 |
+
$this->checkout_manager->add_order_completed_wc_hooks();
|
73 |
+
}
|
74 |
}
|
75 |
|
76 |
public function get_database_manager()
|
src/Managers/ApiManager.php
CHANGED
@@ -47,7 +47,6 @@ class ApiManager
|
|
47 |
*/
|
48 |
public function add_hooks()
|
49 |
{
|
50 |
-
|
51 |
add_action('rest_api_init', array($this, 'add_rest_endpoints'));
|
52 |
}
|
53 |
|
47 |
*/
|
48 |
public function add_hooks()
|
49 |
{
|
|
|
50 |
add_action('rest_api_init', array($this, 'add_rest_endpoints'));
|
51 |
}
|
52 |
|
src/Managers/CheckoutManager.php
CHANGED
@@ -193,8 +193,8 @@ class CheckoutManager
|
|
193 |
/**
|
194 |
* Update of checkout data in the external service
|
195 |
*
|
196 |
-
* @param int
|
197 |
-
* @param string
|
198 |
*
|
199 |
* @since 1.3.0
|
200 |
*/
|
@@ -203,12 +203,14 @@ class CheckoutManager
|
|
203 |
if ( empty( $order ) ) {
|
204 |
return;
|
205 |
}
|
|
|
206 |
// check if order had checkout uuid
|
207 |
$uuid = $order->get_meta( self::META_CHECKOUT_UUID, true);
|
208 |
// check if order is created with checkout meta
|
209 |
if (empty($uuid)) {
|
210 |
return;
|
211 |
}
|
|
|
212 |
// try find recovery date from order meta data
|
213 |
$recovery_date = $order->get_meta( self::META_CHECKOUT_RECOVERED, true);
|
214 |
// Remote post to ce4wp marking checkout as completed/created
|
@@ -218,6 +220,7 @@ class CheckoutManager
|
|
218 |
$requestItem->order_total = $order->get_total();
|
219 |
$requestItem->order_currency = $order->get_currency();
|
220 |
$requestItem->recovery_date = (empty($recovery_date) || $recovery_date === self::DATETIME_ZERO) ? null : $recovery_date;
|
|
|
221 |
$endpoint = EnvironmentHelper::get_app_gateway_url('wordpress') . $endpoint;
|
222 |
// call remote endpoint to update
|
223 |
$this->ce4wp_remote_post($requestItem, $endpoint);
|
@@ -747,4 +750,165 @@ class CheckoutManager
|
|
747 |
// silent
|
748 |
}
|
749 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
750 |
}
|
193 |
/**
|
194 |
* Update of checkout data in the external service
|
195 |
*
|
196 |
+
* @param int $order_id The order id.
|
197 |
+
* @param string $endpoint Endpoint to call
|
198 |
*
|
199 |
* @since 1.3.0
|
200 |
*/
|
203 |
if ( empty( $order ) ) {
|
204 |
return;
|
205 |
}
|
206 |
+
|
207 |
// check if order had checkout uuid
|
208 |
$uuid = $order->get_meta( self::META_CHECKOUT_UUID, true);
|
209 |
// check if order is created with checkout meta
|
210 |
if (empty($uuid)) {
|
211 |
return;
|
212 |
}
|
213 |
+
|
214 |
// try find recovery date from order meta data
|
215 |
$recovery_date = $order->get_meta( self::META_CHECKOUT_RECOVERED, true);
|
216 |
// Remote post to ce4wp marking checkout as completed/created
|
220 |
$requestItem->order_total = $order->get_total();
|
221 |
$requestItem->order_currency = $order->get_currency();
|
222 |
$requestItem->recovery_date = (empty($recovery_date) || $recovery_date === self::DATETIME_ZERO) ? null : $recovery_date;
|
223 |
+
|
224 |
$endpoint = EnvironmentHelper::get_app_gateway_url('wordpress') . $endpoint;
|
225 |
// call remote endpoint to update
|
226 |
$this->ce4wp_remote_post($requestItem, $endpoint);
|
750 |
// silent
|
751 |
}
|
752 |
}
|
753 |
+
|
754 |
+
public function add_order_completed_wc_hooks() {
|
755 |
+
add_action('woocommerce_order_status_completed', array($this, 'order_completed_trigger_wc_hook'), 10, 1);
|
756 |
+
}
|
757 |
+
|
758 |
+
public function order_completed_trigger_wc_hook($order_id) {
|
759 |
+
$order = wc_get_order($order_id);
|
760 |
+
if ( empty( $order ) ) {
|
761 |
+
return;
|
762 |
+
}
|
763 |
+
|
764 |
+
$endpoint = '/v1.0/wc/order_completed';
|
765 |
+
$decimal_point = 2;
|
766 |
+
|
767 |
+
// General Info
|
768 |
+
$requestItem = new stdClass();
|
769 |
+
$requestItem->order_id = $order->get_id();
|
770 |
+
$requestItem->order_number = $order->get_order_number();
|
771 |
+
$requestItem->date_created = $order->get_date_created() ? $order->get_date_created()->getTimestamp() : 0;
|
772 |
+
$requestItem->date_modified = $order->get_date_modified() ? $order->get_date_modified()->getTimestamp() : 0;
|
773 |
+
$requestItem->date_completed = $order->get_date_completed() ? $order->get_date_completed()->getTimestamp() : 0;
|
774 |
+
$requestItem->status = $order->get_status();
|
775 |
+
$requestItem->order_url = $order->get_checkout_order_received_url();
|
776 |
+
$requestItem->note = $order->get_customer_note();
|
777 |
+
$requestItem->customer_ip = $order->get_customer_ip_address();
|
778 |
+
$requestItem->customer_user_agent = $order->get_customer_user_agent();
|
779 |
+
$requestItem->customer_id = $order->get_user_id();
|
780 |
+
// Order Billing
|
781 |
+
$requestItem->order->billing->email = $order->get_billing_email();
|
782 |
+
$requestItem->order->billing->first_name = $order->get_billing_first_name();
|
783 |
+
$requestItem->order->billing->last_name = $order->get_billing_last_name();
|
784 |
+
$requestItem->order->billing->is_first_time_buyer = count(wc_get_orders(array('email' => $order->get_billing_email()))) <= 1;
|
785 |
+
$requestItem->order->billing->company = $order->get_billing_company();
|
786 |
+
$requestItem->order->billing->address_1 = $order->get_billing_address_1();
|
787 |
+
$requestItem->order->billing->address_2 = $order->get_billing_address_2();
|
788 |
+
$requestItem->order->billing->city = $order->get_billing_city();
|
789 |
+
$requestItem->order->billing->state = $order->get_billing_state();
|
790 |
+
$requestItem->order->billing->postcode = $order->get_billing_postcode();
|
791 |
+
$requestItem->order->billing->country = $order->get_billing_country();
|
792 |
+
$requestItem->order->billing->email = $order->get_billing_email();
|
793 |
+
$requestItem->order->billing->phone = $order->get_billing_phone();
|
794 |
+
$requestItem->order->billing->shipping = array(
|
795 |
+
'first_name' => $order->get_shipping_first_name(),
|
796 |
+
'last_name' => $order->get_shipping_last_name(),
|
797 |
+
'company' => $order->get_shipping_company(),
|
798 |
+
'address_1' => $order->get_shipping_address_1(),
|
799 |
+
'address_2' => $order->get_shipping_address_2(),
|
800 |
+
'city' => $order->get_shipping_city(),
|
801 |
+
'state' => $order->get_shipping_state(),
|
802 |
+
'postcode' => $order->get_shipping_postcode(),
|
803 |
+
'country' => $order->get_shipping_country(),
|
804 |
+
'shipping_methods' => $order->get_shipping_method()
|
805 |
+
);
|
806 |
+
$requestItem->order->billing->payment_details = array(
|
807 |
+
'method_id' => $order->get_payment_method(),
|
808 |
+
'method_title' => $order->get_payment_method_title(),
|
809 |
+
'paid' => !is_null($order->get_date_paid()),
|
810 |
+
);
|
811 |
+
// Order Currency and Total Info
|
812 |
+
$requestItem->total = wc_format_decimal($order->get_total(), $decimal_point);
|
813 |
+
$requestItem->subtotal = wc_format_decimal($order->get_subtotal(), $decimal_point);
|
814 |
+
$requestItem->total_tax = wc_format_decimal($order->get_total_tax(), $decimal_point);
|
815 |
+
$requestItem->shipping_total = wc_format_decimal($order->get_shipping_total(), $decimal_point);
|
816 |
+
$requestItem->cart_tax = wc_format_decimal($order->get_cart_tax(), $decimal_point);
|
817 |
+
$requestItem->shipping_tax = wc_format_decimal($order->get_shipping_tax(), $decimal_point);
|
818 |
+
$requestItem->discount_total = wc_format_decimal($order->get_total_discount(), $decimal_point);
|
819 |
+
$requestItem->order->currency_symbol = get_woocommerce_currency_symbol();
|
820 |
+
$requestItem->order->currency = $order->get_currency();
|
821 |
+
// Order Products Info
|
822 |
+
$requestItem->order->total_line_items_quantity = $order->get_item_count();
|
823 |
+
// Line Items / Products array for the expected endpoint
|
824 |
+
foreach ($order->get_items() as $itemsKey => $item) {
|
825 |
+
$product = $item->get_product();
|
826 |
+
$item_meta = $item->get_formatted_meta_data();
|
827 |
+
|
828 |
+
foreach ($item_meta as $key => $values) {
|
829 |
+
$item_meta[$key]->label = $values->display_key;
|
830 |
+
unset($item_meta[$key]->display_key);
|
831 |
+
unset($item_meta[$key]->display_value);
|
832 |
+
}
|
833 |
+
|
834 |
+
try {
|
835 |
+
$product_data = array(
|
836 |
+
'images' => array(),
|
837 |
+
'downloads' => array()
|
838 |
+
);
|
839 |
+
$attachment_ids = $product->get_gallery_image_ids();
|
840 |
+
foreach ($attachment_ids as $attachment_id) {
|
841 |
+
$product_data['images'][] = wp_get_attachment_url($attachment_id);
|
842 |
+
}
|
843 |
+
|
844 |
+
$product_data["on_sale"] = $product->is_on_sale();
|
845 |
+
$product_data["sale_price"] = $product->get_sale_price();
|
846 |
+
$product_data["regular_price"] = $product->get_regular_price();
|
847 |
+
|
848 |
+
if ($product->is_downloadable()) {
|
849 |
+
$item_downloads = $item->get_item_downloads();
|
850 |
+
foreach ($item_downloads as $item_download)
|
851 |
+
{
|
852 |
+
$product_data["downloads"][] = array(
|
853 |
+
'line_item_id' => $item->get_id(),
|
854 |
+
'product_id' => $item->get_product_id(),
|
855 |
+
'download_url' => $item_download["download_url"],
|
856 |
+
'download_file' => $item_download["file"],
|
857 |
+
'download_name' => $item_download["name"],
|
858 |
+
'download_id' => $item_download["id"],
|
859 |
+
'downloads_remaining' => $item_download["downloads_remaining"],
|
860 |
+
'download_access_expires' => wc_format_datetime($item_download["access_expires"], 'U'),
|
861 |
+
'download_limit' => $product->get_download_limit(),
|
862 |
+
'download_expiry' => $product->get_download_expiry(),
|
863 |
+
);
|
864 |
+
}
|
865 |
+
}
|
866 |
+
} catch (\Exception $ex) {
|
867 |
+
RaygunManager::get_instance()->exception_handler($ex);
|
868 |
+
}
|
869 |
+
|
870 |
+
$src = wc_placeholder_img_src();
|
871 |
+
if ($image_id = $product->get_image_id() ) {
|
872 |
+
list( $src ) = wp_get_attachment_image_src($image_id, 'full');
|
873 |
+
}
|
874 |
+
|
875 |
+
$requestItem->order->line_items[] = array(
|
876 |
+
'product_id' => $item->get_product_id(),
|
877 |
+
'item_meta' => $item->get_formatted_meta_data(),
|
878 |
+
'subtotal' => wc_format_decimal($order->get_line_subtotal($item, false, false), $dp),
|
879 |
+
'subtotal_tax' => wc_format_decimal($item->get_subtotal_tax(), $dp),
|
880 |
+
'total' => wc_format_decimal($order->get_line_total($item, false, false), $dp),
|
881 |
+
'total_tax' => wc_format_decimal($item->get_total_tax(), $dp),
|
882 |
+
'price' => wc_format_decimal($order->get_item_total($item, false, false), $dp),
|
883 |
+
'quantity' => $item->get_quantity(),
|
884 |
+
'tax_class' => $item->get_tax_class(),
|
885 |
+
'name' => $item->get_name(),
|
886 |
+
'product_image' => $src,
|
887 |
+
'product_data' => $product_data,
|
888 |
+
'sku' => is_object($product) ? $product->get_sku() : null,
|
889 |
+
'meta' => array_values($item_meta),
|
890 |
+
'product_url' => get_the_permalink($item->get_product_id()),
|
891 |
+
'variation_id' => $item->get_variation_id()
|
892 |
+
);
|
893 |
+
}
|
894 |
+
|
895 |
+
$endpoint = EnvironmentHelper::get_app_gateway_url('wordpress') . $endpoint;
|
896 |
+
try
|
897 |
+
{
|
898 |
+
wp_remote_post(
|
899 |
+
$endpoint, array(
|
900 |
+
'method' => 'POST',
|
901 |
+
'timeout' => 10,
|
902 |
+
'headers' => array(
|
903 |
+
'x-account-id' => OptionsHelper::get_connected_account_id(),
|
904 |
+
'x-api-key' => OptionsHelper::get_instance_api_key(),
|
905 |
+
'content-type' => 'application/json'
|
906 |
+
),
|
907 |
+
'body' => wp_json_encode($requestItem)
|
908 |
+
)
|
909 |
+
);
|
910 |
+
} catch (\Exception $e) {
|
911 |
+
RaygunManager::get_instance()->exception_handler($e);
|
912 |
+
}
|
913 |
+
}
|
914 |
}
|
src/Managers/EmailManager.php
CHANGED
@@ -338,6 +338,7 @@ class EmailManager
|
|
338 |
|
339 |
$this->execute_trigger("customer_completed_order", $data, $order);
|
340 |
}
|
|
|
341 |
public function ce_email_notification_refunded($order_id, $order)
|
342 |
{
|
343 |
$data = new stdClass();
|
@@ -675,13 +676,21 @@ class EmailManager
|
|
675 |
*/
|
676 |
public function redirect_managed_email_settings_to_creative_mail( $email )
|
677 |
{
|
678 |
-
if ($this->is_email_managed($email->id)
|
679 |
$url = CreativeMail::get_instance()->get_admin_manager()->request_single_sign_on_url_internal("66eabdb1-5d55-4bc0-a435-0415c5ada60a", array(
|
680 |
"woocommerceTemplateSlug" => $email->id
|
681 |
));
|
682 |
wp_redirect($url);
|
683 |
exit;
|
684 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
}
|
686 |
|
687 |
/**
|
338 |
|
339 |
$this->execute_trigger("customer_completed_order", $data, $order);
|
340 |
}
|
341 |
+
|
342 |
public function ce_email_notification_refunded($order_id, $order)
|
343 |
{
|
344 |
$data = new stdClass();
|
676 |
*/
|
677 |
public function redirect_managed_email_settings_to_creative_mail( $email )
|
678 |
{
|
679 |
+
if ($this->is_email_managed($email->id)) {
|
680 |
$url = CreativeMail::get_instance()->get_admin_manager()->request_single_sign_on_url_internal("66eabdb1-5d55-4bc0-a435-0415c5ada60a", array(
|
681 |
"woocommerceTemplateSlug" => $email->id
|
682 |
));
|
683 |
wp_redirect($url);
|
684 |
exit;
|
685 |
}
|
686 |
+
|
687 |
+
if ($email->id === 'cart_abandoned_ce4wp') {
|
688 |
+
$url = CreativeMail::get_instance()->get_admin_manager()->request_single_sign_on_url_internal("1fabdbe2-95ed-4e1e-a2f3-ba0278f5096f", array (
|
689 |
+
"source" => "woocommerce_emails"
|
690 |
+
));
|
691 |
+
wp_redirect($url);
|
692 |
+
exit;
|
693 |
+
}
|
694 |
}
|
695 |
|
696 |
/**
|
src/Modules/Contacts/Handlers/BaseContactFormPluginHandler.php
CHANGED
@@ -16,9 +16,9 @@ abstract class BaseContactFormPluginHandler
|
|
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 |
{
|
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', 'UserEmailAddress');
|
20 |
+
protected $firstnameFields = array('firstname', 'first_name', 'name', 'your-name', 'first name', 'first-name', 'first', 'UserFirstName');
|
21 |
+
protected $lastnameFields = array('lastname', 'last_name', 'last name', 'last-name', 'last', 'UserLastName');
|
22 |
|
23 |
public function upsertContact($model)
|
24 |
{
|
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 ComposerAutoloaderInit92fb9ea1afd3d369dba1b0da18c58aa9::getLoader();
|
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 ComposerAutoloaderInit6d5caa86b217fc07ec98d191249fa06b
|
|
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 ComposerAutoloaderInit92fb9ea1afd3d369dba1b0da18c58aa9
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit92fb9ea1afd3d369dba1b0da18c58aa9', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit92fb9ea1afd3d369dba1b0da18c58aa9', '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\ComposerStaticInit92fb9ea1afd3d369dba1b0da18c58aa9::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' =>
|
@@ -167,10 +167,10 @@ class ComposerStaticInit6d5caa86b217fc07ec98d191249fa06b
|
|
167 |
public static function getInitializer(ClassLoader $loader)
|
168 |
{
|
169 |
return \Closure::bind(function () use ($loader) {
|
170 |
-
$loader->prefixLengthsPsr4 =
|
171 |
-
$loader->prefixDirsPsr4 =
|
172 |
-
$loader->prefixesPsr0 =
|
173 |
-
$loader->classMap =
|
174 |
|
175 |
}, null, ClassLoader::class);
|
176 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit92fb9ea1afd3d369dba1b0da18c58aa9
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'F' =>
|
167 |
public static function getInitializer(ClassLoader $loader)
|
168 |
{
|
169 |
return \Closure::bind(function () use ($loader) {
|
170 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit92fb9ea1afd3d369dba1b0da18c58aa9::$prefixLengthsPsr4;
|
171 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit92fb9ea1afd3d369dba1b0da18c58aa9::$prefixDirsPsr4;
|
172 |
+
$loader->prefixesPsr0 = ComposerStaticInit92fb9ea1afd3d369dba1b0da18c58aa9::$prefixesPsr0;
|
173 |
+
$loader->classMap = ComposerStaticInit92fb9ea1afd3d369dba1b0da18c58aa9::$classMap;
|
174 |
|
175 |
}, null, ClassLoader::class);
|
176 |
}
|