From a1917d62c27af8bcdf2ddcb8a43c8934da5ba100 Mon Sep 17 00:00:00 2001
From: peptiderepo <273788462+peptiderepo@users.noreply.github.com>
Date: Fri, 24 Apr 2026 01:37:31 +0700
Subject: [PATCH] =?UTF-8?q?chore:=20remove=20WooCommerce=20from=20theme=20?=
=?UTF-8?q?=E2=80=94=20not=20used=20on=20peptiderepo.com=20(v1.7.0)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Remove all WC asset dequeue logic, cart icon conditional, and WC-specific tests from the theme. Eliminates the class of fatal errors seen in the 2026-04-23 incident where is_woocommerce() was called after WC deactivation.
Version: 1.6.x → 1.7.0
Reviewed-by: peptiderepo (CTO)
QA: qa-reviews/peptide-starter-theme/2026-04-23-d239bd1e.md
---
CHANGELOG.md | 16 +++++++++++
CONVENTIONS.md | 5 ----
header.php | 9 ------
inc/perf-asset-policy.php | 27 ++----------------
tests/test-perf-asset-policy.php | 47 ++------------------------------
5 files changed, 21 insertions(+), 83 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69c9de0..38789ed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,22 @@
All notable changes to the Peptide Starter Theme are documented in this file.
+## [1.7.0] - 2026-04-24 — Remove WooCommerce integration
+
+WooCommerce is not used on peptiderepo.com. Removing dead code reduces the asset
+dequeue surface and eliminates the function_exists() guard introduced in the 2026-04-23
+hotfix.
+
+### Removed
+- WooCommerce asset dequeue block from `inc/perf-asset-policy.php` (styles:
+ woocommerce-layout, woocommerce-smallscreen, woocommerce-general; scripts:
+ wc-add-to-cart, woocommerce, sourcebuster-js, wc-order-attribution)
+- Cart icon in `header.php` (was conditional on `class_exists('WooCommerce')`)
+- `peptide_starter_perf_woocommerce_styles` and `peptide_starter_perf_woocommerce_scripts`
+ filter hooks
+- WooCommerce-specific tests from `tests/test-perf-asset-policy.php`
+- WooCommerce section from README.md and CONVENTIONS.md
+
## [1.6.0] - 2026-04-23 — Mobile Performance Phase 1
Mobile-perf optimization targeting LCP reduction through conditional asset
diff --git a/CONVENTIONS.md b/CONVENTIONS.md
index 54919af..fe87483 100644
--- a/CONVENTIONS.md
+++ b/CONVENTIONS.md
@@ -460,11 +460,6 @@ if ( is_active_sidebar( 'footer-1' ) ) {
### Class Existence Check
-**For WooCommerce:**
-```php
-if ( class_exists( 'WooCommerce' ) ) {
- // Render cart icon
-}
```
**For post types:**
diff --git a/header.php b/header.php
index f234a65..50ac12f 100644
--- a/header.php
+++ b/header.php
@@ -115,15 +115,6 @@
-
-
-
-
-