You've already forked wc-bootstrap
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 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,11 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Translation support (`.pot` template ready)
|
- Translation support (`.pot` template ready)
|
||||||
- Docker development environment (multistage Dockerfile, Compose, auto-setup entrypoint)
|
- 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
|
### 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.
|
- **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.
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -64,7 +64,12 @@ wc-bootstrap/
|
|||||||
│ └── WooCommerceExtension.php # WC/WP Twig functions & filters
|
│ └── WooCommerceExtension.php # WC/WP Twig functions & filters
|
||||||
├── languages/ # Translation files
|
├── languages/ # Translation files
|
||||||
├── templates/ # Bootstrap 5 Twig template overrides
|
├── 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
|
│ ├── archive-product.html.twig
|
||||||
|
│ ├── content-product.html.twig
|
||||||
|
│ ├── content-product-cat.html.twig
|
||||||
|
│ ├── product-searchform.html.twig
|
||||||
│ ├── auth/
|
│ ├── auth/
|
||||||
│ ├── brands/
|
│ ├── brands/
|
||||||
│ ├── cart/
|
│ ├── cart/
|
||||||
@@ -79,8 +84,8 @@ wc-bootstrap/
|
|||||||
├── docker/
|
├── docker/
|
||||||
│ ├── Dockerfile # Multistage build (WC download, npm, composer, WP)
|
│ ├── Dockerfile # Multistage build (WC download, npm, composer, WP)
|
||||||
│ ├── entrypoint.sh # Auto-setup wrapper entrypoint
|
│ ├── entrypoint.sh # Auto-setup wrapper entrypoint
|
||||||
│ ├── setup.sh # First-run WP install + plugin/theme activation
|
│ └── setup.sh # First-run WP install + plugin/theme activation
|
||||||
│ └── .env-dist # Environment variable template
|
├── .env-dist # Environment variable template
|
||||||
├── compose.yaml # WordPress + MariaDB services
|
├── compose.yaml # WordPress + MariaDB services
|
||||||
├── compose.override.yaml # Dev overrides (bind mounts, debug flags)
|
├── compose.override.yaml # Dev overrides (bind mounts, debug flags)
|
||||||
├── composer.json
|
├── composer.json
|
||||||
@@ -106,7 +111,7 @@ WooCommerce wc_get_template("cart/cart.php")
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Copy and adjust environment variables (optional)
|
# Copy and adjust environment variables (optional)
|
||||||
cp docker/.env-dist .env
|
cp .env-dist .env
|
||||||
|
|
||||||
# Build and start
|
# Build and start
|
||||||
docker compose build
|
docker compose build
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ function wc_bootstrap_enqueue_styles(): void {
|
|||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'wc-bootstrap-overrides',
|
'wc-bootstrap-overrides',
|
||||||
get_stylesheet_directory_uri() . '/assets/css/wc-bootstrap.css',
|
get_stylesheet_directory_uri() . '/assets/css/wc-bootstrap.css',
|
||||||
array( 'wc-bootstrap-style', 'woocommerce' ),
|
array( 'wc-bootstrap-style', 'woocommerce-general' ),
|
||||||
$theme_version
|
$theme_version
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user