Automattic\WooCommerce\Internal\Abilities\Domain
ProductDelete::get_registration_args
Get the ability registration arguments.
Method of the class: ProductDelete{}
No Hooks.
Returns
Array.
Usage
$result = ProductDelete::get_registration_args(): array;
Changelog
| Since 10.9.0 | Introduced. |
ProductDelete::get_registration_args() ProductDelete::get registration args code WC 11.0.1
public static function get_registration_args(): array {
return array(
'label' => __( 'Delete product', 'woocommerce' ),
'description' => __(
'Delete, trash, or restore a product.',
'woocommerce'
),
'category' => 'woocommerce',
'input_schema' => self::get_input_schema(),
'output_schema' => self::get_delete_output_schema(),
'execute_callback' => array( __CLASS__, 'execute' ),
'permission_callback' => array( __CLASS__, 'can_delete_product' ),
'meta' => array(
'show_in_rest' => true,
'mcp' => array(
'public' => true,
'type' => 'tool',
),
'annotations' => array(
'readonly' => false,
'idempotent' => true,
'destructive' => true,
),
),
);
}