Install
openclaw skills install skill-woocommerce-order-guardMonitors new WooCommerce processing orders, auto-copies missing shipping addresses from billing, and emits one alert per new order for automation.
openclaw skills install skill-woocommerce-order-guardWatches WooCommerce for new 'processing' orders and auto-fixes missing shipping addresses by copying billing → shipping. Deduplicates alerts so each new order triggers exactly once. Designed to run as a cron heartbeat or webhook trigger.
WooCommerce sometimes receives orders where customers skip the shipping address form. This script ensures every processing order has a valid shipping address before fulfillment, and emits a signal for downstream automation (Telegram alert, CJ fulfillment, etc.)
python3 scripts/order-guard.py
Optional args:
python3 scripts/order-guard.py \
--creds /path/to/woo-api.json \
--storage /path/to/fulfilled_orders.json
HEARTBEAT_OK — no new ordersNEW_ORDER_ID: <id> — one line per new order (pipe to Telegram alert, CJ submit, etc.)woo-api.json{
"url": "https://yourstore.com",
"consumerKey": "ck_...",
"consumerSecret": "cs_..."
}
Generate keys: WooCommerce → Settings → Advanced → REST API.
Local JSON at --storage path (default: ~/.openclaw/workspace/memory/fulfilled_orders.json).
{"alerted_orders": [12345, 12346]}
Prevents duplicate alerts across runs.
*/5 * * * * python3 /path/to/skill-woocommerce-order-guard/scripts/order-guard.py >> /tmp/order-guard.log 2>&1
requests library (pip install requests)processing orders (last 20)NEW_ORDER_ID: <id> and save to dedup store