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:

functions.php
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.

  1. WooCommerce icon WooCommerce7+ million installs do_action( 'woocommerce_before_account_orders', $has_orders ) templates/myaccount/orders.php:22
  2. SysBasics Customize My Account for WooCommerce icon SysBasics Customize My Account for WooCommerce7,000+ installs do_action( 'woocommerce_before_account_orders', $has_orders ) templates/myaccount/order/01.php:13
  3. Donation Platform for WooCommerce: Fundraising & Donation Management icon Donation Platform for WooCommerce: Fundraising & Donation Management6,000+ installs do_action( 'woocommerce_before_account_orders', $has_orders ) includes/wc-templates/myaccount/orders.php:24
  4. ReviewX icon ReviewX6,000+ installs do_action( 'woocommerce_before_account_orders', $has_orders ) woocommerce/myaccount/orders.php:10
  5. Customize My Account for WooCommerce icon Customize My Account for WooCommerce900+ installs do_action( 'woocommerce_before_account_orders', $has_orders ) templates/orders.php:7
  6. ShopPress icon ShopPress600+ installs do_action( 'woocommerce_before_account_orders', $customer_orders ) public/templates/my-account/orders.php:17
  7. StoreBuild icon StoreBuild400+ installs do_action( 'woocommerce_before_account_orders', $storebuild_customer_orders ) public/woocommerce/myaccount/orders.php:31
  8. Shopready icon Shopready100+ installs do_action( 'woocommerce_before_account_orders' ) src/extension/templates/views/account/order.php:11
  9. PeproDev Ultimate Profile Solutions icon PeproDev Ultimate Profile Solutions70+ installs do_action( 'woocommerce_before_account_orders', $has_orders ) profile/libs/templates/modern/wc-orders.php:48
  10. Koin Official Payments for WooCommerce icon Koin Official Payments for WooCommerce10+ installs do_action( 'woocommerce_before_account_orders', $has_orders ) app/Views/templates/myaccount/koin-orders.php:5
  11. Enapps ERP B2B Integration for WooCommerce icon Enapps ERP B2B Integration for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_account_orders', $orders ) enapps-wc-templates/myaccount/orders.php:14
  12. Cryptochain icon CryptochainFewer than 10 installs do_action( 'woocommerce_before_account_orders', $has_orders ) template/woocommerce/myaccount/orders.php:22
  13. ShopCurator icon ShopCuratorFewer than 10 installs do_action( 'woocommerce_before_account_orders', $has ) src/Account/Orders.php:189
  14. Codela icon 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.