From b8001a5ab08cc96ab2c11a15cb8d3307b5152ff0 Mon Sep 17 00:00:00 2001 From: magdev Date: Sat, 28 Feb 2026 12:58:43 +0100 Subject: [PATCH] Fix CSS dependency handle and update documentation Correct wc-bootstrap-overrides stylesheet dependency from unregistered 'woocommerce' handle to 'woocommerce-general'. Update README directory structure to reflect wc-base.html.twig rename and .env-dist location. Add Fixed section to CHANGELOG. Co-Authored-By: Claude Opus 4.6 --- CHANGELOG.md | 5 +++++ README.md | 11 ++++++++--- functions.php | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0b6cbf..ce3083a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,11 @@ All notable changes to this project will be documented in this file. - Translation support (`.pot` template ready) - Docker development environment (multistage Dockerfile, Compose, auto-setup entrypoint) +### Fixed + +- Rename `base.html.twig` → `wc-base.html.twig` to prevent shadowing the parent theme's page shell via Twig `FilesystemLoader` path priority +- Correct CSS dependency handle from `woocommerce` to `woocommerce-general` for `wc-bootstrap-overrides` stylesheet + ### Skipped - **Phase 8** (Email templates): WooCommerce emails use `wc_get_template_html()` which bypasses the Twig rendering pipeline. Default email templates are sufficient; customization can be handled via dedicated email plugins. diff --git a/README.md b/README.md index 62bc30a..7275836 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,12 @@ wc-bootstrap/ │ └── WooCommerceExtension.php # WC/WP Twig functions & filters ├── languages/ # Translation files ├── templates/ # Bootstrap 5 Twig template overrides +│ ├── wc-base.html.twig # Base layout (extends parent's base.html.twig) +│ ├── layouts/ # Page-type layouts (account, archive, form, page, single) │ ├── archive-product.html.twig +│ ├── content-product.html.twig +│ ├── content-product-cat.html.twig +│ ├── product-searchform.html.twig │ ├── auth/ │ ├── brands/ │ ├── cart/ @@ -79,8 +84,8 @@ wc-bootstrap/ ├── docker/ │ ├── Dockerfile # Multistage build (WC download, npm, composer, WP) │ ├── entrypoint.sh # Auto-setup wrapper entrypoint -│ ├── setup.sh # First-run WP install + plugin/theme activation -│ └── .env-dist # Environment variable template +│ └── setup.sh # First-run WP install + plugin/theme activation +├── .env-dist # Environment variable template ├── compose.yaml # WordPress + MariaDB services ├── compose.override.yaml # Dev overrides (bind mounts, debug flags) ├── composer.json @@ -106,7 +111,7 @@ WooCommerce wc_get_template("cart/cart.php") ```bash # Copy and adjust environment variables (optional) -cp docker/.env-dist .env +cp .env-dist .env # Build and start docker compose build diff --git a/functions.php b/functions.php index da44e9c..07abe74 100644 --- a/functions.php +++ b/functions.php @@ -114,7 +114,7 @@ function wc_bootstrap_enqueue_styles(): void { wp_enqueue_style( 'wc-bootstrap-overrides', get_stylesheet_directory_uri() . '/assets/css/wc-bootstrap.css', - array( 'wc-bootstrap-style', 'woocommerce' ), + array( 'wc-bootstrap-style', 'woocommerce-general' ), $theme_version ); }