WordPress filter hook
woocommerce_my_account_my_orders_query
Defined by WooCommerce and fired by 20 plugins in total, running on 7.1M+ sites between them.
How to use woocommerce_my_account_my_orders_query
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_my_account_my_orders_query', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
20 plugins that fire woocommerce_my_account_my_orders_query
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'customer' => get_current_user_id(), 'page' => $current_page, 'paginate' => true, ) )includes/wc-template-functions.php:3868 -
ShopEngine90,000+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', $query_arg )widgets/lazy-cache.php:29 -
Dokan: AI Powered WooCommerce Multivendor Marketplace Solution30,000+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', $args )includes/Order/Manager.php:425 -
King Addons for Elementor10,000+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', [ 'customer' => $user_id, 'page' => $paged, 'paginate' => true, 'limit' => $per_page, ] )includes/widgets/Woo_My_Account_Orders/Woo_My_Account_Orders.php:134 -
WP Crowdfunding2,000+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'numberposts' => -1, 'post__in' => $order_ids, 'meta_key' => '_customer_user', 'post_type' => \wc_get_order_types( 'view-orders' ), 'post_status' => array_keys( wc_get_order_statuses() ), 'date_query' => array( array( 'after' => date( 'F jS, Y', strtotime( $from_date ) ), 'before' => array( 'year' => date( 'Y', strtotime( $to_date ) ), 'month' => date( 'm', strtotime( $to_date ) ), 'day'... )includes/Functions.php:202 -
StoreBuild400+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'posts_per_page' => -1, ) )public/woocommerce/myaccount/dashboard.php:95 -
Subaccounts for WooCommerce200+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'customer' => $existing_children_ids, 'limit' => -1, ) )public/my-account.php:1478 -
Show Orders Shortcode for WooCommerce100+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'customer' => get_current_user_id(), 'type' => 'shop_order', 'page' => 1, 'limit' => $order_count, 'paginate' => true, ) )show-orders-shortcode-for-woocommerce.php:59 -
PeproDev Ultimate Profile Solutions70+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'customer' => get_current_user_id(), 'page' => $current_page, 'paginate' => true, 'limit' => -1, ) )profile/libs/templates/modern/wc-orders.php:15 -
Material Dashboard40+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'meta_key' => '_customer_user', 'meta_value' => $uid == null ? get_current_user_id() : $uid, 'post_type' => wc_get_order_types( 'view-orders' ), 'post_status' => array_keys( wc_get_order_statuses() ), ) )ext/woocommerce/functions.php:41 -
BannerWoo10+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'meta_key' => '_customer_user', 'meta_value' => get_current_user_id(), 'post_type' => wc_get_order_types( 'view-orders' ), 'post_status' => 'completed', ) )includes/my-banners.php:11 -
SaleDash10+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', $args )includes/api/class-w2w-rest-orders-controller.php:190 -
Koin Official Payments for WooCommerce10+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', [ 'customer' => get_current_user_id(), 'page' => $current_page, 'paginate' => true, 'payment_method' => [ "wc-koin-billet", "wc-koin-credit", "wc-koin-pix" ], 'status' => [ 'on-hold', 'processing', 'cancelled', 'completed', 'wc-awaiting-analysis', 'wc-awaiting-payment' ] ] )app/Controllers/Render/KoinOrders.php:32 -
IM WooCommerce My Account Widget10+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'numberposts' => -1, 'meta_key' => '_customer_user', 'meta_value' => get_current_user_id(), 'post_type' => wc_get_order_types( 'view-orders' ), 'post_status' => array_keys( wc_get_order_statuses() ) ) )im-woocommerce-my-account-widget.php:178 -
Thanh Toan The Cao Dien Thoai10+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'numberposts' => $order_count, 'meta_key' => '_customer_user', 'meta_value' => get_current_user_id(), 'post_type' => wc_get_order_types( 'view-orders' ), 'post_status' => array_keys( wc_get_order_statuses() ) ) )templates/my-orders.php:20 -
Alter Inventory10+ installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'numberposts' => $order_count, 'meta_key' => '_customer_user', 'meta_value' => get_current_user_id(), 'post_type' => 'shop_order', 'post_status' => array('wc-processing', 'wc-completed'), 'posts_per_page' => -1, 'paged' => get_query_var('paged') ) )admin/class-woocommerce-alter-inventory-admin.php:311 -
Package Update Server for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'customer' => get_current_user_id(), 'page' => $current_page, 'paginate' => true, ) )includes/admin/views/template-purchased-downloadable-tokens.php:7 -
Token Vendor for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'customer' => get_current_user_id(), 'page' => $current_page, 'paginate' => true, ) )includes/admin/views/template-purchased-tokens.php:7 -
Advatix FEP API ConnectionFewer than 10 installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'numberposts' => -1, 'post_type' => wc_get_order_types('view-orders'), 'post_status' => array_keys(wc_get_order_statuses()) ) )includes/templates/admin-orders.php:8 -
IPS Account for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_my_account_my_orders_query', array( 'customer' => get_current_user_id(), 'page' => $page, 'paginate' => true, ) )includes/classes/Features/Templates/Orders/OrdersSectionController.php:89
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.