WC_Admin_List_Table_Coupons::query_filters()protectedWC 1.0

Handle any custom filters.

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

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->query_filters( $query_vars );
$query_vars(array) (required)
Query vars.

Code of WC_Admin_List_Table_Coupons::query_filters() WC 6.7.0

protected function query_filters( $query_vars ) {
	if ( ! empty( $_GET['coupon_type'] ) ) { // WPCS: input var ok, sanitization ok.
		$query_vars['meta_key']   = 'discount_type'; // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
		$query_vars['meta_value'] = wc_clean( wp_unslash( $_GET['coupon_type'] ) ); // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value, WordPress.VIP.SuperGlobalInputUsage.AccessDetected
	}
	return $query_vars;
}