WordPress action hook

woocommerce_before_my_account

Defined by WooCommerce and fired by 18 plugins in total, running on 7M+ sites between them.

“Deprecated woocommerce_before_my_account action.”

How to use woocommerce_before_my_account

It's an action: your callback runs at that point. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'woocommerce_before_my_account', function() {
	// 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.

18 plugins that fire woocommerce_before_my_account

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_my_account' ) templates/myaccount/dashboard.php:72
  2. Booster for WooCommerce icon Booster for WooCommerce30,000+ installs do_action( 'woocommerce_before_my_account' ) includes/class-wcj-my-account.php:435
  3. SysBasics Customize My Account for WooCommerce icon SysBasics Customize My Account for WooCommerce7,000+ installs do_action( 'woocommerce_before_my_account' ) templates/myaccount/dashboard.php:64
  4. Donation Platform for WooCommerce: Fundraising & Donation Management icon Donation Platform for WooCommerce: Fundraising & Donation Management6,000+ installs do_action( 'woocommerce_before_my_account' ) includes/wc-templates/myaccount/dashboard.php:71
  5. BuddyPress Integration for WooCommerce icon BuddyPress Integration for WooCommerce700+ installs do_action( 'woocommerce_before_my_account' ) templates/shop/member/bb/dashboard.php:56
  6. ShopPress icon ShopPress600+ installs do_action( 'woocommerce_before_my_account' ) public/templates/my-account/dashboard.php:60
  7. Vertex Addons for Elementor icon Vertex Addons for Elementor200+ installs do_action( 'woocommerce_before_my_account' ) app/Widgets/Woo/MyAccount.php:624
  8. WebSync Checkout for Elementor icon WebSync Checkout for Elementor60+ installs do_action( 'woocommerce_before_my_account' ) includes/widgets/my-account/skins/class-skin-default.php:163
  9. RouteMile for WooCommerce icon RouteMile for WooCommerce40+ installs do_action( 'woocommerce_before_my_account' ) templates/woocommerce/myaccount/dashboard.php:44
  10. Gift Card For Woocommerce icon Gift Card For Woocommerce20+ installs do_action( 'woocommerce_before_my_account' ) templates/myaccount/phoen_giftcard_dashboard.php:60
  11. Experto Dashboard for WooCommerce icon Experto Dashboard for WooCommerce10+ installs do_action( 'woocommerce_before_my_account' ) templates/woocommerce/myaccount/dashboard.php:60
  12. Dashboard for Woo icon Dashboard for Woo10+ installs do_action( 'woocommerce_before_my_account' ) templates/dashboard.php:148
  13. Store Addons for WooCommerce icon Store Addons for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_my_account' ) includes/Modules/templates/custom-dashboard.php:21
  14. AZDev Account Skin for WooCommerce icon AZDev Account Skin for WooCommerceFewer than 10 installs do_action( 'woocommerce_before_my_account' ) templates/myaccount/dashboard.php:80
  15. ShopCurator icon ShopCuratorFewer than 10 installs do_action( 'woocommerce_before_my_account' ) templates/woocommerce/myaccount/dashboard.php:24
  16. Vite Wholesale icon Vite WholesaleFewer than 10 installs do_action( 'woocommerce_before_my_account' ) vitewholesale/templates/myaccount/dashboard.php:82
  17. MHM Rentiva icon MHM RentivaFewer than 10 installs do_action( 'woocommerce_before_my_account' ) templates/woocommerce/myaccount/dashboard.php:43
  18. Codela icon CodelaFewer than 10 installs do_action( 'woocommerce_before_my_account' ) includes/my-account-layout.php:823

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.