WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API

Coupons::add_wp_query_search_code_filter() public WC 1.0

Add code searching to the WP Query

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

No Hooks.

Return

String. Nothing.

Usage

$result = Coupons::add_wp_query_search_code_filter( $where, $wp_query );
$where(string) (required)
Where clause used to search posts.
$wp_query(object) (required)
WP_Query object.

Code of Coupons::add_wp_query_search_code_filter() WC 5.3.0

<?php
public static function add_wp_query_search_code_filter( $where, $wp_query ) {
	global $wpdb;

	$search = $wp_query->get( 'search' );
	if ( $search ) {
		$code_like = '%' . $wpdb->esc_like( $search ) . '%';
		$where    .= $wpdb->prepare( "AND {$wpdb->posts}.post_title LIKE %s", $code_like );
	}

	return $where;
}