I have created a custom field in my order with the ACF plugin. The field contains a tracking code and is stored under _tracking_code.
I am trying to display the tracking code via the woocommerce_view_order action hook.
add_action( 'woocommerce_view_order', 'order_page', 30 );
function order_page() {
echo get_field('tracking_code'); // ACF Custom Field
}
