diff --git a/gs-product-configurator/gspc-add-entry-data-to-woo-order-custom-field.php b/gs-product-configurator/gspc-add-entry-data-to-woo-order-custom-field.php new file mode 100644 index 00000000..f75b918d --- /dev/null +++ b/gs-product-configurator/gspc-add-entry-data-to-woo-order-custom-field.php @@ -0,0 +1,29 @@ +get_meta( 'gspc_gf_entry_ids', true ); + + if ( $entry_ids ) { + + $entry_id = $entry_ids[0]; + + $entry = GFAPI::get_entry( $entry_id ); + + $data = rgar( $entry, '4' ); // Replace 4 with the field ID you need + + $order->update_meta_data( '_my_custom_key', $data ); // Replace _my_custom_key with your custom meta key + + } + +}, 10, 4 );