When customers purchase products from your store, they expect to be able to manage orders and settings through an intuitive ‘my account’ page. Out-of-the-box, WooCommerce allows your customers to do just this. But what if you need to customize the my account page? We show you how.
What is the My Account Page?
A typical WooCommerce my account page lists orders and personal information like billing or shipping address. Payment methods are also shown as an own page. Furthermore if you work with digital products your customers can see their available downloads.
While basic, a standard my account page provides your customers with all the information they need to track and query purchases. However, creating a custom my account page for WooCommerce can add more features for the benefit of you and your customers.
Why you should have custom my account tabs
While the basic stuff is good for a start, at some day you want to create custom my account tabs & pages. Or you want to modify the dashboard text as it is kinda basic.
Some example for custom my account pages:If you personalize the my account page your customers will feel much more trusted. They may like to login more often to use one of your custom services. This could lead into:
- More Sales
- Shop trust
- Mouth to mouth propaganda (e.g. about superior service)
How to Customize the WooCommerce My Account Page
There are two ways to create a custom my account page for WooCommerce. The first—and often the preferred way for people with coding experience, is to customize pages manually by adding custom PHP code.
Therefore you need to put some code into your functions.php file of your child theme. An Example is below, where we will add a custom Support page.
Register a new endpoint to use for My Account page
First you need to register a new endpoint to use for My Account page. You need to save permalinks after added the code, otherwise you get a 404 error.
add_action( 'init', 'add_support_endpoint' ); function add_support_endpoint() { add_rewrite_endpoint( 'support', EP_ROOT | EP_PAGES ); }
Create a new query var
You need to create a new query variable for the support page otherwise the content will not be loaded in 4.
add_filter( 'query_vars', 'custom_support_query_vars', 0 ); function custom_support_query_vars( $vars ) { $vars[] = 'support'; return $vars; }
Insert the new endpoint into the My Account menu as an own item.
add_filter( 'woocommerce_account_menu_items', 'custom_add_support_link_my_account' ); function custom_add_support_link_my_account( $items ) { $items = 'Support'; return $items; }
Last add content
Add content to the new support page endpoint. The add_action must follow ‘woocommerce_account_{your-endpoint-slug}_endpoint’ format!
add_action( 'woocommerce_account_support_endpoint', 'custom_support_content' );
function custom_support_content() {
echo '<h2>Support Center</h2><p>Hey, if you need support contact us at su*****@we******.io</p>';
}
Now we got a new support tab under the my account menu:You may now also need to reorder the items, create more tabs and at some point it will be too complicated. Also if coding is way beyond your skill level you should consider buying a plugin? This is a way easier way to customize the my account page.
WooCommerce “My Account” Customization Plugin
The easiest way for non-technical WooCommerce users to create custom ‘my account’ pages, is to use plugins that automate the process. The most fully-featured at present being the WooCommerce Custom My Account Pages Plugin by WeLaunch.
Using our WooCommerce my account customizer plugin, WooCommerce store owners can create custom ‘my account’ pages in seconds. Doing so is also far safer than tweaking WooCommerce under the hood.
- Create custom ‘my account’ pages without risking breaking your WooCommerce store.
- Leverage positive customer experiences and increase sales by adding custom account tabs and content areas.
- Easily customizing by
- reordering tabs
- rename pages
- create own pages
- Reorder & rename default tabs
- Modify the dashboard tab text
Using Customization Plugins Vs Coding
Using plugins like Custom My Account Pages is by far the easiest way to tweak WooCommerce for the benefit of you and your store users. When coding page customizations manually, there is always the risk of you breaking other store features. This is especially true if editing PHP code isn’t something you are familiar with.
Customize your ‘my account’ pages easily and safely now with the Custom My Account Pages Plugin from WeLaunch by clicking here.Get WooCommerce My Account Customizer Plugin today
Hello,
don’t forget to flush or to update permalink for new endpoint…
and i prefer to add my custom content with php myself, you know adding or removing lines of code we put are not very risky with a simple copy (backup) of the code 🙂
freee code <3
Great!