Passer la navigation

[Résolu] How to redirect to published post after Toolset Form Woocommerce order

This support ticket is created Il y a 4 années et 12 mois. 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Hong_Kong (GMT+08:00)

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Luo Yang Il y a 4 années et 11 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1733531

Hi!
User create some post, like Application, and want to publish it. It is paid service, so we charge for it by Toolset Form - Woocommerce integration.
But now after successful payment user redirected to Woocommerce Thank You page. But we want to redirect user to just published post "Application". How we could make it?

We try to use this solution:
https://toolset.com/forums/topic/redirect-to-created-post-after-purchase-is-completed-cred/

but this doesn't work. Probably code should be changed somehow due to plugings and woocommerce code changed since that time.

#1734099

Hello,

The thread you mentioned above is using action hook "cred_commerce_after_order_completed", it is triggered only after the Woocommerce order is in "completed", see our document:
https://toolset.com/documentation/programmer-reference/cred-commerce-api/#cred_commerce_after_order_completed
Action to be executed after the purchase is completed successfully.

But Woocommerce does not setup the order as "completed" status, but you can use custom codes to Complete Orders Automatically, see their document:
https://docs.woocommerce.com/document/automatically-complete-orders/