Add hooks for changing Twig cache path and disabling cache (for WP Engine) [MAILPOET-3157]

This commit is contained in:
wxa
2020-09-22 09:24:11 +03:00
committed by Veljko V
parent 9424049e76
commit fc31567b39
2 changed files with 4 additions and 2 deletions

View File

@@ -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);
}