Automattic\WooCommerce\StoreApi\Routes\V1
CartUpdateItem::get_args
Get method arguments for this REST route.
Метод класса: CartUpdateItem{}
Хуков нет.
Возвращает
Массив. An array of endpoints.
Использование
$CartUpdateItem = new CartUpdateItem(); $CartUpdateItem->get_args();
Код CartUpdateItem::get_args() CartUpdateItem::get args WC 10.3.5
public function get_args() {
return [
[
'methods' => \WP_REST_Server::CREATABLE,
'callback' => [ $this, 'get_response' ],
'permission_callback' => '__return_true',
'args' => [
'key' => [
'description' => __( 'Unique identifier (key) for the cart item to update.', 'woocommerce' ),
'type' => 'string',
],
'quantity' => [
'description' => __( 'New quantity of the item in the cart.', 'woocommerce' ),
'type' => 'number',
'arg_options' => [
'sanitize_callback' => 'wc_stock_amount',
],
],
],
],
'schema' => [ $this->schema, 'get_public_item_schema' ],
'allow_batch' => [ 'v1' => true ],
];
}