What problem does it solve?
Developing backend PHP code that adheres to complex project standards can be challenging and lead to inconsistencies. This Skill provides comprehensive guidance, ensuring new or modified code follows all PooCommerce conventions, from file structure to testing, reducing errors and rework.
Core Features & Use Cases
- Structured Code Creation: Guidelines for class creation, file organization, and namespace conventions (e.g.,
src/Internal/ by default).
- Naming & Style Enforcement: Rules for
snake_case naming, method visibility, static methods, and WordPress Coding Standards.
- Data Integrity & Security: Best practices for preventing data loss, handling race conditions, and validating operations.
- Testing & Documentation: Conventions for writing unit tests, using
@testdox, and documenting hooks and methods with @since annotations.
- Use Case: When creating a new feature, use this Skill to ensure every aspect of your backend PHP code, from class structure to hook documentation, aligns perfectly with PooCommerce's established standards.
Quick Start
Use the poocommerce-backend-dev skill to create a new internal utility class named 'OrderHelper' in 'src/Internal/Utils/' with a private method 'calculate_discount'.