Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLMutations
DeleteProduct::get_field_definition
Method of the class: DeleteProduct{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = DeleteProduct::get_field_definition(): array;
DeleteProduct::get_field_definition() DeleteProduct::get field definition code WC 10.9.1
public static function get_field_definition(): array {
return array(
'type' => Type::nonNull(
new \Automattic\WooCommerce\Api\Infrastructure\Schema\ObjectType(
array(
'name' => 'DeleteProductResult',
'fields' => array(
'result' => array( 'type' => Type::nonNull( Type::boolean() ) ),
),
)
)
),
'description' => __( 'Delete a product.', 'woocommerce' ),
'authorization' => array(
array(
'attribute' => 'RequiredCapability',
'args' => array(
0 => 'manage_woocommerce',
),
),
),
'args' => array(
'id' => array(
'type' => Type::nonNull( Type::int() ),
'description' => __( 'The ID of the product to delete.', 'woocommerce' ),
),
'force' => array(
'type' => Type::nonNull( Type::boolean() ),
'description' => __( 'Whether to permanently delete the product (bypass trash).', 'woocommerce' ),
'defaultValue' => false,
),
),
'resolve' => array( self::class, 'resolve' ),
);
}