2016-07-21 50 views

回答

-1

插件\ woocommerce \包括\管理員\類-WC-管理員-後type.php

public function shop_order_columns($existing_columns) { 
     $columns      = array(); 
     $columns['cb']    = $existing_columns['cb']; 
     $columns['order_status']  = '<span class="status_head tips" data-tip="' . esc_attr__('Status', 'woocommerce') . '">' . esc_attr__('Status', 'woocommerce') . '</span>'; 
     $columns['order_title']  = __('Order', 'woocommerce'); 
     $columns['order_date']  = __('Date', 'woocommerce'); 
     $columns['billing_address'] = __('Billing', 'woocommerce'); 
     $columns['shipping_address'] = __('Ship to', 'woocommerce'); 
     $columns['customer_message'] = '<span class="notes_head tips" data-tip="' . esc_attr__('Customer Message', 'woocommerce') . '">' . esc_attr__('Customer Message', 'woocommerce') . '</span>'; 
     $columns['order_notes']  = '<span class="order-notes_head tips" data-tip="' . esc_attr__('Order Notes', 'woocommerce') . '">' . esc_attr__('Order Notes', 'woocommerce') . '</span>'; 
     $columns['order_items']  = __('Purchased', 'woocommerce'); 

     $columns['order_total']  = __('Total', 'woocommerce'); 
     $columns['order_actions'] = __('Actions', 'woocommerce'); 

     return $columns; 
    } 

與來自管線264沒有到280 檢查截圖替換此代碼http://awesomescreenshot.com/04961cfedc

0

你必須使用manage_edit-orders_columns行動鉤在functions.php或在您的自定義插件。

add_filter('manage_edit-orders_columns', 'changecolumnorder'); 
function changecolumnorder($columns){ 
    // one option is to "recreate" the whole array but you can do it with array_slice() function as well 

    // remove Date column first 
    unset($columns['order_date']); 
    // and add it into the correct place 

    return array_slice($columns, 0, 3, true) 
    + array('order_date' => __('Date', 'woocommerce')) 
    + array_slice($columns, 3, NULL, true); 

} 

我看到其他的答案建議編輯woocommerce插件文件。請不要這樣做!始終使用掛鉤。更多掛鉤可以自定義WooCommerce專欄,您可以找到here