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
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
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?
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).
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?
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.
My issue is resolved now. Thank you!