Created
October 27, 2023 08:12
-
-
Save SirDarcanos/0c8cfed802225e41c6582cd89a0f0308 to your computer and use it in GitHub Desktop.
Add Email Filter Field on WooCommerce > Orders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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