Automattic\WooCommerce\Api\Attributes
Internal::transform_description
Prepend [Internal] to the description, supplying a default body when the element has no #[Description] of its own. See Metadata::transform_description() for the contract.
Method of the class: Internal{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Internal = new Internal(); $Internal->transform_description( $description ): string;
- $description(string) (required)
- Incoming description (empty when no
#[Description]).
Internal::transform_description() Internal::transform description code WC 10.9.1
public function transform_description( string $description ): string {
if ( '' === $description ) {
$description = 'For WooCommerce core internal usage only.';
}
return '[Internal] ' . $description;
}