Get Form data after woocommerce purchase completed

Home Forums Quform WordPress Get Form data after woocommerce purchase completed

This topic is: not resolved
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #34715
    Nikola
    Participant

    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 1 year, 5 months ago by Nikola.
    #34722
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #34795
    Nikola
    Participant

    Thank 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() : ''); 
    #34797
    Nikola
    Participant

    Hi 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

    #34798
    Nikola
    Participant

    Anything from second page of the form isn’t saved to database, and does not appear in entries, please help

    #34799
    Ally
    Support Staff

    You 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 1 year, 5 months ago by Ally.
    #34802
    Nikola
    Participant

    Yes 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

    #34807
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy