You've already forked wc-licensed-product
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user