Skip Navigation

[Resolved] Display WooCommerce Gravity Forms Add-On data in order view

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 3 years, 11 months ago.

Assisted by: Jamal.

Author
Posts
#1615411

Thank you Jamal. I disabled wc-pending and enabled wc-processing and it works fine now. 🙂

As for the plugin that I am using to integrate with WooCommerce, it's called WooCommerce Gravity Forms Add-On. For each food product we offer, the customer can add on ingredients but must pay extra for each ingredient added. The WooCommerce GF plugin adds the amount for the extra ingredients to the product total $. I created an add-on Gravity form for each product. It works well and the entries display in each WooCommerce order.

I just received a response from the plugin developer. Here is what he wrote ...

"This isn’t something specific to gravity forms product addons. Once the order is placed we add the form data to standard WooCommerce order item metadata. Any extension which adds additional order item information uses the same method.

You’d need to figure how to display that order item metadata for your custom solution. You don’t really need to worry about the fact that the information came from gravity forms product addons."

Within the woocommerce_order_itemmeta table, I see _gravity_forms_history and the data for it looks like the attached. I just need to know how to display the entries in the Toolset Display Orders View I created. 🙂 Eric

#1615417

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi Eric,

Toolset blocks/shortcodes/API cannot display information that is not managed by Toolset. In the case of WooCommerce, we integrate with custom post types and custom taxonomies. The order items and order item meta are not saved in the same tables.
We have no way to display the order item meta, You will need to create your custom shortcodes to display each info inside Toolset Views.
https://codex.wordpress.org/Shortcode_API

From your screenshot, the Gravity data is stored as a serialized array, you can use an online tool to unserialize the value and know how it is stored. Check this website hidden link I often use dBug option.

You can use the "wc_get_order_item_meta" function or the "Order" class from WooCommerce, inside your shortcodes, to get the data from the order. Check these links:
- https://docs.woocommerce.com/wc-apidocs/function-wc_get_order_item_meta.html
- https://wordpress.stackexchange.com/a/348878

I hope this helps. Let me know your feedback.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.