Automattic\WooCommerce\Blocks\StoreApi\Routes
CartUpdateItem::get_args() public WC 1.0
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 5.1.0
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' => 'integer',
],
],
],
'schema' => [ $this->schema, 'get_public_item_schema' ],
];
}