• Resolved hollosipeter

    (@hollosipeter)


    Hello!
    Forminator_API::add_form_entry is only creating a form with given data from a webhook but what if I want to do is that run the process with a registration form. Is this possible? Because cforn_user_registered is not working.

    Thanks:
    Peter

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter hollosipeter

    (@hollosipeter)

    Hello Nithin!

    The code I mentioned in this topic:
    https://pastebin.com/7y2bcvEh

    The code is the same, I only change from the last block from if($entry_id){ to your suggested version.
    This is a webhook what processing data from a 3rd party non wordpress system and it is works fine. If I’m inserting you wpmudev_recreate_prepared_data function, then the error will appear – forminator submission and db modification okay, but no e-mail and the error what I wrote before (PHP Fatal error: Uncaught Error: Call to undefined function wpmudev_recreate_prepared_data() in /var/www/clients/client13/web108/web/wp-content/mu-plugins/forminator-webhook_automail.php:679)

    Thank you,
    Peter

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @hollosipeter,

    I do understand you, however, the fatal error shared points that the function is not defined in the code which is an odd error.

    Most probably there is a typo or anything specific missed in the code and hence asked for the revised version on Pastebin.

    Just to be sure, could you please check whether copying/pasting the following gives the same fatal error or not?

    https://pastebin.com/pvz71cJA

    Please do let us know how that goes so that we could check further for other possible workarounds.

    Kind Regards,

    Nithin

    Thread Starter hollosipeter

    (@hollosipeter)

    Hello Nithin!

    What you mentioned in the last pastebin is the same code with fatal error, what we talked about the last few days. I didn’t see any modification.
    Are you sure, that you not copy the wrong link?

    Thanks,
    Peter

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @hollosipeter

    In your shared Pastebin the function doesn’t exist or is not called, the one Nithin shared actually called and exists.

    The function actually exists and seems to be called before PHP can instantiate the function:

    https://monosnap.com/file/XIoMOnx3Z84IMNEuyMfM4mDQEfdaDk

    Try moving it to your functions.php instead and remove the function from Ajax just call it there,

    The best workflow was actually creating a custom class.

    However note, the amount of required coding to make everything work in a refactoring way is out of our support scope.

    Best Regards
    Patrick Freitas

    Thread Starter hollosipeter

    (@hollosipeter)

    Hello Patrick!

    I gave this code from your team. But this was the problem what you wrote:
    “The function actually exists and seems to be called before PHP can instantiate the function:”
    So I just put first the function and after defining entry_id and finally it is working, e-mail sent.

    So thank you very much

    P.S. I put this to the webhook, because the meaning of my long webhook that from my dance school entry system if I selling a new pass to a new customer it should be using wordpress webhook and IF/ELSE – decision about existing customer or generating a new one – and based on this the e-mails sent. So the code have to be together. But now as I wrote everything is fine ?? Thank you so much!

    Regards,
    Peter

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘New user registration – Forminator API – possible?’ is closed to new replies.