Skip Navigation

[Resolved] Customize WooCommerce My Account page

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to add a custom tab to the Woocommerce My Account Page.

Solution:

To do this please take a look at the link below.
https://iconicwp.com/blog/add-custom-page-account-area-woocommerce/

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by PiotrO586 6 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#780409

Hi,

is there a way to integrate WooCommerce My Account page with layouts/views so that, e.g., this page contains user submitted CRED forms as well? What would be the optimal way to do it?

#780918

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Piotr,

Unfortunately no this is not possible since this is an internal template that is being generated by woocommerce.

Thanks,
SHane

#784427

Ok,

I found that the My Account page can be customized by adding/removing links: hidden link

I could and a new endpoint to the WooCommerce and then fill this endpoint with a content, e.g., from the above-mentioned page:

function iconic_information_endpoint_content() {
    echo 'Your new content';
}

add_action( 'woocommerce_account_information_endpoint', 'iconic_information_endpoint_content' );

But is there a way to at least include a layout to show on set endpoint this way?

#786367

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Piotr,

Actually changing the endpoint would just change the link I believe.

So it would still load the default woocommerce account template so it still wouldn't be possible but just change the links.

Thanks,
Shane

#787555
screen.png

Dear Shane,

but this is perfectly fine, I need to customize menu on the WC My Account page and include custom content, preserving the general WC My Account page.
I did some test and managed to include custom link with a simple text shown this way (earlier I need to configure and register endpoints):

function my_account_endpoint_content() {
    echo( 'Test' );
}
add_action( 'woocommerce_account_enquiries_endpoint', 'my_account_endpoint_content' );

And now the question is, is it possible to call a Toolset layout or a view from the above function (to appear where "Test" is on the attached screen)?

#788580

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Piotr,

I see I thought that you wanted to use a different template for the my account page and not just add another option to the page itself.

It is indeed possible to call a view here and can be done by using the function below.

https://toolset.com/documentation/programmer-reference/views-api/#render_view

Please let me know if this helps.

Thanks,
Shane

#802980

Works. Thank you!