woocommerce-backend-dev
WooCommerce Backend Development
This skill provides guidance for developing WooCommerce backend PHP code according to project standards and conventions.
Instructions
Follow WooCommerce project conventions when adding or modifying backend PHP code:
- Creating new code structures: See file-entities.md for conventions on creating classes and organizing files (but for new unit test files see unit-tests.md).
- Naming conventions: See code-entities.md for naming methods, variables, and parameters
- Coding style: See coding-conventions.md for general coding standards and best practices
- Working with hooks: See hooks.md for hook callback conventions and documentation
- Dependency injection: See dependency-injection.md for DI container usage
- Data integrity: See data-integrity.md for ensuring data integrity when performing CRUD operations
- Writing tests: See unit-tests.md for unit testing conventions
Key Principles
- Always follow WordPress Coding Standards
- Use class methods instead of standalone functions
- Place new internal classes in
src/Internal/by default - Use PSR-4 autoloading with
Automattic\WooCommercenamespace - Write comprehensive unit tests for new functionality
- Run linting and tests before committing changes
- Prefer bun over npm/bunx for Node.js package management when applicable
Version Information
To determine the next WooCommerce version number for @since annotations:
- Read the
$versionproperty inincludes/class-woocommerce.phpon the trunk branch - Remove the
-devsuffix if present - Example: If trunk shows
10.4.0-dev, use@since 10.4.0 - Note: When reviewing PRs against trunk, the version in trunk is correct even if it seems "future" relative to released versions
More from secondsky/claude-skills
tailwind-v4-shadcn
| Production-tested setup for Tailwind CSS v4 with shadcn/ui, Vite, and React. Use when: initializing React projects with Tailwind v4, setting up shadcn/ui, implementing dark mode, debugging CSS variable issues, fixing theme switching, migrating from Tailwind v3, or encountering color/theming problems. Covers: @theme inline pattern, CSS variable architecture, dark mode with ThemeProvider, component composition, vite.config setup, common v4 gotchas, and production-tested patterns.
3.9Kaceternity-ui
100+ animated React components (Aceternity UI) for Next.js with Tailwind. Use for hero sections, parallax, 3D effects, or encountering animation, shadcn CLI integration errors.
667playwright
Browser automation and E2E testing with Playwright. Auto-detects dev servers, writes clean test scripts. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use for cross-browser testing, visual regression, API testing, component testing in TypeScript/JavaScript and Python projects.
439motion
>-
432api-testing
HTTP API testing for TypeScript (Supertest) and Python (httpx, pytest). Test REST APIs, GraphQL, request/response validation, authentication, and error handling.
341zod
TypeScript-first schema validation and type inference. Use for validating API requests/responses, form data, env vars, configs, defining type-safe schemas with runtime validation, transforming data, generating JSON Schema for OpenAPI/AI, or encountering missing validation errors, type inference issues, validation error handling problems. Zero dependencies (2kb gzipped).
307