• Resolved georgecarvill

    (@georgecarvill)


    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;
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Zorem

    (@zorem)

    Hi the slug is pickup

    Thread Starter georgecarvill

    (@georgecarvill)

    Thanks. I’m still missing something. This works for “Completed” but does not work for pickup:
    /**
    * 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 ( ‘pickup’ === $key )
    $order_statuses[‘pickup’] = _x( ‘Order Complete’, ‘Order status’, ‘woocommerce’ );
    return $order_statuses;
    }

    Thread Starter georgecarvill

    (@georgecarvill)

    Never mind. I got it. Tanks

    Thread Starter georgecarvill

    (@georgecarvill)

    Sh*t. No it isn’t. My eyes are getting too tired.

    Plugin Author Zorem

    (@zorem)

    Hi, I meant to replace the pickedup with pickup, it should be with wc- prefix: wc-pickup, sorry if I confused you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Tweaking status name’ is closed to new replies.