Automattic\WooCommerce\Blocks\StoreApi\Routes
CartCouponsByCode::get_args() public WC 1.0
Get method arguments for this REST route.
{} Это метод класса: CartCouponsByCode{}
Хуков нет.
Возвращает
Массив
. An array of endpoints.
Использование
$CartCouponsByCode = new CartCouponsByCode(); $CartCouponsByCode->get_args();
Код CartCouponsByCode::get_args() CartCouponsByCode::get args WC 5.2.2
public function get_args() {
return [
'args' => [
'code' => [
'description' => __( 'Unique identifier for the coupon within the cart.', 'woocommerce' ),
'type' => 'string',
],
],
[
'methods' => \WP_REST_Server::READABLE,
'callback' => [ $this, 'get_response' ],
'permission_callback' => '__return_true',
'args' => [
'context' => $this->get_context_param( [ 'default' => 'view' ] ),
],
],
[
'methods' => \WP_REST_Server::DELETABLE,
'callback' => [ $this, 'get_response' ],
'permission_callback' => '__return_true',
],
'schema' => [ $this->schema, 'get_public_item_schema' ],
];
}