Automattic\WooCommerce\StoreApi\Routes\V1
Batch::get_args
Get arguments for this REST route.
Метод класса: Batch{}
Хуки из метода
Возвращает
Массив. An array of endpoints.
Использование
$Batch = new Batch(); $Batch->get_args();
Код Batch::get_args() Batch::get args WC 10.4.3
public function get_args() {
return array(
'callback' => [ $this, 'get_response' ],
'methods' => 'POST',
'permission_callback' => '__return_true',
'args' => array(
'validation' => array(
'type' => 'string',
'enum' => array( 'require-all-validate', 'normal' ),
'default' => 'normal',
),
'requests' => array(
'required' => true,
'type' => 'array',
'maxItems' => 25,
'items' => array(
'type' => 'object',
'properties' => array(
'method' => array(
'type' => 'string',
/**
* Filters the allowed methods for store API batch requests.
*
* @since 9.8.0
*
* @param string[] $methods Allowed methods.
*/
'enum' => apply_filters( '__experimental_woocommerce_store_api_batch_request_methods', array( 'POST', 'PUT', 'PATCH', 'DELETE' ) ),
'default' => 'POST',
),
'path' => array(
'type' => 'string',
'required' => true,
),
'body' => array(
'type' => 'object',
'properties' => array(),
'additionalProperties' => true,
),
'headers' => array(
'type' => 'object',
'properties' => array(),
'additionalProperties' => array(
'type' => array( 'string', 'array' ),
'items' => array(
'type' => 'string',
),
),
),
),
),
),
),
);
}