1
votes

I have 2 payment gateways in woocommerce, cash on delivery and credit card.

After the client sends the order with cash, i get the order status to processing. BUT, after they pay with credit card and payment is succesfull the order status goes to complete.

How can i make the order status to say processing after they paid with the card? And only after they received the goods, the shop manager can set the order status to complete.

1
Check documentation of gateway, they might have a setting or filter/hooksfunkysoul

1 Answers

1
votes

Try to use the following, which will set paid orders status to processing by default:

add_action( 'woocommerce_payment_complete_order_status', 'wc_auto_complete_paid_order', 10, 3 );
function wc_auto_complete_paid_order( $status, $order_id, $order ) {
    return 'processing';
}

Code goes in functions.php file of the active child theme (or active theme).

Related: WooCommerce: Auto complete paid orders