Change Order Admin “Order” column to SHIPPING name instead of BILLING name

[ad_1]

@tarotfellow

Use the below code snippet to show the shipping name instead of billing name in the order number column in the admin dashboard. Add the code in the active theme functions.php file.

add_filter( 'woocommerce_admin_order_buyer_name', 'woocommerce_admin_order_buyer_name', 10, 2 );

function woocommerce_admin_order_buyer_name($buyer, $order) {

$buyer = trim(sprintf(_x('%1$s %2$s', 'full name', 'woocommerce'), $order->get_shipping_first_name(), $order->get_shipping_last_name()));
return $buyer;
}

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer