How to get custom fields in woocommerce Development


If you are using ACF plugin for custom fields in woo-commerce , here is the code how to get custom fields in short description on on single page content of woo-commerce.

Here we  made a Field Label is ‘Dimensions’ and Field Name is ‘Dimensions’ type ‘text ‘ and formatting ‘No formatting ‘ and leave blank all fields.

Only to get value use following code:-

$value = get_field( "text_field" );



If value is empty then field name not displayed by following code:- 

$value = get_field( "text_field" );
if( $value ) {
        echo $value;
else {
        echo 'empty';


<tr><?php $value = get_field( ‘Dimensions’ );if( $value ) {
echo ‘<td>Dimensions:</td>’;
echo ‘<td>’. $value . ‘</td>’;
} else {
} ?></tr>