Tweaking status name
-
I am trying to tweak some status names to better match our workflow. Code below successfully changes the “Completed” status to “Ready for Delivery” But it doesn’t change “Picked up” to “Order Complete.” What am I screwing up?
/**
* Attempting to rename statuses
* @author George
* @see https://www.philowen.co/blog/rename-completed-order-status-in-woocommerce/
*/
add_filter( ‘wc_order_statuses’, ‘wc_renaming_order_status’ );
function wc_renaming_order_status( $order_statuses ) {
foreach ( $order_statuses as $key => $status ) {
if ( ‘wc-completed’ === $key )
$order_statuses[‘wc-completed’] = _x( ‘Ready for Delivery’, ‘Order status’, ‘woocommerce’ );
if ( ‘wc-pickedup’ === $key )
$order_statuses[‘wc-pickedup’] = _x( ‘Order Complete’, ‘Order status’, ‘woocommerce’ );
}
return $order_statuses;
}
- The topic ‘Tweaking status name’ is closed to new replies.