After successfully created custom fields and saved their values, you’d like to display those values on the frontend. In this case the best method would be to work with WooCommerce custom templates.

To get those values we just need to use the popular get_post_meta() function.

Example:-

<?php
// Display Custom Field Value
echo get_post_meta( $post->ID, ‘field-slug’, true );
// You can also use
echo get_post_meta( get_the_ID(), ‘field-slug’, true );
?>

Please login or Register to submit your answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.