Last active
November 15, 2019 04:00
-
-
Save full-stack-king/c1645d7df274e340f20a to your computer and use it in GitHub Desktop.
Collection of essential snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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