Replace "new SettingsController()" with fetch from DI container
[MAILPOET-2436]
This commit is contained in:
committed by
Jack Kitterhing
parent
c91cd1255a
commit
d970dda637
@@ -65,7 +65,7 @@ class Link {
|
||||
|
||||
static function processUrl($action, $url, $queue, $wp_user_preview = false) {
|
||||
if ($wp_user_preview) return $url;
|
||||
$settings = new SettingsController();
|
||||
$settings = SettingsController::getInstance();
|
||||
return ($queue !== false && (boolean)$settings->get('tracking.enabled')) ?
|
||||
self::getFullShortcode($action) :
|
||||
$url;
|
||||
@@ -77,7 +77,7 @@ class Link {
|
||||
$subscription_url_factory = SubscriptionUrlFactory::getInstance();
|
||||
switch ($shortcode_action) {
|
||||
case 'subscription_unsubscribe_url':
|
||||
$settings = new SettingsController();
|
||||
$settings = SettingsController::getInstance();
|
||||
// track unsubscribe event
|
||||
if ((boolean)$settings->get('tracking.enabled') && !$wp_user_preview) {
|
||||
$unsubscribe_event = new Unsubscribes();
|
||||
|
Reference in New Issue
Block a user