diff --git a/mailpoet/lib/API/JSON/v1/Premium.php b/mailpoet/lib/API/JSON/v1/Premium.php index 5def327e28..855030c674 100644 --- a/mailpoet/lib/API/JSON/v1/Premium.php +++ b/mailpoet/lib/API/JSON/v1/Premium.php @@ -13,7 +13,8 @@ use WP_Error; class Premium extends APIEndpoint { const PREMIUM_PLUGIN_SLUG = 'mailpoet-premium'; const PREMIUM_PLUGIN_PATH = 'mailpoet-premium/mailpoet-premium.php'; - const SIMLINK_PATH = '../../../../wordpress/plugins/mailpoet-premium/latest'; + // This is the path to the managed plugin on Dotcom platform. It is relative to WP_PLUGIN_DIR. + const DOTCOM_SYMLINK_PATH = '../../../../wordpress/plugins/mailpoet-premium/latest'; public $permissions = [ 'global' => AccessControl::PERMISSION_MANAGE_SETTINGS, @@ -57,7 +58,7 @@ class Premium extends APIEndpoint { // If we are in Dotcom platform, we try to symlink the plugin instead of downloading it try { if ($this->dotcomHelperFunctions->isDotcom()) { - $result = symlink(self::SIMLINK_PATH, WP_PLUGIN_DIR . '/' . self::PREMIUM_PLUGIN_SLUG); + $result = symlink(self::DOTCOM_SYMLINK_PATH, WP_PLUGIN_DIR . '/' . self::PREMIUM_PLUGIN_SLUG); if ($result === true) { return $this->successResponse(); }