Automattic\WooCommerce\Internal\Abilities\Domain

ProductCreate::get_registration_args │ public static │ WC 10.9.0

Get the ability registration arguments.

Метод класса: ProductCreate{}

Хуков нет.

Возвращает

array.

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

$result = ProductCreate::get_registration_args(): array;

Список изменений

С версии 10.9.0 Введена.

Код ProductCreate::get_registration_args() WC 11.3.0

public static function get_registration_args(): array {
	return array(
		'label'               => __( 'Create product', 'woocommerce' ),
		'description'         => __(
			'Create a product using supported catalog fields.',
			'woocommerce'
		),
		'category'            => 'woocommerce',
		'input_schema'        => self::build_input_schema(),
		'output_schema'       => self::get_entity_output_schema( 'product', self::get_product_output_schema() ),
		'permission_callback' => array( __CLASS__, 'can_create_product' ),
		'meta'                => array(
			'show_in_rest' => true,
			'mcp'          => array(
				'public' => true,
				'type'   => 'tool',
			),
			'annotations'  => array(
				'readonly'    => false,
				'idempotent'  => false,
				'destructive' => false,
			),
		),
	);
}