Hi there! Yes, that’s certainly possible, but you’ll need a bit of custom code to get it working. Instructions can be found here: https://www.knowband.com/blog/tips/how-to-change-the-default-order-status-on-woo-commerce/
Hope that helps!
Ok @imazed. Sounds good. But I want it to be set to a status where the order can be edited. So that’s ‘pending payment’, right?
So how am I going to do that?
/**
* Plugin Name: My First Plugin
* Plugin URI: http://www.mywebsite.com/my-first-plugin
* Description: Change order status by default to
* Version: 1.0
* Author: Erwin Slob
* Author URI: https://www.eswebmedia.nl
*/
#<editor-fold defaultstate="collapsed" desc="Default Status as Pending">
function action_woocommerce_payment_complete( $order_id ) {
if( ! $order_id ) return;
$order = wc_get_order( $order_id );
$order->update_status( 'pending' );
};
// add the action
add_action( 'woocommerce_payment_complete', 'action_woocommerce_payment_complete', 10, 3 );
#</editor-fold>
But I’m not sure about this. What must the status be? Is pending correct? Your example gives wc-print-invoice, but I can’t find out where this is coming from…
But I’m not sure about this. What must the status be? Is pending correct? Your example gives wc-print-invoice, but I can’t find out where this is coming from…
Here is the list of order status
`
‘wc-pending’ => _x( ‘Pending payment’, ‘Order status’, ‘woocommerce’ ),
‘wc-processing’ => _x( ‘Processing’, ‘Order status’, ‘woocommerce’ ),
‘wc-on-hold’ => _x( ‘On hold’, ‘Order status’, ‘woocommerce’ ),
‘wc-completed’ => _x( ‘Completed’, ‘Order status’, ‘woocommerce’ ),
‘wc-cancelled’ => _x( ‘Cancelled’, ‘Order status’, ‘woocommerce’ ),
‘wc-refunded’ => _x( ‘Refunded’, ‘Order status’, ‘woocommerce’ ),
‘wc-failed’ => _x( ‘Failed’, ‘Order status’, ‘woocommerce’ ),
You are awesome! Works great!