Hi Nigel
Thanks for your first answer - I've got a good way down the road with doing this now but have a specific problem with the way I'm doing something. Perhaps you can help me do what I want, or give me a nudge towards a different way to achieve what I'm trying...
So as it stands a user can create an account and log in (to a new user role called CPT owner).
Once they are logged in they can see the Claim form and submit it for admin approval.
Once approved the admin sets the user as the post author.
Now that they're the post author they can see the edit post form that allows them to update the post.
All well and good....
The next part is having premium fields. I have a field called "free-premium", and certain other fields are only visible/editable if this is set to premium. This part works OK.
The difficulty is getting the user to purchase the "premium listing" so that the filed is set to premium and the fields editable.
As it stands I have a simple cred form - it looks like this:
[credform class='cred-form cred-keep-original']
[cred_field field='form_messages' value='' class='alert alert-warning']
<div class="form-group" style="display:none;">
[cred_field field='free-premium' post='tool' value='premium' urlparam='' output='bootstrap']
</div>
[cred_field field='form_submit' value='Upgrade to Premium' urlparam='' class='btn btn-primary btn-lg' output='bootstrap']
[/credform]
So the form has the free-premium field set to premium, but this is hidden by the display:none. The user just has to submit the form. The form is linked via "Charge payment with this form" to a Woocommerce product and is directed immediately to the checkout page.
In theory this works OK as long as they pay, but if they don't complete payment, the form has already been submitted and recorded the "free-premium" field as premium.
I see I can change "Post status when the payment status updates", but I don't want to change a post to "Pending Review" as then Guest visitors won't be able to see the post - I'd still want them to see the post, just not the premium info.
So is there any way I can do this with the cred form - i.e. if the customer fails to complete checkout, instead of changing the post status to "Pending" or "Draft" it just changes the free-premium field to free?
If not, how should I restructure this bit of the process to allow users to purchase premium in this way?
Sorry for the long post. If you need log in details to see what I'm talking about on the staging site let me know.
Thanks
Tim