WordPress action hook
woocommerce_before_account_orders
Defined by WooCommerce and fired by 14 plugins in total, running on 7M+ sites between them.
How to use woocommerce_before_account_orders
It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'woocommerce_before_account_orders', function( $has_orders ) {
// Your code runs here.
}, 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.
14 plugins that fire woocommerce_before_account_orders
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
do_action( 'woocommerce_before_account_orders', $has_orders )templates/myaccount/orders.php:22 -
SysBasics Customize My Account for WooCommerce7,000+ installs
do_action( 'woocommerce_before_account_orders', $has_orders )templates/myaccount/order/01.php:13 -
Donation Platform for WooCommerce: Fundraising & Donation Management6,000+ installs
do_action( 'woocommerce_before_account_orders', $has_orders )includes/wc-templates/myaccount/orders.php:24 -
ReviewX6,000+ installs
do_action( 'woocommerce_before_account_orders', $has_orders )woocommerce/myaccount/orders.php:10 -
Customize My Account for WooCommerce900+ installs
do_action( 'woocommerce_before_account_orders', $has_orders )templates/orders.php:7 -
ShopPress600+ installs
do_action( 'woocommerce_before_account_orders', $customer_orders )public/templates/my-account/orders.php:17 -
StoreBuild400+ installs
do_action( 'woocommerce_before_account_orders', $storebuild_customer_orders )public/woocommerce/myaccount/orders.php:31 -
Shopready100+ installs
do_action( 'woocommerce_before_account_orders' )src/extension/templates/views/account/order.php:11 -
PeproDev Ultimate Profile Solutions70+ installs
do_action( 'woocommerce_before_account_orders', $has_orders )profile/libs/templates/modern/wc-orders.php:48 -
Koin Official Payments for WooCommerce10+ installs
do_action( 'woocommerce_before_account_orders', $has_orders )app/Views/templates/myaccount/koin-orders.php:5 -
Enapps ERP B2B Integration for WooCommerceFewer than 10 installs
do_action( 'woocommerce_before_account_orders', $orders )enapps-wc-templates/myaccount/orders.php:14 -
CryptochainFewer than 10 installs
do_action( 'woocommerce_before_account_orders', $has_orders )template/woocommerce/myaccount/orders.php:22 -
ShopCuratorFewer than 10 installs
do_action( 'woocommerce_before_account_orders', $has )src/Account/Orders.php:189 -
CodelaFewer than 10 installs
do_action( 'woocommerce_before_account_orders', $has_orders )templates/myaccount/orders.php:15
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.