diff --git a/lib/Config/Env.php b/lib/Config/Env.php index b982f4c7ec..9217025131 100644 --- a/lib/Config/Env.php +++ b/lib/Config/Env.php @@ -54,7 +54,7 @@ class Env { self::$utilPath = self::$path . '/lib/Util'; $wpUploadDir = WPFunctions::get()->wpUploadDir(); self::$tempPath = $wpUploadDir['basedir'] . '/' . self::$pluginName; - self::$cachePath = self::$tempPath . '/cache'; + self::$cachePath = WPFunctions::get()->applyFilters('mailpoet_template_cache_path', self::$tempPath . '/cache'); self::$tempUrl = $wpUploadDir['baseurl'] . '/' . self::$pluginName; self::$languagesPath = self::$path . '/lang'; self::$libPath = self::$path . '/lib'; diff --git a/lib/Config/RendererFactory.php b/lib/Config/RendererFactory.php index 121d1cfa3f..89a07ac2d4 100644 --- a/lib/Config/RendererFactory.php +++ b/lib/Config/RendererFactory.php @@ -2,6 +2,8 @@ namespace MailPoet\Config; +use MailPoet\WP\Functions as WPFunctions; + class RendererFactory { /** @var Renderer|null */ @@ -9,7 +11,7 @@ class RendererFactory { public function getRenderer() { if (!$this->renderer) { - $caching = !WP_DEBUG; + $caching = WPFunctions::get()->applyFilters('mailpoet_template_cache_enabled', !WP_DEBUG); $debugging = WP_DEBUG; $this->renderer = new Renderer($caching, $debugging); }