I need that after an order of a subaccount is approved, its status will become "Processing" in steads of "Pending Payment" because our business policy is payment on delivery.
According to your documentation. It's only set to Pending Payment.
Company Order Approval - B2BKing (b2bkingplugin.com)
I've tried this code snippet but it does not work:
add_action( 'woocommerce_order_status_pending', 'changing_order_status_after_approval', 10, 3 );
function changing_order_status_after_approval( $order_id, $posted_data, $order ){
$order->update_status( 'processing' );
}
Please help.
Thank you!