I am creating a custom field Tracking_ID
on Woocommerce, where the admin will enter the tracking ID as value.
How can i get the value of the created custom field and display it inside the customer-completed-order.php
Also (Optional) i want to show the tracking ID field in the user's track-order
order page in his/her my-account.
Woocommerce>order field:
oceanwp-child/woocommerce/emails/customer-completed-order.php
<?php /* translators: %s: Customer first name */ ?>
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
<?php /* translators: %s: Site title */ ?>
<p><?php printf( esc_html__( 'Your %s order is completed. Your tracking number is: {$fld}', 'woocommerce' ), esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) ); ?></p>