WooCommerce Skill
WooCommerce store development — from product setup to custom pricing, payment gateways, and checkout customization.
RULE: Show code plan before generating any hooks or overrides. Wait for GO.
🚧 Status: Stub — implementation pending
This reference skill has the structure but the snippet content is still being filled in
(you'll see <!-- TODO --> placeholders below). It activates and tells Claude the topic
exists, but won't yield deep snippets yet.
Want to help? Pick any TODO, write the snippet, open a PR. See CONTRIBUTING.md.
Each contribution moves the skill closer to "Ready" status.
Capabilities
Product Setup & Variations
Custom Pricing Rules
Payment Gateway Integration
WooCommerce Hooks
Cart & Checkout Customization
WebToffee CSV Import/Export
Common Patterns
Custom pricing by user role
add_filter( 'woocommerce_product_get_price', function( $price, $product ) {
if ( current_user_can( 'wholesale_customer' ) ) {
return $price * 0.8; // 20% discount
}
return $price;
}, 10, 2 );
Add custom checkout field
add_action( 'woocommerce_after_order_notes', function( $checkout ) {
woocommerce_form_field( 'custom_field', [
'type' => 'text',
'class' => ['form-row-wide'],
'label' => __( 'Custom Field' ),
'placeholder' => __( 'Enter value' ),
'required' => false,
], $checkout->get_value( 'custom_field' ) );
});
add_action( 'woocommerce_checkout_update_order_meta', function( $order_id ) {
if ( ! empty( $_POST['custom_field'] ) ) {
update_post_meta( $order_id, '_custom_field', sanitize_text_field( $_POST['custom_field'] ) );
}
});
Order status change hook
add_action( 'woocommerce_order_status_changed', function( $order_id, $from, $to, $order ) {
if ( $to === 'completed' ) {
// Send custom notification, trigger fulfillment, etc.
}
}, 10, 4 );
1---2name: woocommerce3description: WooCommerce development — products, variations, pricing rules, payment gateways, hooks, cart/checkout customization, WebToffee CSV import/export4---56# WooCommerce Skill78WooCommerce store development — from product setup to custom pricing, payment gateways, and checkout customization.910**RULE: Show code plan before generating any hooks or overrides. Wait for GO.**1112> **🚧 Status: Stub — implementation pending**13>14> This reference skill has the structure but the snippet content is still being filled in15> (you'll see `<!-- TODO -->` placeholders below). It activates and tells Claude the topic16> exists, but won't yield deep snippets yet.17>18> **Want to help?** Pick any TODO, write the snippet, open a PR. See [CONTRIBUTING.md](../../CONTRIBUTING.md).19> Each contribution moves the skill closer to "Ready" status.2021---2223## Capabilities2425### Product Setup & Variations26<!-- TODO: Simple, variable, grouped, external products via WP-CLI and PHP -->27<!-- TODO: Product attributes, variation pricing matrix -->28<!-- TODO: Product meta, custom fields via ACF + WooCommerce -->29<!-- TODO: Bulk product import/export (WebToffee, WooCommerce native) -->3031### Custom Pricing Rules32<!-- TODO: Role-based pricing, quantity discounts -->33<!-- TODO: Dynamic pricing hooks: woocommerce_product_get_price -->34<!-- TODO: Cart-level discounts vs product-level -->3536### Payment Gateway Integration37<!-- TODO: Custom gateway class extending WC_Payment_Gateway -->38<!-- TODO: Webhook handling, IPN verification -->39<!-- TODO: Stripe, Razorpay, PayU, Cashfree integration patterns -->40<!-- TODO: Test mode, logging, order status transitions -->4142### WooCommerce Hooks43<!-- TODO: Product hooks: woocommerce_before/after_add_to_cart_button -->44<!-- TODO: Cart hooks: woocommerce_cart_contents, woocommerce_cart_total -->45<!-- TODO: Order hooks: woocommerce_checkout_create_order, woocommerce_order_status_changed -->46<!-- TODO: Email hooks: woocommerce_email_order_details -->4748### Cart & Checkout Customization49<!-- TODO: Add custom fields to checkout: billing, shipping, order notes -->50<!-- TODO: Conditionally hide/show payment methods -->51<!-- TODO: Custom order validation, minimum order amount -->52<!-- TODO: Block-based checkout customization -->5354### WebToffee CSV Import/Export55<!-- TODO: Column mapping for product import, variations handling -->56<!-- TODO: Scheduled exports, filtered exports by category/status -->57<!-- TODO: Order export for accounting, custom field export -->5859---6061## Common Patterns6263### Custom pricing by user role64```php65add_filter( 'woocommerce_product_get_price', function( $price, $product ) {66 if ( current_user_can( 'wholesale_customer' ) ) {67 return $price * 0.8; // 20% discount68 }69 return $price;70}, 10, 2 );71```7273### Add custom checkout field74```php75add_action( 'woocommerce_after_order_notes', function( $checkout ) {76 woocommerce_form_field( 'custom_field', [77 'type' => 'text',78 'class' => ['form-row-wide'],79 'label' => __( 'Custom Field' ),80 'placeholder' => __( 'Enter value' ),81 'required' => false,82 ], $checkout->get_value( 'custom_field' ) );83});8485add_action( 'woocommerce_checkout_update_order_meta', function( $order_id ) {86 if ( ! empty( $_POST['custom_field'] ) ) {87 update_post_meta( $order_id, '_custom_field', sanitize_text_field( $_POST['custom_field'] ) );88 }89});90```9192### Order status change hook93```php94add_action( 'woocommerce_order_status_changed', function( $order_id, $from, $to, $order ) {95 if ( $to === 'completed' ) {96 // Send custom notification, trigger fulfillment, etc.97 }98}, 10, 4 );99```100101<!-- TODO: Add full interactive workflows for each capability above -->