Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nitin Prakash

    (@nitin247)

    Hello @sonwander

    As per WooCommerce standards here is the list of default order statuses
    Pending payment, Failed, Processing, Completed, On Hold, Refunded, Canceled, Refunded.

    By default, if the order status is not Failed, Canceled the user is redirected to the thank you page. So adding the code snippet “if ( $order_status == ‘completed’ )” will only send the customer to thank you page if the order status is completed.

    In your case, if the order status becomes completed then the user will be redirected to the thank you page. Which will work fine in the case of successful credit card payment.

    But in the case of COD or the Bank Transfer, the order status could be other than completed so the user will not be redirected thank you page.

    You may add some validation on your course page if the viewer is a buyer then he may render the page else do nothing, show warning or notification. Just a suggestion.

    You case is not general, but specific. So you may need to add some customization to the code.

    I am also working on a method to add a filter to change the order status on demand without editing the code. This may be available in the next plugin update, but currently, I am not having a defined timeline for it.

    If you still need any help feel free to ping me or add a comment.

    Thanks in advance.

    Thread Starter sonwander

    (@sonwander)

    Hello! Thanks for the reply.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Prevent auto login with Bank transfer or COD’ is closed to new replies.