Refactor mailpoet_subscribers_in_segment_apply_bulk_action_handlers to direct calls
[MAILPOET-3077]
This commit is contained in:
committed by
Veljko V
parent
a42b3d6e3f
commit
bf053edbfb
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace MailPoet\DynamicSegments;
|
||||
|
||||
use MailPoet\DynamicSegments\FreePluginConnectors\SubscribersBulkActionHandler;
|
||||
use MailPoet\DynamicSegments\Mappers\DBMapper;
|
||||
use MailPoet\DynamicSegments\Persistence\Loading\SingleSegmentLoader;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
@@ -16,22 +15,12 @@ class DynamicSegmentHooks {
|
||||
}
|
||||
|
||||
public function init() {
|
||||
$this->wp->addAction(
|
||||
'mailpoet_subscribers_in_segment_apply_bulk_action_handlers',
|
||||
[$this, 'applySubscriberBulkAction']
|
||||
);
|
||||
|
||||
$this->wp->addAction(
|
||||
'mailpoet_get_segment_filters',
|
||||
[$this, 'getSegmentFilters']
|
||||
);
|
||||
}
|
||||
|
||||
public function applySubscriberBulkAction(array $handlers) {
|
||||
$handlers[] = new SubscribersBulkActionHandler();
|
||||
return $handlers;
|
||||
}
|
||||
|
||||
public function getSegmentFilters($segmentId) {
|
||||
$singleSegmentLoader = new SingleSegmentLoader(new DBMapper());
|
||||
return $singleSegmentLoader->load($segmentId)->getFilters();
|
||||
|
Reference in New Issue
Block a user