Temporarily disable WC hooks (except for testing) [MAILPOET-1723]
This commit is contained in:
@@ -4,6 +4,7 @@ namespace MailPoet\Segments;
|
||||
use MailPoet\Models\ModelValidator;
|
||||
use MailPoet\Models\Subscriber;
|
||||
use MailPoet\Models\Segment;
|
||||
use MailPoet\Models\Setting;
|
||||
use MailPoet\Models\SubscriberSegment;
|
||||
use MailPoet\Newsletter\Scheduler\Scheduler;
|
||||
use MailPoet\Subscribers\Source;
|
||||
@@ -12,6 +13,10 @@ if(!defined('ABSPATH')) exit;
|
||||
|
||||
class WooCommerce {
|
||||
function synchronizeRegisteredCustomer($wp_user_id, $current_filter = null) {
|
||||
if(!$current_filter && !Setting::getValue('enable_wc_hooks_testing')) {
|
||||
return false; // temporarily disable hooks (except for testing)
|
||||
}
|
||||
|
||||
$wc_segment = Segment::getWooCommerceSegment();
|
||||
|
||||
if($wc_segment === false) return;
|
||||
@@ -60,6 +65,10 @@ class WooCommerce {
|
||||
}
|
||||
|
||||
function synchronizeGuestCustomer($order_id, $current_filter = null) {
|
||||
if(!$current_filter && !Setting::getValue('enable_wc_hooks_testing')) {
|
||||
return false; // temporarily disable hooks (except for testing)
|
||||
}
|
||||
|
||||
$wc_order = \get_post($order_id);
|
||||
$wc_segment = Segment::getWooCommerceSegment();
|
||||
|
||||
|
Reference in New Issue
Block a user