WC_Admin_List_Table_Orders::search_label()publicWC 1.0

Change the label when searching orders.

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

No Hooks.

Return

String.

Usage

$WC_Admin_List_Table_Orders = new WC_Admin_List_Table_Orders();
$WC_Admin_List_Table_Orders->search_label( $query );
$query(mixed) (required)
Current search query.

Code of WC_Admin_List_Table_Orders::search_label() WC 6.7.0

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

	if ( 'edit.php' !== $pagenow || 'shop_order' !== $typenow || ! get_query_var( 'shop_order_search' ) || ! isset( $_GET['s'] ) ) { // phpcs:ignore  WordPress.Security.NonceVerification.Recommended
		return $query;
	}

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