wc-order-lifecycle-and-items

Installation
SKILL.md

WooCommerce order lifecycle and items

Use this when plugin code reacts to orders, changes statuses, creates or edits order items, changes totals, or depends on stock/payment side effects.

Misconception this skill corrects

"The payment succeeded, so I can just call $order->update_status( 'completed' )."

For a real payment success path, gateways should call $order->payment_complete( $transaction_id ). That clears the awaiting-payment session flag, sets transaction/date-paid data, chooses processing vs completed via woocommerce_payment_complete_order_status, saves, and fires woocommerce_payment_complete. update_status() still fires status hooks, emails, and stock handlers, but it does not perform the full paid-order contract.

When to use this skill

Trigger when ANY of the following is true:

Installs
1
GitHub Stars
22
First Seen
1 day ago
wc-order-lifecycle-and-items — lonsdale201/wp-agent-skills