WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Routes

Batch::get_args() public WC 1.0

Get arguments for this REST route.

{} It's a method of the class: Batch{}

No Hooks.

Return

Array. An array of endpoints.

Usage

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

Code of Batch::get_args() WC 5.5.2

<?php
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',
							'enum'    => 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',
								),
							),
						),
					),
				),
			),
		),
	);
}