From woocommerce-commerce
Write modern PHP 8.x code with typed properties, enums, readonly classes, match expressions, named arguments, union types, fibers, attributes, and constructor promotion. For WooCommerce or PHP 8.x projects.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin woocommerce-commerceThis skill is limited to using the following tools:
**Fetch live docs**: Web-search `site:php.net manual migration` for the latest PHP migration guide and new features. Check `https://www.php.net/releases/` for current supported versions.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Fetch live docs: Web-search site:php.net manual migration for the latest PHP migration guide and new features. Check https://www.php.net/releases/ for current supported versions.
Declare and assign properties directly in the constructor signature — eliminates boilerplate. Useful in WooCommerce extension classes.
Call functions with parameter names: array_slice(array: $arr, offset: 2). Improves readability for functions with many parameters.
Type-safe switch replacement that returns a value. No fall-through, strict comparison. Better than switch for value mapping.
int|string in parameter and return types. Allows multiple type declarations.
$obj?->method()?->property — short-circuits to null if any part is null. Replaces nested null checks.
Native metadata annotations: #[Route('/path')], #[Override]. Replace docblock annotations with first-class language support.
First-class enumerations — backed (string/int) and unit enums. Perfect for status codes, types, categories. Use backed enums for database/API values.
public readonly string $name — can only be set once (usually in constructor). Enforces immutability.
Lightweight concurrency primitives — PHP-level coroutines. Foundation for async frameworks.
TypeA&TypeB — value must satisfy ALL types. Useful for ensuring a parameter implements multiple interfaces.
strlen(...) creates a Closure from a function. Cleaner than Closure::fromCallable('strlen').
readonly class Dto { ... } — all properties are implicitly readonly. Perfect for Data Transfer Objects and value objects.
Creating properties not declared in the class is deprecated. Always declare properties.
true, false, null as standalone types in declarations.
Traits can now define constants.
const string NAME = 'value'; — type-safe constants. Strengthens contract enforcement.
#[\Override] AttributeDocuments that a method intentionally overrides a parent method. Compiler error if the parent method doesn't exist.
json_validate() FunctionValidate JSON without decoding — faster than json_decode + error check.
$class::{$constant} — dynamic constant access.
Define get/set behavior directly on properties:
public string $name {
set => strtolower($value);
get => ucfirst($this->name);
}
public private(set) string $name — readable publicly, writable only privately.
declare(strict_types=1); in all files?string or string|nullUse readonly classes for DTOs and value objects — common in service layers.
Replace string/int constants with backed enums for order statuses, product types, etc.
WPCS uses tabs for indentation and Yoda conditions ('value' === $var). This differs from PSR-12 (spaces, non-Yoda). When writing WooCommerce extensions, follow WPCS; for standalone PHP libraries, follow PSR-12.
declare(strict_types=1);#[\Override] when overriding parent methodsFetch php.net docs for exact syntax and behavior of new features before using them.