Automattic\WooCommerce\Api\Attributes
Description{}
Provides a human-readable description for the annotated element.
Can be applied to classes (types, queries, mutations, enums), properties, or parameters. The text is exposed as the "description" field in the generated GraphQL schema and is visible in tools like GraphiQL.
No Hooks.
Usage
$Description = new Description(); // use class methods
Methods
- public __construct(
- ERROR: no method name found on line ``
Description{} Description{} code WC 10.9.1
final class Description {
/**
* Constructor.
*
* @param string $description The text to expose as the GraphQL description.
*/
public function __construct(
public readonly string $description,
) {
}
}