Hello,
I let wp-users post a custom post type and charge this with woocommerce. This all works perfect.
How can I show only the posts from the user in a extra endpoint on the my_account page from woocommerce? I want them to see the link to their post and the expiring date.
Heiko
Hi,
Thank you for contacting us and I'd be happy to assist.
To create a list of posts where the current logged-in user is the author, you can create a post view, with post author filter.
( example screenshot attached )
Here is a guide on creating post views:
https://toolset.com/lesson-placement/lesson-placements-1621261-1622283/
To add an additional end point to my accounts page in WooCommerce, you'll need to add some code customization, as explained in this tutorial:
hidden link
Note: To get a post view's output in a PHP code, you can use the "render_view" function:
https://toolset.com/documentation/programmer-reference/views-api/#render_view
regards,
Waqar
My issue is resolved now. Thank you!