Improve naming of symlink constant
[MAILPOET-5435]
This commit is contained in:
committed by
Aschepikov
parent
967de81760
commit
eaf82fce3f
@@ -13,7 +13,8 @@ use WP_Error;
|
|||||||
class Premium extends APIEndpoint {
|
class Premium extends APIEndpoint {
|
||||||
const PREMIUM_PLUGIN_SLUG = 'mailpoet-premium';
|
const PREMIUM_PLUGIN_SLUG = 'mailpoet-premium';
|
||||||
const PREMIUM_PLUGIN_PATH = 'mailpoet-premium/mailpoet-premium.php';
|
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 = [
|
public $permissions = [
|
||||||
'global' => AccessControl::PERMISSION_MANAGE_SETTINGS,
|
'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
|
// If we are in Dotcom platform, we try to symlink the plugin instead of downloading it
|
||||||
try {
|
try {
|
||||||
if ($this->dotcomHelperFunctions->isDotcom()) {
|
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) {
|
if ($result === true) {
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user