Automattic\WooCommerce\StoreApi\Routes\V1
CartSelectShippingRate::get_args
Get method arguments for this REST route.
Method of the class: CartSelectShippingRate{}
No Hooks.
Returns
Array. An array of endpoints.
Usage
$CartSelectShippingRate = new CartSelectShippingRate(); $CartSelectShippingRate->get_args();
CartSelectShippingRate::get_args() CartSelectShippingRate::get args code WC 10.8.1
public function get_args() {
return array(
array(
'methods' => \WP_REST_Server::CREATABLE,
'callback' => array( $this, 'get_response' ),
'permission_callback' => '__return_true',
'args' => array(
'package_id' => array(
'description' => __( 'The ID of the package being shipped. Leave blank to apply to all packages.', 'woocommerce' ),
'type' => array( 'integer', 'string', 'null' ),
'required' => false,
),
'rate_id' => array(
'description' => __( 'The chosen rate ID for the package.', 'woocommerce' ),
'type' => 'string',
'required' => true,
),
),
),
'schema' => array( $this->schema, 'get_public_item_schema' ),
'allow_batch' => array( 'v1' => true ),
);
}