woocommerce-backend-dev_skill

This skill guides backend WooCommerce PHP development, ensuring code follows project conventions, naming, hooks, tests, and WordPress standards.
  • TypeScript

52

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill secondsky/claude-skills --skill woocommerce-backend-dev

  • SKILL.md2.1 KB

Overview

This skill guides developers to add or modify WooCommerce backend PHP code following the project conventions and standards. It focuses on class-based development, PSR-4 autoloading, dependency injection, and unit testing to ensure maintainable and production-ready backend changes.

How this skill works

The skill inspects the requested backend change and maps it to the project conventions: file placement, naming, hook usage, and test requirements. It enforces class-based implementations under the Automattic\WooCommerce namespace, recommends placing new internal classes in src/Internal, and provides steps for dependency injection and data integrity checks. It also explains how to determine correct @since version annotations from the trunk version.

When to use it

  • Creating new backend classes, services, or controllers for WooCommerce functionality.
  • Adding or modifying hook callbacks, filters, or actions in backend code.
  • Refactoring existing backend functions into class methods following project conventions.
  • Implementing or updating dependency injection registrations and container usage.
  • Adding or updating unit tests for backend logic and data integrity checks.

Best practices

  • Follow WordPress Coding Standards and PSR-4 autoloading with Automattic\WooCommerce namespace.
  • Prefer class methods over standalone functions and place new internals in src/Internal.
  • Use dependency injection via the project DI container for testable, decoupled code.
  • Ensure data integrity for CRUD operations by following project data-integrity patterns.
  • Write comprehensive unit tests and run linting and test suites before committing.

Example use cases

  • Add a new payment gateway backend class, register it with DI, and write unit tests validating behavior.
  • Refactor a procedural order validation function into a namespaced class with proper @since annotation.
  • Implement a new admin hook that modifies order metadata using class methods and documented callbacks.
  • Create a service to sync product data with external APIs, placed in src/Internal and covered by unit tests.

FAQ

Read the $version property in includes/class-woocommerce.php on the trunk branch, remove any -dev suffix, and use that value for @since annotations.

Where should I put new internal classes?

Place new internal classes in src/Internal/ by default and use the Automattic\WooCommerce namespace with PSR-4 autoloading.

Are standalone functions allowed?

Prefer class methods instead of standalone functions; use standalone functions only when project conventions explicitly permit them.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational