Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce - Display checkout custom field on the order edition page
/**
* Display field value on the order edition page
**/
add_action( 'woocommerce_admin_order_data_after_billing_address', 'my_custom_checkout_field_display_admin_order_meta' );
function my_custom_checkout_field_display_admin_order_meta( $order ){
echo '<p><strong>'.__( 'My Field' ).':</strong> ' . get_post_meta( $order->id, 'My Field', true ) . '</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment