fix: add wp_body_open to WooCommerce header

This commit is contained in:
2026-05-21 14:46:36 +02:00
parent e90c251d0b
commit 07e0174035
10 changed files with 411 additions and 30 deletions

View File

@@ -0,0 +1,20 @@
Timestamp: 2026-05-21T14:32:06+02:00
Mode: plan
Scope: InPost Pay / wp_body_open / WooCommerce product pages
codebase-memory-mcp:
- list_projects did not include this repository.
- index_repository(mode=fast) for C:\visual-studio-code\krolewskie-miody.pl timed out after 120s.
- Status: degraded.
Fallback targeted scan:
- `rg -n "wp_body_open|<body|body_class|get_header\(|header\.php|woocommerce_before_single_product" wp-content\themes wp-content\plugins\inpost-pay wp-content\plugins\woocommerce -g "*.php"`
- `wp-content/themes/betheme/header.php` has `<body <?php body_class(); ?>>` followed by `<?php wp_body_open(); ?>`.
- `wp-content/themes/betheme/header-shop.php` has `<body <?php body_class(); ?>>` without `wp_body_open()`.
- `wp-content/themes/betheme/woocommerce.php` calls `get_header( 'shop' );`.
- `wp-content/themes/betheme/single-template.php` calls `get_header( 'shop' );` for `single-product` and `shop-archive` templates.
- `wp-content/plugins/inpost-pay/src/hooks/front/FrontWidgetV2.php` registers `add_root_script_after_body_open` on `wp_body_open`.
Conclusion:
- The homepage fix covered `header.php`, but WooCommerce product/shop pages can render through `header-shop.php`.
- Add `wp_body_open()` directly after the `<body>` tag in `header-shop.php`.

View File

@@ -0,0 +1,21 @@
Timestamp: 2026-05-21T14:37:52+02:00
Mode: post-apply
Scope: .paul/plans/20260521-1428-naprawa-wp-body-open-woocommerce/PLAN.md
codebase-memory-mcp:
- Post-apply MCP graph scan not rerun because the plan scan already degraded: repository indexing timed out after 120s.
- Fallback verification used targeted `rg` and `php -l`.
Changed files:
- `wp-content/themes/betheme/header-shop.php`
Verification:
- `rg -n "wp_body_open|<body" wp-content\themes\betheme\header.php wp-content\themes\betheme\header-shop.php`
Result: both `header.php` and `header-shop.php` contain `<body <?php body_class(); ?>>` immediately followed by `<?php wp_body_open(); ?>`.
- `rg -n "<body|wp_body_open" wp-content\themes\betheme -g "*.php"`
Result: standard frontend header and shop header include `wp_body_open()`. Special templates `template-blank.php`, `under-construction.php`, visual builder headers, and demo builder header still have separate `<body>` tags and were intentionally not changed.
- `php -l wp-content\themes\betheme\header-shop.php`
Result: No syntax errors detected.
Checkpoint:
- Manual production/staging verification remains required for `https://krolewskie-miody.pl/produkt/miod-borowkowy-400g/?showIzi=true`.