Refactor mailpoet_get_subscribers_in_segment_finders hook to direct calls
[MAILPOET-3077]
This commit is contained in:
committed by
Veljko V
parent
331e40a137
commit
dd7390ec73
@@ -3,14 +3,12 @@
|
||||
namespace MailPoet\DynamicSegments;
|
||||
|
||||
use MailPoet\DynamicSegments\FreePluginConnectors\AddToSubscribersFilters;
|
||||
use MailPoet\DynamicSegments\FreePluginConnectors\SendingNewslettersSubscribersFinder;
|
||||
use MailPoet\DynamicSegments\FreePluginConnectors\SubscribersBulkActionHandler;
|
||||
use MailPoet\DynamicSegments\FreePluginConnectors\SubscribersListingsHandlerFactory;
|
||||
use MailPoet\DynamicSegments\Mappers\DBMapper;
|
||||
use MailPoet\DynamicSegments\Persistence\Loading\Loader;
|
||||
use MailPoet\DynamicSegments\Persistence\Loading\SingleSegmentLoader;
|
||||
use MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount;
|
||||
use MailPoet\DynamicSegments\Persistence\Loading\SubscribersIds;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
class DynamicSegmentHooks {
|
||||
@@ -22,11 +20,6 @@ class DynamicSegmentHooks {
|
||||
}
|
||||
|
||||
public function init() {
|
||||
$this->wp->addAction(
|
||||
'mailpoet_get_subscribers_in_segment_finders',
|
||||
[$this, 'getSubscribersInSegmentsFinders']
|
||||
);
|
||||
|
||||
$this->wp->addAction(
|
||||
'mailpoet_get_subscribers_listings_in_segment_handlers',
|
||||
[$this, 'getSubscribersListingsInSegmentsHandlers']
|
||||
@@ -48,11 +41,6 @@ class DynamicSegmentHooks {
|
||||
);
|
||||
}
|
||||
|
||||
public function getSubscribersInSegmentsFinders(array $finders) {
|
||||
$finders[] = new SendingNewslettersSubscribersFinder(new SingleSegmentLoader(new DBMapper()), new SubscribersIds());
|
||||
return $finders;
|
||||
}
|
||||
|
||||
public function getSubscribersListingsInSegmentsHandlers(array $handlers) {
|
||||
$handlers[] = new SubscribersListingsHandlerFactory();
|
||||
return $handlers;
|
||||
|
Reference in New Issue
Block a user