Ignore exceptions when symlink premium
This is a nice to have and should not block the installation. [MAILPOET-5435]
This commit is contained in:
committed by
Aschepikov
parent
2d31cc4bc4
commit
d0e72c8fa8
@@ -55,11 +55,15 @@ class Premium extends APIEndpoint {
|
|||||||
$pluginInfo = (array)$pluginInfo;
|
$pluginInfo = (array)$pluginInfo;
|
||||||
|
|
||||||
// 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
|
||||||
if ($this->dotcomHelperFunctions->isDotcom()) {
|
try {
|
||||||
$result = symlink(self::SIMLINK_PATH, WP_PLUGIN_DIR . '/' . self::PREMIUM_PLUGIN_SLUG);
|
if ($this->dotcomHelperFunctions->isDotcom()) {
|
||||||
if ($result === true) {
|
$result = symlink(self::SIMLINK_PATH, WP_PLUGIN_DIR . '/' . self::PREMIUM_PLUGIN_SLUG);
|
||||||
return $this->successResponse();
|
if ($result === true) {
|
||||||
|
return $this->successResponse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
// Do nothing and continue with a regular installation
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->wp->installPlugin($pluginInfo['download_link']);
|
$result = $this->wp->installPlugin($pluginInfo['download_link']);
|
||||||
|
Reference in New Issue
Block a user