Display custom fields on order details page in Woocommerce

You can use WordPress function "get_post_meta" to echo out your custom field in "order-details.php" template.

<?php echo get_post_meta( $order->id, 'custom-field-name', true ); ?>

Comments

Popular posts from this blog

PHP: Date Difference for PHP 5.2

HTML5 video loop src change on end play function

display the_content with setup_postdata