WooCommerce show custom column

In case someone still needs it – instructions on how to add new columns in Woocommerce orders list. No need in unsetting the default columns, just add this in your functions.php and your code will be valid for updates. 1. Define columns position and names add_filter( ‘manage_edit-shop_order_columns’, ‘MY_COLUMNS_FUNCTION’ ); function MY_COLUMNS_FUNCTION($columns){ $new_columns = (is_array($columns)) ? … Read more

WooCommerce: Add input field to every item in cart

There is a wordpress plugin called WC Fields Factory for the exact purpose. You can also achieve this by using the following woocommerce hooks woocommerce_before_add_to_cart_button, woocommerce_add_to_cart, woocommerce_cart_item_name,and ‘woocommerce_add_order_item_meta’ like for adding text field to product page function add_name_on_tshirt_field() { echo ‘<table class=”variations” cellspacing=”0″> <tbody> <tr> <td class=”label”><label for=”color”>Name On T-Shirt</label></td> <td class=”value”> <input type=”text” name=”name-on-tshirt” … Read more