Replace all WP function calls

This commit is contained in:
Amine Ben hammou
2019-02-20 18:56:48 +01:00
committed by M. Shull
parent 986482e34b
commit 0a436087e1
176 changed files with 1066 additions and 803 deletions

View File

@@ -9,6 +9,8 @@ use MailPoet\Models\SubscriberSegment;
/**
* Gets batches of subscribers from default segments.
*/
use MailPoet\WP\Functions as WPFunctions;
class DefaultSubscribersGetter extends SubscribersGetter {
/**
@@ -53,7 +55,7 @@ class DefaultSubscribersGetter extends SubscribersGetter {
->selectExpr(
'MAX(CASE WHEN ' . Segment::$_table . '.name IS NOT NULL ' .
'THEN ' . Segment::$_table . '.name ' .
'ELSE "' . __('Not In Segment', 'mailpoet') . '" END) as segment_name'
'ELSE "' . WPFunctions::get()->__('Not In Segment', 'mailpoet') . '" END) as segment_name'
)
->whereRaw(
SubscriberSegment::$_table . '.segment_id IN (' .