Automattic\WooCommerce\Api\Attributes

Description{}finalWC 1.0#[Attribute]

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.

Хуков нет.

Использование

$Description = new Description();
// use class methods

Методы

  1. public __construct(
  2. ERROR: no method name found on line ``

Код Description{} WC 11.0.1

final class Description {
	/**
	 * Constructor.
	 *
	 * @param string $description The text to expose as the GraphQL description.
	 */
	public function __construct(
		public readonly string $description,
	) {
	}
}