I have created a form and wants to define a notification.
As I need to retrieve some custom fields from the form, I have created a snippet to define custom placeholders.
Here is thesnippet :
Hello. Thank you for contacting the Toolset support.
First of all - After checking to debug information you shared with us, I found that you are using outdated Toolset plugins. We always recommend running your site with latest stable release plugin version.
*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest officially released version. You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/
Can you please update ALL Toolset plugins first and check if that help you to resolve your issue. If no, please share problem URL and access details.
I have set the next reply to private which means only you and I have access to it.
It seems my last answer is not private. I don't understand why but all private info are seenable by anybody !!!
I have changed the password and need to give you the new one in a secure way.
Please delete (or make private my last answer and allow a real private message for the new password.
Regards
Pat
I make last reply as private. I dont know what's happening here.
Again, I have set the next reply to private which means only you and I have access to it. If you do not see next reply as private, please edit the password in previous reply.
You are using the $_REQUEST to grab the value of your fields but when you are completing order from backend those $_REQUEST fields will not be available as it will be only available when you post/submit the form.
Thanks for the info.
Does that means that this is not possible to retrieve the custom fields content when the notification comes after the payment?
How can I manage to have this info as I need to sent a confirmation mail to the user including those fields content?
Do I need to move from REQUEST to a get_postmeta() in the snippet? If yes, how could I be sure to find the right post to extract the related postmeta?
I want to run a test to check if there is a way to get post ID (order ID), can you please give me full grant as when I try to edit the post form (ID 113) it does not allow me. Maybe you are editing there.
In fact, those data are coming from :
1. The product chosen (the form is inserted inside the single product page). The 2 info relative to the product are 'stage-date-debut' and 'stage-date-fin'
2. The posttype "salle" which is in relationship with the product for all other custom fields.
So, these data are not linked to a user but to a product.
Regards
Pat
Ok - thanks for sharing this information. But there is no way to get the product ID in the backend while you complete the order from wp-admin. I already checked this and you need to find a way to get the product ID within the "cred_body_notification_codes" hook when you mark order as complete.
If you need custom programming for your project, please feel free to contact our certified partners:
=> https://toolset.com/contractors/
Do you mean that if the product is paid thanks to PayPal for example, then the info relative to the placehoder will be available? When the site will be in production, that will be the standard way of working (the manual validation in the admin will be replaced by another form that will be published as soon as validated).
Regards
Pat
no - I mean that there is no way to get the product information within the "cred_body_notification_codes" especially when you are marking the product publish from backend.
If its paypal and automatically the order status is going to set to completed with your production site, the code you are using should work or you need to make a test.