Skip Navigation

[Resolved] Integrating My Account page with WooCommerce My Account Page

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

Problem:

Is it possible to integrate creating new listings with the WooCommerce My Account page using Toolset plugins?

Solution:

The Woocommerce My Account pages are defined in Woocommerce plugin, you can find those files in your website plugin folder:
\plugins\woocommerce\templates\myaccount

You can follow Woocommerce document to customize My Account pages:

https://woocommerce.com/document/the-my-account-page/

Relevant Documentation:

This support ticket is created 2 years, 11 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by WilliamM1564 2 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2315855

Tell us what you are trying to do?

I am working through the course on WordPress Directory and Classified Sites. In Chapter 5 it reviews how to make a My Account page. However, since I have WooCommerce installed (I will be charging for listings) there is already a fairly robust My Account Page that lists past orders, shipping addresses etc.

Is it possible to integrate creating new listings with the WooCommerce My Account page — so perhaps My Listing would be an option on the side? Or do we entirely replace this My Account with the one outlined in the course.

Please advise.

Is there any documentation that you are following?
Wordpress Directory and Classified Sites course, Chapter 11.2

Is there a similar example that we can see?
hidden link

What is the link to your site?
hidden link

#2316097

Hello,

The Woocommerce My Account pages are defined in Woocommerce plugin, you can find those files in your website plugin folder:
\plugins\woocommerce\templates\myaccount

You can follow Woocommerce document to customize My Account pages:
https://woocommerce.com/document/the-my-account-page/

I don't think it is easy to integrate Toolset plugins with Woocommerce My Account pages, but you can use PHP codes to render Views and content templates:
https://toolset.com/documentation/programmer-reference/views-api/#render_view
Renders a View and returns the HTML output.
https://toolset.com/documentation/programmer-reference/views-api/#render_view_template
render_view_template

#2316793

I guess the main reason I thought it might be necessary to integrate the two "my account" pages was that it would be very handy to see "My subscriptions" in the WooCommerce "my account" page.

Given that this sound difficult, I am guessing it may be easier to display outstanding orders / subscriptions in the Toolset "my account page". Is that possible?

#2316901

You can follow our document to display Woocommerce orders in frontend:
https://toolset.com/course-lesson/how-to-display-woocommerce-orders-on-the-front-end/
And add a author filter to filter the results by current logged-in user:
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/

For the "My subscriptions", I assume we are talking about WooCommerce Subscription plugin. If that is correct, there is nothing much we can do as you can see the post type "Subscription" is private and not publicly allowed to query. That is why its not showing with the view's content selection:
hidden link

                   'description'                      => __( 'This is where subscriptions are stored.', 'woocommerce-subscriptions' ),
                    'public'                           => false,
                    'show_ui'                          => true,

As you can see that the attribute public set to false.
'public' => false,

More help:
https://developer.wordpress.org/reference/functions/register_post_type/#public
public
(boolean) (optional) Controls how the type is visible to authors (show_in_nav_menus, show_ui) and readers (exclude_from_search, publicly_queryable).

#2316999

Hmm. I plan to have a monthly charge for a paid listing.

If someone cancels their subscription (e.g. through PayPal) will I need to manually update the record for the listing when I receive the notification that it has been cancelled or when the next payment fails?

Is there a way to automate this?

#2317095

For the new question:

If someone cancels their subscription (e.g. through PayPal) will I need to manually update the record for the listing when I receive the notification that it has been cancelled or when the next payment fails?

It depends on the WooCommerce Subscription plugin, I have searched it in Google, and found some related threads, for example:
https://wordpress.org/support/topic/send-email-to-customer-when-subscription-is-cancelled-expired-or-suspended/

You can also check it with WooCommerce Subscription plugin support for it.

#2317135

My issue is resolved now. Thank you!