WC_Admin_List_Table_Orders::search_label( mixed $query )

Change the label when searching orders.


Description Description


Parameters Parameters

$query

(Required) Current search query.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/admin/list-tables/class-wc-admin-list-table-orders.php

	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.
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.