Accessing custom fields at the thank you page
-
Hello,
I created a custom snippet that gets the order details and write them on a different database (attached to a custom backend, not related to WordPress).
I can get all the WooCommerce fields without problems. But how can I get the values from the custom fields generated by your free plugin?
I noticed the field is saved in the wp_postmeta table, but I would like to avoid to write a custom code for getting it from there if I can access it directly from the thank you page.
I don’t need to show that value on the page, I just need to get the value. If I print_r the order, I see it within the array, but I’m relatively new to the Woocommerce world, so I don’t know how accessing it… is it inside a specific array? Or do I need a specific object to query?
Thanks
- The topic ‘Accessing custom fields at the thank you page’ is closed to new replies.