Automattic\WooCommerce\StoreApi\Routes\V1

CartExtensions::get_args()publicWC 1.0

Get method arguments for this REST route.

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

Хуков нет.

Возвращает

Массив. An array of endpoints.

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

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

Код CartExtensions::get_args() WC 8.7.0

public function get_args() {
	return [
		[
			'methods'             => \WP_REST_Server::CREATABLE,
			'callback'            => [ $this, 'get_response' ],
			'permission_callback' => '__return_true',
			'args'                => [
				'namespace' => [
					'description' => __( 'Extension\'s name - this will be used to ensure the data in the request is routed appropriately.', 'woocommerce' ),
					'type'        => 'string',
				],
				'data'      => [
					'description' => __( 'Additional data to pass to the extension', 'woocommerce' ),
					'type'        => 'object',
				],
			],
		],
		'schema'      => [ $this->schema, 'get_public_item_schema' ],
		'allow_batch' => [ 'v1' => true ],
	];
}