Woocommerce - post creation - product type "booking"

Hi there,

I’m using Woocommerce + Woocommerce Booking plugin and I’m trying to create new post in woocommerce, for the simple product type no problem but I would like to post a “bookable product” product type using “booking” as value when a new form is submitted.

But all my tries don’t work.
Maybe someone can help me or already had the problem?
Many thanks in advance
Jerome

Are you using the Gravity Forms Advanced Post Creation add-on, or just the built in post creation tools in Gravity Forms?

Also, what are all the things you tried already?

To create a post of a type other that standard post (when not using the Advanced Post Creation add-on), you can use the gform_post_data filter to change the post type.

Your code would look like example one, but you would change post_type from ‘page’ in this example to ‘booking’ or whatever the actual type of post is (when stored in the wp_posts table.)

You would also need to ensure you correct all the same information a standard booking post would have, in the same format.

© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.