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