[ad_1]
Hi,
I’m currently trying to add some custom field data in the orderID, and with that I am tryin to retrieve a custom field that is on each product. Here is my code:
function change_woocommerce_order_number( $order_id, $order ) {
$prefix = get_post_meta($order_id, ‘wapf[field_63c915e67f273]’, true);
// You can use either one of $order->id (or) $order_id
// Both will work
return $prefix . $order->id;
}
I have tried many different variations in order to target the field, but can’t seem to get the information out. Hope you can help.
Thanks,
Dan