🚀 Is building a website too difficult? Let me guide you step by step—Learn about the 「Naibabiji WordPress Website Building Coaching Service」 →

Add a 'Shipping in Progress' status to WooCommerce orders

We know that we can build our own cross-border e-commerce independent website using WooCommerce. The default WooCommerce order statuses are only Completed, Processing, On hold, and Cancelled. When we handle cross-border orders, the logistics time can be quite long. If we display it as the normal 'Processing' status, it might cause confusion for users. If we add a new 'Shipping In Progress' status, it would be more user-friendly.

To add extra custom statuses to WooCommerce orders, you can use a Plugin or code.

Add custom order status using a Plugin

Custom Order Status for WooCommerce is a free Plugin for adding order statuses to WooCommerce, which can be installed for free from the WordPress Admin Dashboard.

Plugin URL

Using this Plugin, you can also add icons and colors for the custom statuses.

Custom Order Status for WooCommerce

Add custom order status using code

Using code can avoid installing an extra Plugin, but novices modifying code recklessly might cause website errors, so please use this method with caution.

function naiba_wc_register_post_statuses() {
	register_post_status( 'wc-shipping-progress', array(
	'label' => _x( 'Shipping In Progress', 'WooCommerce Order status', 'text_domain' ),
	'public' => true,
	'exclude_from_search' => false,
	'show_in_admin_all_list' => true,
	'show_in_admin_status_list' => true,
	'label_count' => _n_noop( 'Approved (%s)', 'Approved (%s)', 'text_domain' )
	) );
	}
	add_filter( 'init', 'naiba_wc_register_post_statuses' );
	function naiba_wc_add_order_statuses( $order_statuses ) {
		$order_statuses['wc-shipping-progress'] = _x( 'Shipping In Progress', 'WooCommerce Order status', 'text_domain' );
		return $order_statuses;
		}
add_filter( 'wc_order_statuses', 'naiba_wc_add_order_statuses' );

Add the above code to your Theme's functions file. After saving, you will see the 'Shipping In Progress' option in the order list status.

🚀 Still feeling confused after reading the tutorial? Let me guide you step-by-step instead.

「Naibabiji WordPress Website Building Coaching」 — From selecting a domain and purchasing hosting to installing themes and publishing posts, I「ll guide you through every step, helping you avoid detours and reach your goals directly.

👉 Learn about Website Building Coaching Service
🔒

Comments are closed

The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.

×
二维码

Scan to Follow