How can I enable Custom fields in WooCommerce?

How can I enable Custom fields in WooCommerce?

Cart2Cart supports migration of Custom fields to WooCommerce 2.x.


WooCommerce Custom Fields

However, WooCommerce doesn’t display Custom fields by default.

To enable this option you have to:

  • go to "store/wp-content/plugins/woocommerce/templates/single-product/tabs"
  • find file "additional-information.php"
  • add the following code: echo '<table class="shop_attributes"><tbody>'; foreach(get_post_meta($post->ID, $key, true) as $key => $attr) { if(strpos($key, "_") !== 0) { echo '<th>'.$key.'</th>'; echo '<td>'.array_shift($attr).'</td>'; echo '</tr>'; } } echo '</tbody></table>';

WooCommerce Custom Fields

Posted in: WooCommerce