• Resolved blessedthesick

    (@blessedthesick)


    Hi. I just want to fix a problem. I’ve a web that offers online courses, but when clients buy a course by Direct Bank Transfers, the order automatically set up as “completed”. I just want to automatically the orders by Bank Transfers set up as “processing”. It’s possible?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    when clients buy a course by Direct Bank Transfers, the order automatically set up as “completed”.

    Out of the box, when an order is placed with bank transfer, the status should automatically be set to “on hold” until you confirm payment and manually change the status to “completed.” Here is the documentation page that explains order statuses in relation to payment gateways: https://docs.woocommerce.com/document/managing-orders/#section-20

    Does this happen with other payment methods available in your store?

    Thread Starter blessedthesick

    (@blessedthesick)

    Hi Maykato, thanks for your answer.

    the status should automatically be set to “on hold” until you confirm payment and manually change the status to “completed.”

    Well, in my web when an order is placed with bank transfer, the status is automatically “completed”. I dont know why. With another payment methods the status set up as “processing”.

    I just want that in every single payment methods, the status of the order should be “processing”.

    Hi,

    I just want that in every single payment methods, the status of the order should be “processing”.

    You can use the code below to automatically change the status to “processing”:

    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( 'processing' );
    }

    I would recommend using a plugin like?Code Snippets?to add the code to your site.

    Thread Starter blessedthesick

    (@blessedthesick)

    Hi! That code crashes my web ??

    Hmm…that’s strange. I’ve applied the same code to my test site using Code Snippets, and it works properly.
    Did you get an error message when you added the code?

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. If you have further questions, please feel free to open a new topic.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Direct Bank Transfers with automatically status completed’ is closed to new replies.