Order not complete in woocommerce / coursespress

Hey guys,

Hope you're sleeping a little bit :slight_smile:

Im testing coursepress and woocommerce together. When i purchase a course, the order didnt complete automatically. I have to manually confirm the order for the student to get access to the course. How to solve that ?

Thx for your time !

  • Mehdi
    • Flash Drive

    Hi Michael,

    Yep, some cornflakes and here we are :slight_smile: Hope you're doing well too !

    Im using stripe and paypal express checkout. I've just enabled support access. The site concerned is elearning.thedawahtv.fr.

    I found a workarround maybe it will help you : when the product for the course is created, i can see that "virtual" box is ticked. When you tick "dowloadable" also, it works.

    Thx

  • Michael Bissett
    • Recruit

    Hey @Mehdi! :slight_smile:

    I wasn't able to access that subsite of yours, it keeps asking me to log in when I try accessing it. :disappointed:

    However, I would like to ask... when you were having issues before, did it say that the payment was pending?

    And what gateway did you try using when it came to your discovery you posted above?

    Since you were able to get this working, I'd like to have a closer look at your subsite, could you please send in the following:

    - Mark to my attention, the subject line should contain only: ATTN: Michael Bissett
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress network admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password) - In case any IPN logging is necessary, that'd be for PayPal
    - Include any relevant URLs for your site

    On the contact form (linked to below), please select "I have a different question", this ensures it comes through and gets assigned to me.

    https://premium.wpmudev.org/contact/

    Thanks! :slight_smile:

    Kind Regards,
    Michael

  • Mehdi
    • Flash Drive

    Hi Michael,

    Yep thats what Predrag told me too. I dont know why there's this subsite access issue... Maybe you can just create another temporary super admin ?

    Yes the order status was "pending" and i was testing with stripe payment gateaway.

  • Michael Bissett
    • Recruit

    Hey @Mehdi,

    Hmm... after doing a good deal of research into this, it appears that WooCommerce doesn't autocomplete virtual orders by default, which would explain why it is that you're seeing the orders initially as "Processing".

    There's a pair of options available for us to try here. One would be to insert this PHP snippet as an mu-plugin:

    https://gist.github.com/bryceadams/da8c0eaf9e63a4a695aa#file-gistfile1-php

    Or, an alternative means would be to use this plugin:

    http://www.woothemes.com/products/woocommerce-order-status-control/

    Let me know if this helps please! :slight_smile:

    Kind Regards,
    Michael

  • Michael Bissett
    • Recruit

    Hey @Mehdi,

    Hmm... it wasn't working for me at first (which is why I also suggested those other two workarounds), but it's working for me now, I must've run into a temporary website hiccup here. :slight_smile:

    Though for anyone else wanting to use the code snippet instead (so that they don't have to go into the product and set it to "Downloadable" as well), the code snippet would work as well. :slight_smile:

    Kind Regards,
    Michael

  • Mehdi
    • Flash Drive

    Hi Michael,

    The snippet works like a charm ! For those of you who are wondering how to get this done, simply create a folder named "mu-plugins" in wp-content folder. Then create a txt file, paste the code, save, and change the extention from txt to php. Put now your php file in wp-content/mu-plugins/

    Tada !

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.