+ Your cart is currently empty! +
+ + + + + +diff --git a/src/BlockTemplatesController.php b/src/BlockTemplatesController.php index be1fa2ea7da..054a9577310 100644 --- a/src/BlockTemplatesController.php +++ b/src/BlockTemplatesController.php @@ -25,18 +25,11 @@ class BlockTemplatesController { private $template_parts_directory; /** - * Directory name of the block template directory. + * Directory which contains all templates * * @var string */ - const TEMPLATES_DIR_NAME = 'block-templates'; - - /** - * Directory name of the block template parts directory. - * - * @var string - */ - const TEMPLATE_PARTS_DIR_NAME = 'block-template-parts'; + const TEMPLATES_ROOT_DIR = 'templates'; /** * Constructor. @@ -44,8 +37,10 @@ class BlockTemplatesController { public function __construct() { // This feature is gated for WooCommerce versions 6.0.0 and above. if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '6.0.0', '>=' ) ) { - $this->templates_directory = plugin_dir_path( __DIR__ ) . 'templates/' . self::TEMPLATES_DIR_NAME; - $this->template_parts_directory = plugin_dir_path( __DIR__ ) . 'templates/' . self::TEMPLATE_PARTS_DIR_NAME; + $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->init(); } } diff --git a/templates/parts/mini-cart.html b/templates/parts/mini-cart.html new file mode 100644 index 00000000000..c2400ba76ed --- /dev/null +++ b/templates/parts/mini-cart.html @@ -0,0 +1,31 @@ + +
+ Your cart is currently empty! +
+ + + + + +