Tag Archives: woocommerce

{lang: ‘hu’}In wordpress it’s pretty easy to add a new column to a post listing table. Let’s take a look how it works with the woocommerce orders table! function add_custom_columns_to_orders_table($columns) { $new_columns = $columns; if(!is_array($columns)) { $columns = array(); } unset( $new_columns[‘order_actions’] ); $new_columns[‘shipping_method’] = __(‘Shipping method’, ‘your-domain’); $new_columns[‘payment_method’] = __(‘Payment method’, ‘your-domain’); // We […]

{lang: ‘hu’}It took a while to figure it out how to get all the comments of an order, but finally I succeeded. So my first try looked like this: function get_all_order_comments($order_id) { $args = array( ‘post_id’ => $order_id, ‘approve’ => ‘approve’, ‘type’ => ” ); return get_comments($args); } Unfortunately it didn’t work, because – as […]