
Woocommerce
- 680 installs
- 215 repo stars
- Updated June 9, 2026
- mindrally/skills
woocommerce is a Claude Code skill that provides expert WordPress and WooCommerce development guidance on PHP standards, security, hooks, and extensibility for custom store functionality.
About
woocommerce is a mindrally/skills guideline pack for WordPress and WooCommerce development with PHP best practices, security standards, and extensibility patterns. The skill instructs Claude to follow WordPress coding standards, use WooCommerce hooks and filters correctly, prioritize security, maintain backwards compatibility, and prefix functions and classes to avoid conflicts. Developers reach for woocommerce when adding custom plugins, payment flows, or store extensions rather than building greenfield apps outside WordPress. Use it during WooCommerce feature work, checkout customization, or secure PHP module design on existing storefronts.
- WordPress coding standards and PHPDoc documentation rules
- Proper use of WooCommerce action and filter hooks with priority examples
- PHP namespacing and class patterns to prevent conflicts
- Security standards and backwards-compatibility requirements
- Performant, scalable e-commerce code patterns
Woocommerce by the numbers
- 680 all-time installs (skills.sh)
- +20 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #538 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mindrally/skills --skill woocommerceAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 680 |
|---|---|
| repo stars | ★ 215 |
| Last updated | June 9, 2026 |
| Repository | mindrally/skills ↗ |
How do you extend WooCommerce with secure custom PHP?
Get expert guidance when adding custom functionality, payment flows, or extensions to a WooCommerce store.
Who is it for?
PHP developers customizing WooCommerce stores who need Claude to follow WordPress coding standards, hooks, and e-commerce security practices.
Skip if: Headless commerce builds on non-WordPress stacks or teams with no WooCommerce/WordPress runtime in production.
When should I use this skill?
The user is building WooCommerce plugins, payment integrations, or store extensions using WordPress hooks, filters, and PHP modules.
What you get
Hook-based extension code, payment flow implementations, and WordPress-compliant PHP modules with conflict-safe naming.
- Custom plugin/extension code
- Hook integration patterns
- Payment flow implementation guidance
Files
WooCommerce Development
You are an expert in WordPress and WooCommerce development, PHP best practices, and e-commerce solutions.
Core Principles
- Follow WordPress coding standards
- Use WooCommerce hooks and filters properly
- Prioritize security in all code
- Maintain backwards compatibility
- Write performant, scalable code
PHP Best Practices
Coding Standards
- Follow WordPress PHP Coding Standards
- Use meaningful function and variable names
- Prefix all functions and classes to avoid conflicts
- Document code with PHPDoc comments
Namespacing
namespace MyPlugin\WooCommerce;
class ProductHandler {
public function __construct() {
add_action('woocommerce_before_add_to_cart_form', [$this, 'custom_content']);
}
public function custom_content() {
// Custom functionality
}
}WooCommerce Hooks
Action Hooks
// Add content after product summary
add_action('woocommerce_after_single_product_summary', 'custom_product_content', 15);
function custom_product_content() {
echo '<div class="custom-content">Additional information</div>';
}
// Modify order processing
add_action('woocommerce_order_status_completed', 'process_completed_order', 10, 1);
function process_completed_order($order_id) {
$order = wc_get_order($order_id);
// Process order
}Filter Hooks
// Modify product price display
add_filter('woocommerce_get_price_html', 'custom_price_html', 10, 2);
function custom_price_html($price, $product) {
if ($product->is_on_sale()) {
$price .= '<span class="sale-badge">Sale!</span>';
}
return $price;
}
// Add custom checkout fields
add_filter('woocommerce_checkout_fields', 'custom_checkout_fields');
function custom_checkout_fields($fields) {
$fields['billing']['billing_custom_field'] = [
'type' => 'text',
'label' => __('Custom Field', 'textdomain'),
'required' => false,
'priority' => 25,
];
return $fields;
}Security
Data Validation
// Sanitize input
$product_id = absint($_POST['product_id']);
$quantity = wc_stock_amount($_POST['quantity']);
$email = sanitize_email($_POST['email']);
// Escape output
echo esc_html($product->get_name());
echo esc_url($product->get_permalink());
echo wp_kses_post($product->get_description());Nonce Verification
// Create nonce
wp_nonce_field('custom_action', 'custom_nonce');
// Verify nonce
if (!wp_verify_nonce($_POST['custom_nonce'], 'custom_action')) {
wp_die(__('Security check failed', 'textdomain'));
}Capability Checks
if (!current_user_can('manage_woocommerce')) {
wp_die(__('Unauthorized access', 'textdomain'));
}Custom Product Types
class WC_Product_Custom extends WC_Product {
public function get_type() {
return 'custom';
}
// Custom methods
}
add_filter('product_type_selector', function($types) {
$types['custom'] = __('Custom Product', 'textdomain');
return $types;
});REST API Extensions
add_action('rest_api_init', function() {
register_rest_route('custom/v1', '/products/featured', [
'methods' => 'GET',
'callback' => 'get_featured_products',
'permission_callback' => '__return_true',
]);
});
function get_featured_products($request) {
$args = [
'status' => 'publish',
'featured' => true,
'limit' => 10,
];
$products = wc_get_products($args);
return rest_ensure_response($products);
}Database Operations
global $wpdb;
// Use prepare for queries with variables
$results = $wpdb->get_results($wpdb->prepare(
"SELECT * FROM {$wpdb->prefix}wc_orders WHERE status = %s",
'completed'
));
// Use WooCommerce data stores when possible
$product = new WC_Product();
$product->set_name('New Product');
$product->set_regular_price('29.99');
$product->save();Performance
- Use transients for caching
- Optimize database queries
- Lazy load when possible
- Minimize HTTP requests
- Use object caching
Caching
$cached_data = get_transient('custom_product_data');
if (false === $cached_data) {
$cached_data = expensive_query();
set_transient('custom_product_data', $cached_data, HOUR_IN_SECONDS);
}Plugin Structure
plugin-name/
├── plugin-name.php
├── includes/
│ ├── class-main.php
│ ├── class-admin.php
│ └── class-frontend.php
├── admin/
│ ├── css/
│ └── js/
├── public/
│ ├── css/
│ └── js/
├── templates/
└── languages/Testing
- Write unit tests with PHPUnit
- Use WP_UnitTestCase for WordPress tests
- Test with WooCommerce test helpers
- Validate with PHPCS WordPress standards
Related skills
How it compares
Choose woocommerce over generic PHP skills when the runtime is WordPress/WooCommerce and hook-based extensibility is required.
FAQ
What standards does the woocommerce skill enforce?
woocommerce enforces WordPress PHP coding standards, prefixed functions and classes, security-first patterns, and backwards-compatible WooCommerce hook usage.
When should developers use the woocommerce skill?
Developers should use woocommerce when adding custom store functionality, payment flows, or extensions that must integrate through WooCommerce hooks and WordPress conventions.