Automattic\WooCommerce\StoreApi\Routes\V1

ProductCategoriesById::get_args()publicWC 1.0

Get method arguments for this REST route.

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

Хуков нет.

Возвращает

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

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

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

Код ProductCategoriesById::get_args() WC 8.7.0

public function get_args() {
	return [
		'args'   => array(
			'id' => array(
				'description' => __( 'Unique identifier for the resource.', 'woocommerce' ),
				'type'        => 'integer',
			),
		),
		[
			'methods'             => \WP_REST_Server::READABLE,
			'callback'            => [ $this, 'get_response' ],
			'permission_callback' => '__return_true',
			'args'                => array(
				'context' => $this->get_context_param(
					array(
						'default' => 'view',
					)
				),
			),
		],
		'schema' => [ $this->schema, 'get_public_item_schema' ],
	];
}