Skip Navigation

[Resolved] paid membership site with public member searchable directory

This support ticket is created 4 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 replies, has 2 voices.

Last updated by Beda 4 years, 7 months ago.

Assisted by: Beda.

Author
Posts
#1328293

I need to create a paid membership (via WooCommerce & Woo Subscriptions) site, that allows for people to 'purchase' a membership and then be able to create a profile (with custom fields and custom taxonomies), that will be shown on a publicly available, searchable directory.

I am gathering that this is possible by following a few examples and tutorials from the ToolSet site.

The recommendations seem to be to create a CPT for 'members' and assign custom fields & taxonomies to that CPT. That is straightforward and I get how to do that part.

But how do I tie the 'member' CPT to the user account that gets created upon WooCommerce Subscription checkout?

Can I assume that once someone purchases a membership, they'll have access to a front-end form (that I'll create) to add/update their profile info? How would they go about updating their WooCommerce checkout-related info (e.g. payment, billing address, etc)?

#1328607

Its explained here:
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

You will tie the Post through the "author" of the post, which will be the user to which it belongs.
See also https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/#support-for-users-in-toolset-and-wordpress, where this is explained in detail.

WooCommerce checkout data is not created in this process. Those are user fields, that the user will edit in the user profile/checkout process of the WooCommerce logic.

Please let me know if anything remains unclear.

#1329757

Thank You for the reply! I had not seen that tutorial/documentation yet.

So in this case, once the User profile (i.e. account) has been created, how/where would the person go to update their name or password? Would the form (created to handle the profile fields not included with the WordPress User profile) also include the WordPress User profile fields?

#1330155

For native User data (password, username) you need to use either the WordPress Admin user edit screen or a User Form.
For all the rest, a Post Form.

The end-user is never aware of this, they just see a Link somewhere "edit profile data" which would lead to a USER edit form, while when they edit anything else of their profile you can link to the post edit form.

A smart name convention to the links is basically all it takes.
You can for example have. dropdown like here in Toolset Support Forum's Profile, which holds logout link, edit Profile and edit Settings link, or similar, matching the case of your site.

In your case maybe I would use "Edit My Data" (linking to the WordPress user profile form, where the user can edit password, name, and email)
Then a link to "Edit my Profile", which leads to the Post Type edit form

There is, of course, the possibility of using just the one post (or even user) form.
You would then hook into the form's submission with a cred_save_data() hook and update all the data from the form to the user or post type, depending on which one you target with Forms, and which not.
It's more complicated because it needs custom code.

I can help with that if required please let me know.
Here is the DOC of the API you'd use, and an example that actually updates a user taking data from a post Form:
https://pastebin.com/wz6dQVBE
https://toolset.com/documentation/programmer-reference/cred-api/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.