WooCommerce setup
Custom order statuses
Section titled “Custom order statuses”Three custom statuses are registered in inc/order-statuses.php:
| Status | Slug | Meaning |
|---|---|---|
| Pending fulfilment | wc-pending-ful | Payment confirmed, awaiting warehouse pick |
| Partially shipped | wc-partial-ship | Multi-item order, some items dispatched |
| Awaiting return | wc-return-wait | Return requested, item not yet received |
Checkout customisations
Section titled “Checkout customisations”- VAT number field added to checkout for B2B customers — stored as order meta
_vat_number - Postcode validation runs client-side via a custom JS validator before form submission
- Guest checkout is disabled — customers must create an account (required by MemberPress)
Payment gateway
Section titled “Payment gateway”Stripe is the sole payment method. The webhook endpoint is:
https://website-2.com/wc-api/WC_Gateway_StripeThe webhook secret is stored in .env as STRIPE_WEBHOOK_SECRET. Do not rotate it without updating this value.
Database
Section titled “Database”WooCommerce creates several high-write tables. Run the following periodically to keep them clean:
# Remove completed sessions older than 48hwp wc clean --sessions
# Remove orphaned order itemswp wc clean --order-items