Skip to content

Instantly share code, notes, and snippets.

@SirDarcanos
Created October 27, 2023 08:12
Show Gist options
  • Save SirDarcanos/0c8cfed802225e41c6582cd89a0f0308 to your computer and use it in GitHub Desktop.
Save SirDarcanos/0c8cfed802225e41c6582cd89a0f0308 to your computer and use it in GitHub Desktop.
Add Email Filter Field on WooCommerce > Orders
<?php
function add_email_filter_to_orders() {
global $typenow;
if ('shop_order' === $typenow) {
echo '<input type="text" name="filter_email" placeholder="Email Address..." value="' . (isset($_GET['filter_email']) ? esc_attr($_GET['filter_email']) : '') . '">';
}
}
add_action('restrict_manage_posts', 'add_email_filter_to_orders', 99);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment