From e0e4443b703978d50b8676f3c95e816c14cbcc58 Mon Sep 17 00:00:00 2001 From: Lucio Giannotta Date: Mon, 27 Dec 2021 19:39:17 +0100 Subject: [PATCH] Change `BlockTemplatesController` constructor to get correct dir names --- src/BlockTemplatesController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BlockTemplatesController.php b/src/BlockTemplatesController.php index ae00b9bc663..c8fa68f0285 100644 --- a/src/BlockTemplatesController.php +++ b/src/BlockTemplatesController.php @@ -39,8 +39,8 @@ public function __construct() { if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '6.0.0', '>=' ) ) { $root_path = plugin_dir_path( __DIR__ ) . self::TEMPLATES_ROOT_DIR . DIRECTORY_SEPARATOR; - $this->templates_directory = $root_path . BlockTemplateUtils::TEMPLATES_DIR_NAME; - $this->template_parts_directory = $root_path . BlockTemplateUtils::TEMPLATE_PARTS_DIR_NAME; + $this->templates_directory = $root_path . BlockTemplateUtils::DIRECTORY_NAMES['TEMPLATES']; + $this->template_parts_directory = $root_path . BlockTemplateUtils::DIRECTORY_NAMES['TEMPLATE_PARTS']; $this->init(); } }