WordPress at a glance
function is not described

WC_REST_Coupons_V1_Controller::query_args() public WC 1.0

Query args.

{} It's a method of the class: WC_REST_Coupons_V1_Controller{}

No Hooks.

Return

Array.

Usage

$WC_REST_Coupons_V1_Controller = new WC_REST_Coupons_V1_Controller();
$WC_REST_Coupons_V1_Controller->query_args( $args, $request );
$args(array) (required)
Query args
$request(WP_REST_Request) (required)
Request data.

Code of WC_REST_Coupons_V1_Controller::query_args() WC 5.0.0

<?php
public function query_args( $args, $request ) {
	if ( ! empty( $request['code'] ) ) {
		$id = wc_get_coupon_id_by_code( $request['code'] );
		$args['post__in'] = array( $id );
	}

	return $args;
}