CoursePress and Woo integration not working as expected

Having an issue with the Woocommerce integration where users are not automatically enrolled in a course after they checkout.

Though for unpaid courses, users are enrolled successfully.

  • Adam Czajczyk

    Hello Kara,

    Thank you for your question!

    After reading the chat I have conducted some additional tests on my own test site with CoursePress and WooCommerce to make sure that we are not missing anything. Both plugins work together and in any case - paid or free course, purchase directly via WooCommerce product page or through the specific course's page, buying as a visitor or as a logged in user - I was automatically added to the course as a student.

    Since it's not working that way for you, I have accessed the site to check if I can find any reason for that but the configuration of both WooCommerce and CoursePress seems fine so I'd say that "something" is interfering here, breaking the checkout process in case of CoursePress paid courses.

    To be able to pinpoint the reason, we would need to "play" with site configuration - changing some options for testing, disabling plugin etc. As this is a live site with hundreds of active members, it's not the best/safest idea to do it there. I realize that during the chat it was suggested to you to create a staging/dev site that we could use to troubleshoot this. It would be the best course of action and would let us safely investigate the case in order to find a cause and a solution.

    Such a "staging site" should be an exact copy of the live one. You can find more about it here:

    https://premium.wpmudev.org/blog/set-up-staging-site-cheap-shared-hosting/

    Once you got such site set up, please also enable support access to it. To do this, you will need to install WPMU DEV Dashboard plugin on it, log it in into your WPMU DEV account and then go to the "WPMU DEV -> Support" page and click on "Grant support access" button there.

    Let me know, please, when it's ready and I'll access that site and further investigate the issue.

    Kind regards,
    Adam

  • Kara

    Hi Adam,
    I'm not willing to go into the files and create a staging site. I looked at the instructions and its above my pay grade.

    I can however duplicate the site on a separate domain. The only issue is the add to cart buttons from Entrepreneur's site would not work - but they wouldn't for a staging site either. Assuming you can use the add to cart from the product pages within our site (which produces the same results), I think a duplicate site should work for testing. Please confirm.

    Kara

  • Kasia Swiderska

    Hello Kara,

    Assuming you can use the add to cart from the product pages within our site (which produces the same results), I think a duplicate site should work for testing. Please confirm.

    Yes, this will be enough for us to test the issue.
    If staging site is created can you send us access to this site so we can perform tests? In case we will need to setup a debug we will need FTP access.

    Note: Don't leave your login details in this ticket.
    Instead, you can send us your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    Subject: "Attn: Kasia Swiderska"
    - Site login URL
    - WordPress admin username to staging
    - WordPress admin password to staging
    - FTP credentials (host/username/password)
    - Folder path to site in question
    - Link back to this thread for reference
    - Any other relevant urls/info

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    Please confirm here that you send those credentials

    kind regards,
    Kasia

  • Kasia Swiderska

    Hello Kara,

    I can see this issue on staging site - however from settings it looks okey - but FTP credentials are not working and before I will start deactivating plugins in search for the conflict I would like to first enable debug.log to see if there isn't any error that would give us information why it's not working.
    Can you check those creds and let us know via email?

    Also for testing purposes I have switched Stripe gateway to test mode and theme to default one.

    kind regards,
    Kasia

  • Kasia Swiderska

    Hello Kara,

    I apologize for the delay - I have done some tests on staging site and looks like at some point products and courses were "disconnected".
    It means that there was no relation between product and course. So product have been paid for, but because it was not related to course - student was not enrolled into course.
    Problem was that lack of that relation was not visible when we checked settings - but there is option in CoursePress that redirect product page to related course. By turning this and seeing that product is not redirecting to course it lead me to conclusion that relation is broke.

    Solution to this is to save all the courses to be Unpaid and then Paid again. In Step 6 of each course disable option "This is a paid course", click Update, then again enable "This is a paid course" and then Update and Publish.
    That should create this relation again.

    I have tested this on staging site on courses: Unit 2 and Unit 3 and in both cases my test user was able to start course right away.

    Please try re-saving Paid option on your live site - it should start working there after that.

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.