I want to change the default status the built in PayPal gateway in WooCommerce . Currently, when a new order is created, it's updating to 'processing'. I want to change it but I can't see anywhere to change it, not in the WooCommerce -> Payments settings and not in the code (probably I just missed it).
Does anyone knows where it is?
Thanks.
I want to change the default status the built in PayPal gateway in WooCommerce . Currently, when a new order is created, it's updating to 'processing'. I want to change it but I can't see anywhere to change it, not in the WooCommerce -> Payments settings and not in the code (probably I just missed it).
Does anyone knows where it is?
Thanks.
add_action( 'woocommerce_thankyou', 'change_order_status', 10, 1 );
function change_order_status( $order_id ){
if( ! $order_id ) return;
$order = wc_get_order( $order_id );
if( $order->get_status() == 'processing' )
$order->update_status( 'pending' );
}
processing
. I want to change it so it will be set to a custom status I have created. – Omer Commented Dec 24, 2018 at 11:08