Skip to content

Instantly share code, notes, and snippets.

@greguly
Forked from woogist/gist:6267983
Last active December 23, 2015 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greguly/5ca726d82fcb707a534d to your computer and use it in GitHub Desktop.
Save greguly/5ca726d82fcb707a534d to your computer and use it in GitHub Desktop.
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