WooCommerce code review
Reviews new WooCommerce code for payment, checkout and order mistakes before it ships to your store.
Claude's review
8/10 Specific WooCommerce review rules that catch real AI mistakes, with self check.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Review generated or changed WooCommerce code — extensions, payment and shipping integrations, checkout customizations, and order/product logic — before it ships. Best used reactively after an agent writes, edits, or reviews code touching WooCommerce APIs: wc_get_order, wc_get_orders, wc_get_product, WC() cart or session, woocommerce_* hooks, Store API endpoints, payment gateways, order or product meta, HPOS, subscriptions, or bookings. Use on 'review this Woo plugin', 'is this HPOS compatible', or after tasks like 'write a WooCommerce extension', 'add a checkout field', 'hook into the order flow', or 'update stock'. Enforces HPOS-safe order access, CRUD over direct meta, feature-compatibility declarations, server-side checkout validation, money-handling discipline, and hooks over template overrides. DO NOT USE for WordPress code without WooCommerce APIs (use wp-guard), generic code review (use clean-code-guard), test review (use test-guard), or store configuration and admin-screen questions.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: woo-guard
description: "Review generated or changed WooCommerce code — extensions, payment and shipping integrations, checkout customizations, and order/product logic — before it ships. Best used reactively after an agent writes, edits, or reviews code touching WooCommerce APIs: wc_get_order, wc_get_orders, wc_get_product, WC() cart or session, woocommerce_* hooks, Store API endpoints, payment gateways, order or product meta, HPOS, subscriptions, or bookings. Use on 'review this Woo plugin', 'is this HPOS compatible', or after tasks like 'write a WooCommerce extension', 'add a checkout field', 'hook into the order flow', or 'update stock'. Enforces HPOS-safe order access, CRUD over direct meta, feature-compatibility declarations, server-side checkout validation, money-handling discipline, and hooks over template overrides. DO NOT USE for WordPress code without WooCommerce APIs (use wp-guard), generic code review (use clean-code-guard), test review (use test-guard), or store configuration and admin-screen questions."
---
# Woo Guard
You are reviewing generated or changed WooCommerce code before it ships. Apply the rules below as a guard pass after the first implementation pass. WooCommerce is a moving platform — order storage changed engines, checkout changed frameworks — and code written from memory targets the WooCommerce of three years ago. With money on the line, "works on my demo store" is not a standard.
These rules exist because AI agents produce WooCommerce code with systematic failures: order meta read through `get_post_meta()` (broken on HPOS stores), products updated by direct meta writes that skip lookup tables and hooks, checkout validated only in JavaScript, prices computed in floats, and `woocommerce_*` hooks registered before confirming WooCommerce is active.
## How to use this skill
**Guard-pass mode** (recommended): after WooCommerce code has been generated or edited, apply the rules to the diff or target files, then run the self-check before delivery.
**Live mode** (explicit): when the user invokes this skill before writing WooCommerce code, apply the same rules while writing, then run the self-check before delivery.
**Review mode** (the user asks you to review or audit WooCommerce code): walk [references/review-checklist.md](references/review-checklist.md) and produce a structured findings report. Do not edit code in review mode unless asked.
**Security floor** — these hold in all WooCommerce code, at maximum severity, because money is on the line:
- Escape all output with the context-correct `esc_*` function.
- `wp_unslash()` then sanitize all request data before it touches logic.
- Capability check plus nonce on every state change.
- `$wpdb->prepare()` for every query containing a variable.
If wp-guard is installed, run it alongside for the full WordPress layer.
## Adapt to the project first
1. Read the project's agent instructions and the extension's declared WooCommerce version range. Project conventions win on conflict.
2. Determine the order storage mode this code must support: HPOS, legacy posts, or both (the default assumption is both).
3. Determine the checkout in play: Blocks/Store API, legacy shortcode checkout, or both. Hooks for one do not fire in the other.
4. Check whether WooCommerce activity is guarded: feature checks or `class_exists( 'WooCommerce' )` before any `wc_*` call or `woocommerce_*` hook.
## The Rules
### Order and product data — must fix
1. **Orders are not posts.** Access orders only through the CRUD API: `wc_get_order()`, `wc_get_orders()`, `$order->get_meta()`, `$order->update_meta_data()` + `$order->save()`. Forbidden on order data: `get_post_meta()`, `update_post_meta()`, `WP_Query`/`get_posts()` with `post_type => shop_order`, and direct `$wpdb` joins on postmeta. These work on legacy stores and silently break on HPOS stores. Details: [references/hpos-and-crud.md](references/hpos-and-crud.md).
...From amElnagdy's repository, MIT licence.
Related skills
-
Checked
WordPress development
Builds secure custom WordPress themes, plugins and Gutenberg blocks, plus WooCommerce and REST API work.
7/101 credit -
Checked
WooCommerce checkout blocks
Customises WooCommerce cart and checkout block pages with slot fills, inner blocks and Store API extensions.
8/101 credit -
Checked
WordPress plugin CVE hunt
Finds known security flaws in WordPress plugins by matching versions to CVE databases, for authorised tests.
7/101 credit -
Checked
WordPress code review
Reviews new WordPress plugin and theme code for security, translation and speed problems before it ships.
7/101 credit -
Checked
WordPress Performance Review
Reviews WordPress themes and plugins for slow queries, cache bypasses and memory risks, with fixes by line.
7/101 credit