Skip Navigation

[Resolved] How to display post to customer after completion?

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

Problem: I have a Commerce Form that creates posts. When the Order is complete, I would like to show the User a link to the post created by the Form.

Solution: Use a View filtered by post author to display a link to the post on a custom Thank You redirect page. To send the link to the User in an email, create an email notification that is triggered when the post status is published. Add the post link using the placeholder %%POST_LINK%%.

Relevant Documentation:
https://toolset.com/documentation-category/cred-commerce/
https://toolset.com/documentation/user-guides/using-cred-commerce-to-add-payments-to-forms/
https://toolset.com/documentation/user-guides/automated-email-notifications-with-cred/

This support ticket is created 6 years, 5 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 6 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1069312

Tell us what you are trying to do?

I have a site where the user can create custom post content, most similar to a classifieds site, then submit payment via woocommerce. My question feels very basic but I can't find it in the documentation: After the user has completed the purchase how can I display or email them the url for their new post?

The site is currently in dev and payment is test mode so you can complete the process if you like to see.

hidden link

#1069446

Hi, if your Commerce Form is configured to set the User as the author of the post when the order is complete, then you may be able to use a View to display the post URL. Add a Post Author Query Filter to the View, where the author is the same as the current logged-in User. The View will return a list of posts created by the current User. In the Loop of this View, you can show a link to that post, or the post URL and post title, etc. Insert this View on a Page somewhere your User can see it after Order is complete. That may be a custom Thank You page redirect, or something else set up in WooCommerce.

To email the User a link to the post, you can set up an Email Notification in your Commerce Form that is triggered when the post status changes to "Published", and set up the Form to create posts in the "Pending Review" state. Then when the Order status changes to "Complete", the Form will automatically update the post status to "Published", triggering the email notification.

In the body of the email notification, you can insert a link to the post using the "Insert Body Codes" button. It will look like this:

%%POST_LINK%%

Other placeholders and shortcodes are available here as well.