Here we’ve created a visual guide displaying all the WooCommerce account page hooks which you can use to edit features or add extra functionality to your WooCommerce store.
Simply highlight and copy the hook name from the WooCommerce account page visual guide below and read the section on how to implement hooks within your functions.php file.
If you’re not happy editing the code yourself, take a look at our StoreCustomizer plugin which has lots of extra useful features for your cart page which you will enjoy from auto-update cart, add banners or custom text, remove the cart product links and more.
This visual guide is basic on the default WooCommerce layouts… If you find certain hooks are in slightly different places then that is most likely from HTML changes made by the theme.
Logged Out - WooCommerce Account Page Hooks:
If a user is NOT logged in, they are redirected to the login and/or register page.
WooCommerce Account Page (Logged Out)
Login
Register
Available (logged out) WooCommerce Account Page Hooks:
When a user is logged out they are not able to view the account page and so these are all the available hooks for the login and register pages.
- woocommerce_before_customer_login_form
- woocommerce_after_customer_login_form
-
Login Page: - woocommerce_login_form_start
- woocommerce_login_form
- woocommerce_login_form_end
-
Register Page: - woocommerce_register_form_start
- woocommerce_register_form
- register_form
- woocommerce_register_form_end
These are all of the available WooCommerce account page hooks, they are quite self explanatory in their position but do refer to the visual hook guide if you’re not 100% sure on where exactly they hook into on the WooCommerce account page.
If your theme is overriding the WooCommerce templates then it’s possible that these hooks could be missing, or placed in a slightly different position.
Next up…
Logged In - WooCommerce Account Page Hooks:
WooCommerce Account Page (Logged In)
woocommerce_account_content
Hello Zack (not Zack? Sign out)
From your account dashboard you can view your recent orders, manage your shipping and billing addresses and edit your password and account details.
woocommerce_account_dashboard
woocommerce_account_content
woocommerce_before_account_orders (param: $has_orders)
Order | Date | Status | Total | |
---|---|---|---|---|
#101 | On Hold | €25.00 for 2 items | ViewDownload invoice (PDF) | |
#102 | On Hold | €38.00 for 1 items | ViewDownload invoice (PDF) | |
#103 | On Hold | €44.00 for 2 items | ViewDownload invoice (PDF) |
woocommerce_before_account_orders_pagination
woocommerce_after_account_orders (param: $has_orders)
woocommerce_account_content
woocommerce_before_account_downloads (param: $has_downloads)
woocommerce_before_available_downloads
File | Remaining | Expires | |
---|---|---|---|
Download – Product Name | ∞ | Never | Download |
woocommerce_after_available_downloads
woocommerce_after_account_downloads
woocommerce_account_content
woocommerce_before_edit_account_address_formThe following addresses will be used on the checkout page by default.
woocommerce_after_edit_account_address_form
woocommerce_account_content
woocommerce_before_edit_account_address_form
Billing Address
woocommerce_before_edit_address_form_{$load_address}
woocommerce_after_edit_address_form_{$load_address}
woocommerce_after_edit_account_address_form
woocommerce_account_content
woocommerce_before_account_payment_methods (param: $has_methods)
Method | Expires | |
---|---|---|
Visa ending in 4488 | 11/23 | Delete |
woocommerce_after_account_payment_methods (param: $has_methods)
woocommerce_account_content
woocommerce_before_edit_account_form
woocommerce_edit_account_form_start
Password Change
woocommerce_edit_account_formSave changes
woocommerce_edit_account_form_end
woocommerce_after_edit_account_form
Available (logged in) WooCommerce Account Page Hooks:
Once a user logs in, they will have access to all the different WooCommerce Account Pages.
- woocommerce_account_navigation
- woocommerce_before_account_navigation
- woocommerce_after_account_navigation
-
Dashboard: - woocommerce_account_content
- woocommerce_account_dashboard
-
Orders: - woocommerce_account_content
- woocommerce_before_account_orders (param: $has_orders)
- woocommerce_before_account_orders_pagination
- woocommerce_after_account_orders (param: $has_orders)
-
Downloads: - woocommerce_account_content
- woocommerce_before_account_downloads (param: $has_downloads)
- woocommerce_before_available_downloads
- woocommerce_after_available_downloads
- woocommerce_after_account_downloads
-
Addresses: - woocommerce_account_content
- woocommerce_before_edit_account_address_form
- woocommerce_after_edit_account_address_form
-
Edit Address: - woocommerce_account_content
- woocommerce_before_edit_account_address_form
- woocommerce_before_edit_address_form_{$load_address}
- woocommerce_after_edit_address_form_{$load_address}
- woocommerce_after_edit_account_address_form
-
Payment Methods: - woocommerce_account_content
- woocommerce_before_account_payment_methods (param: $has_methods)
- woocommerce_after_account_payment_methods (param: $has_methods)
-
Account Details: - woocommerce_account_content
- woocommerce_before_edit_account_form
- woocommerce_edit_account_form_start
- woocommerce_edit_account_form
- woocommerce_edit_account_form_end
- woocommerce_after_edit_account_form
These are all of the available WooCommerce account page hooks, they are quite self explanatory in their position but do refer to the visual hook guide if you’re not 100% sure where they are.
If you find some of these hooks are missing or are in different positions then that is most likely because of the WordPress theme you are using.
Happy Coding!
How to use PHP hooks on your website:
To use these page hooks you will need a little understanding of php code… You can add the following function to your website using by creating a child theme and then adding this code to the child themes functions.php file, or you can install our Site Customizations plugin and add the php code via the php file provided.
If you are not comfortable using code then please try out our StoreCustomizer plugin which offers a lot of useful functionality using all these hooks for you to customize your WooCommerce store… No coding knowledge needed.
/*
* My Custom Function
*/
function my_custom_function( array $params ) {
// Some Code Here
}
add_filter( 'woocommerce_after_cart_contents', 'my_custom_function', 20 );
Our free StoreCustomizer plugin offers different functionality to add sold out banners, product sales statistics, stock amounts and lots more to your WooCommerce shop page, all from a visual interface so you don’t need to touch any code… Have a look yourself and see what all StoreCustomizer offers.