Skip to content

Instantly share code, notes, and snippets.

@rajakannan rajakannan/woocommerce.php
Last active Nov 15, 2019

Embed
What would you like to do?
Collection of essential snippets
<?php
/**
* Display field value on the admin order edit page
*/
add_action( 'woocommerce_admin_order_data_after_billing_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 );
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
You can’t perform that action at this time.