Skip Navigation

[Resolved] “Set this post status” in CRED post submit form – not working

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

Problem:

With Toolset Forms commerce plugin, update the post status when the payment status updates.

Solution:

You can edit the post forms, in section "Toolset Forms Commerce", make sure you are using below options:
- Purchase processing: Pending Review
- Purchase complete: Published

Relevant Documentation:

https://toolset.com/documentation/user-guides/front-end-forms/using-cred-commerce-to-add-payments-to-forms/#3-1-updating-the-post-status-when-the-payment-status-updates

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by PaulS4783 4 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#1583671

hidden link

In theory, after this form gets submitted and a post created, the status of the post should be "Pending".
However, after it goes through the WooCom checkout process the post ends up "Published".

I haven't reported this as a bug because it's "possible" that the following code snippet is causing the problem.

// copy form data to the translated post version with wpml
add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data){
// if a specific form
if (($form_data['id']==6350)||($form_data['id']==6351)){

do_action( 'wpml_make_post_duplicates', $post_id );
}
}

Using:
Toolset CRED WPML Integration
Version 0.5

Toolset Forms
Version 2.5.6

Toolset Forms Commerce
Version 1.8.1

Toolset Layouts
Version 2.6.4

Toolset Types
Version 3.3.10

Toolset Views
Version 3.1.3

Any suggestions?

#1583891

Hello,

I have tried it in a fresh WordPress installation + the latest version of Toolset + WPML + Woocommerce plugins + the custom PHP codes you mentioned above, it works fine.
I can see the new post and all duplicated posts are in "Pending" status.

Please check these:
Edit the post forms (ID 6350 and ID 6351)
In section "Toolset Forms Commerce", make sure you are using below options:
- Purchase processing: Pending Review
- Purchase complete: Published
These option will overide the options "Set this post status" in your screenshot:
hidden link

More help:
https://toolset.com/documentation/user-guides/front-end-forms/using-cred-commerce-to-add-payments-to-forms/#3-1-updating-the-post-status-when-the-payment-status-updates
Section "3.1 Updating the post status when the payment status updates"
Screenshot:
https://toolset.com/wp-content/uploads/2013/04/cred-commerce-post-status-on-change.png

#1584583

100% Correct.

Maybe the "help text" on the admin interface should point out that the settings can/will be overwritten by the Forms Commerce Module if one is activated.

You can close the ticket.