Automattic\WooCommerce\StoreApi\Routes\V1

ShopperListItemsByKey::get_argspublicWC 1.0

Get method arguments for this REST route.

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

Хуков нет.

Возвращает

Массив.

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

$ShopperListItemsByKey = new ShopperListItemsByKey();
$ShopperListItemsByKey->get_args();

Код ShopperListItemsByKey::get_args() WC 10.9.1

public function get_args() {
	return array(
		'args'   => array(
			'slug' => array(
				'description' => __( 'Stable slug for the list.', 'woocommerce' ),
				'type'        => 'string',
			),
			'key'  => array(
				'description' => __( 'Item key.', 'woocommerce' ),
				'type'        => 'string',
			),
		),
		array(
			'methods'             => \WP_REST_Server::DELETABLE,
			'callback'            => array( $this, 'get_response' ),
			'permission_callback' => function () {
				return is_user_logged_in();
			},
		),
		'schema' => array( $this->schema, 'get_public_item_schema' ),
	);
}