WC_Admin_List_Table_Orders::search_label
Change the label when searching orders.
Method of the class: WC_Admin_List_Table_Orders{}
No Hooks.
Returns
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.
WC_Admin_List_Table_Orders::search_label() WC Admin List Table Orders::search label code WC 10.3.5
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.
}