Merge pull request #1707 from mailpoet/fix-wp-func-merge
Fix a duplicate constructor after merging encapsulated WP functions
This commit is contained in:
@@ -33,21 +33,21 @@ class Newsletters extends APIEndpoint {
|
||||
/** @var Listing\Handler */
|
||||
private $listing_handler;
|
||||
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public $permissions = array(
|
||||
'global' => AccessControl::PERMISSION_MANAGE_EMAILS
|
||||
);
|
||||
private $wp;
|
||||
|
||||
function __construct() {
|
||||
$this->wp = new WPFunctions;
|
||||
}
|
||||
|
||||
function __construct(
|
||||
Listing\BulkActionController $bulk_action,
|
||||
Listing\Handler $listing_handler
|
||||
Listing\Handler $listing_handler,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->bulk_action = $bulk_action;
|
||||
$this->listing_handler = $listing_handler;
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
function get($data = array()) {
|
||||
|
@@ -72,6 +72,8 @@ class ContainerConfigurator implements IContainerConfigurator {
|
||||
$container->autowire(\MailPoet\Subscription\Form::class)->setPublic(true);
|
||||
// Newsletter
|
||||
$container->autowire(\MailPoet\Newsletter\AutomatedLatestContent::class)->setPublic(true);
|
||||
// WordPress
|
||||
$container->autowire(\MailPoet\WP\Functions::class)->setPublic(true);
|
||||
return $container;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user