Rename Woo-commerce Order Status Programmatically


function aviweb_renaming_order_status( $order_statuses ) {
    foreach ( $order_statuses as $key => $status ) {
	if ( 'wc-processing' === $key ) {
		$order_statuses['wc-processing'] = _x( 'In progress', 'Order status', 'woocommerce' );
	}
	if ( 'wc-completed' === $key ) {
		$order_statuses['wc-completed'] = _x( 'Delivered', 'Order status', 'woocommerce' );
	}
     }
     return $order_statuses;
}
add_filter( 'wc_order_statuses', 'aviweb_renaming_order_status' );

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s