Home › Forums › Quform WordPress › Get Form data after woocommerce purchase completed
- This topic has 7 replies, 2 voices, and was last updated 2 years, 1 month ago by Ally.
- AuthorPosts
- September 27, 2022 at 9:01 am #34715NikolaParticipant
Hello crew,
Here is my problem,
I use Quform to calculate some service price and get users data, then I send the calculated price to woocommerce checkout and user then can buy the service, that work great.
But I need to retrieve all off the forms data after payment is complete and send it to an API.
I managed to get the form data and send it to API after form submit, but i can wrap my head arround how to do it after the payment is complete.I tried woocommercer_payment_complete hook and tried retrieving data from a session, but i just get null values.
Everything I do I just get the null values.If is there any way i coud get the function
function get_data($form) { some code } add_action(quform_post_process_1, get_data)
To send my values to my function
function send_data_to_api(){ get form values and send them to api in json format } add_action(woocommerce_payment_complete, send_data_to_api)
Thank you for your help!
- This topic was modified 2 years, 1 month ago by Nikola.
September 27, 2022 at 11:29 am #34722AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 4, 2022 at 9:50 am #34795NikolaParticipantThank you i will try to do that also, i have managed with sessions,
I have another problem, when i copy date picker field to another datepicker the date is shown, but the other datepicker data that is copied is not saved to the database, the field is empty,
How can i set the value of datepicker from previous datepicker and save both data to the database?My code:
$('.quform-field-45_71_1').click(function() { var copy = $(this).is(':checked'); $('.quform-field-45_70').val(copy ? $('.quform-field-45_6').val() : '');
October 5, 2022 at 9:28 am #34797NikolaParticipantHi it apperrs that all my hidden field values are not saving to database, I checked and save data to database is on everywhere, this is crucial to me because i calculate and store data to hidden field and then i need those calculations saved to database and send to an API.
Thank you
October 5, 2022 at 10:07 am #34798NikolaParticipantAnything from second page of the form isn’t saved to database, and does not appear in entries, please help
October 5, 2022 at 10:16 am #34799AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- This reply was modified 2 years, 1 month ago by Ally.
October 5, 2022 at 11:07 am #34802NikolaParticipantYes it was hidden on conditional logic, i tryed your code it populates the datepicker but it says the field is mandatory, like there is no input in it
October 6, 2022 at 9:45 am #34807AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.