WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Blocks\StoreApi\Routes

CartSelectShippingRate::get_args() public WC 1.0

Get method arguments for this REST route.

{} Это метод класса: CartSelectShippingRate{}

Хуков нет.

Возвращает

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

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

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

Код CartSelectShippingRate::get_args() WC 5.7.1

public function get_args() {
	return [
		[
			'methods'             => \WP_REST_Server::CREATABLE,
			'callback'            => [ $this, 'get_response' ],
			'permission_callback' => '__return_true',
			'args'                => [
				'package_id' => array(
					'description' => __( 'The ID of the package being shipped.', 'woocommerce' ),
					'type'        => [ 'integer', 'string' ],
					'required'    => true,
				),
				'rate_id'    => [
					'description' => __( 'The chosen rate ID for the package.', 'woocommerce' ),
					'type'        => 'string',
					'required'    => true,
				],
			],
		],
		'schema'      => [ $this->schema, 'get_public_item_schema' ],
		'allow_batch' => [ 'v1' => true ],
	];
}