Enable Twig auto_reload to always check for template changes

This ensures template changes are detected even when WP_DEBUG is false,
avoiding stale cache issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-21 22:59:53 +01:00
parent 7343cfb87a
commit e88423e882

View File

@@ -86,7 +86,7 @@ final class Plugin
$loader = new FilesystemLoader(WC_LICENSED_PRODUCT_PLUGIN_DIR . 'templates');
$this->twig = new Environment($loader, [
'cache' => WP_CONTENT_DIR . '/cache/wc-licensed-product/twig',
'auto_reload' => WP_DEBUG,
'auto_reload' => true, // Always check for template changes
]);
// Add WordPress functions as Twig functions