Skip Navigation

[Resolved] How can i see number of order for the form with payment?

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by yulyaB 4 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1613425

I created a fee form. I need to know the order number WOOCommerce that has been paid or not, but attached to the form, how to do it?
I want to see the order number, for example, on the post page in admin mode.

#1614383

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Yulya,

Thank you for getting in touch.

While you are not able to get the order number for the specific form and if they have paid from the frontend. However you are still able to display the orders on the frontend with this method below.

https://toolset.com/learn/create-an-ecommerce-wordpress-site/displaying-more-information-from-woocommerce/

Though you are not able to see the order status in terms of if it has been paid for or not but you can still see all the items that were ordered.

Please let me know if this was what you are referring to.

Thanks,
Shane

#1615105

Hello, Shane!
This is not exactly what I want.
I use Toolset forms for paid posts, not everyone completes the post with payment, sometimes I don’t see that the payment has been completed, and accordingly there is no way to find out what order and for what. Some orders are already without participation of paid forms. Comparing orders is very difficult, since there are a lot of them. How to attach an order number to a paid post?

#1615343

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Yulya,

Thank you for the clarity.

We have an order complete hook that should be able to get this done for you. If you setup a field in Types to hold the order number then we can write a code like this.


add_action( 'cred_commerce_after_order_completed', 'save_order_num', 10, 1 );
function save_order_num( $data ) {
    //some code here
  if($data['extra_data']['cred_form_id'] ==  123 ){

$order_num = $data['transaction_id'];
update_post_meta($data['extra_data']['cred_post_id'],'wpcf-order_num',$order_num );
}

}

Add this to your Toolset custom code section in Toolset -> Settings -> Custom Code and activate it. Please note that you will need to change 123 to the ID of your form and 'wpcf-order_num' to the slug of the custom field that you've created keeping the wpcf- prefix when you add the new slug to the code.

Please let me know if this code helps.
Thanks,
Shane

#1617741

Many thanks! All work!

#1617743

My issue is resolved now. Thank you!