OL Learn

Send data from wordpress (woocommerce) to workflow

Hi,

Does anyone have experience connecting wordpress with workflow?

What we want to accomplish is that in Wordpress we set up a woocommerce shop and in this shop there will be a form that should be send to the workflow.

This is the situation.
The user want a preview of a document filled with the form data. this preview needs to be in the same window. the document is created in planetpress

in other words, is this possible?

i’ve done some reading in the REST API cookbook and came across this:
https://help.objectiflune.com/en/planetpress-connect-rest-api-cookbook/2020.1/#Cookbook/Working_Examples/Working_with_the_Workflow_Services/Creating_Content_(Web)By_DRE(JSON).htm%3FTocPath%3DWorking%2520Examples%7CWorking%2520with%2520the%2520Workflow%2520Services%7C_____9

I don’t know if I’m on the right path here because I am new to API’s

I have solved it in a project via a custom template and hooks via functions.php. But this is quite complex.

In the custom template there is a form that I pass via Ajax to a function in functions.php and from there the request is sent to PlanetPress. The generated preview PDF I store on an FTP server and give Wordpress only the information back where the PDF is. In my Ajax request script the PDF is then loaded into a container on the web page.

Hope someone will post a better solution here. Maybe using the olc-shortcodes Wordpress plugin.