Automattic\WooCommerce\Api\Attributes
Deprecated{}
Marks a field or enum value as deprecated in the GraphQL schema.
Deprecated elements remain functional but are flagged with a deprecation reason in introspection, signaling to API consumers that they should migrate to an alternative.
No Hooks.
Usage
$Deprecated = new Deprecated(); // use class methods
Methods
- public __construct(
- ERROR: no method name found on line ``
Deprecated{} Deprecated{} code WC 10.9.1
final class Deprecated {
/**
* Constructor.
*
* @param string $reason A human-readable explanation of why the element is
* deprecated and what to use instead.
*/
public function __construct(
public readonly string $reason,
) {
}
}