WC_Admin_List_Table_Products::search_label()publicWC 1.0

Change the label when searching products

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

No Hooks.

Return

String.

Usage

$WC_Admin_List_Table_Products = new WC_Admin_List_Table_Products();
$WC_Admin_List_Table_Products->search_label( $query );
$query(string) (required)
Search Query.

Code of WC_Admin_List_Table_Products::search_label() WC 6.7.0

public function search_label( $query ) {
	global $pagenow, $typenow;

	if ( 'edit.php' !== $pagenow || 'product' !== $typenow || ! get_query_var( 'product_search' ) || ! isset( $_GET['s'] ) ) { // WPCS: input var ok.
		return $query;
	}

	return wc_clean( wp_unslash( $_GET['s'] ) ); // WPCS: input var ok, sanitization ok.
}