• Resolved flioer

    (@flioer)


    Hello,

    I made custom order status using this link

    But i wonder, if i can use my custom status after customer makes order. Now if customer orders new products and selects payment – bank transfer its shows on-hold and after choosing pay in shop its processing. I want to make what no maters what payment customer choose it will show my custom order status (wc-new-order).

Viewing 1 replies (of 1 total)
  • Saif

    (@babylon1999)

    Hello @flioer,

    So if I understand you correctly, you want every new order to have your newly created order status.

    First, please note that custom solutions like this are not within our scope of support here.

    That said, assuming you didn’t modify the code in the link you provided, you can add this snippet to your site.

    /**
     * Auto Complete all WooCommerce orders.
     */
    add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
    function custom_woocommerce_auto_complete_order( $order_id ) { 
        if ( ! $order_id ) {
            return;
        }
    
        $order = wc_get_order( $order_id );
        $order->update_status( 'wc-misha-shipping' );
    }

    You can add it to your functions.php file or use a plugin like Code snippet.

    The only thing you might need to change is $order->update_status( 'wc-misha-shipping' ); to match your custom status.

    Alternatively, you can check this plugin made by one of our partners.

    Hope this helps!

Viewing 1 replies (of 1 total)

The topic ‘Custom order status after making order’ is closed to new replies.