Publish & Subscribe / Event Hooks system?

We are working with a SaaS partner. They have developed a behavioral analytics/messaging system for boosting Customer Success. They want to build an almost zero config plugin for CoursePress.

Does CoursePress (and/or BuddyPress). Have an 'event hook' publish/subscribe system yet?

Example. When someone finishes a module for example.. You publish something like?

wp_publish('finished_module', [ 'module' => 1]);

Do you have anything like this for other developers to hook into? Thanks for your help!

  • calvinrogercanas
    • New Recruit

    Hello @chris_behnke,

    Hope you're well and thank you for contacting WPMUDEV support! :slight_smile:

    I bet you want something like a callback when a course is finished by a user. right? I am not sure if something like this exist on the plugin in question. Anyway, I will flag our Second Line Support(SLS) staff to give their valuable input on this one. Just to give you a heads up that SLS deal with complex problems so they may reply slower than normal.

    Best Regards,

  • Jack Kitterhing
    • Code Norris

    Hi there @chris_behnke,

    Hope you're well today and thanks for your question! :slight_smile:

    I've just been speaking with the lead developer about this and currently there isn't a hook for a module being completed, only a course, he's going to add a a hook in the next version of the plugin for this. :slight_smile:


    Kind Regards

  • Rheinard
    • The Incredible Code Injector

    Hi @chris_behnke

    There is currently 2 new hooks that will be introduced in the next version. Possibly more, but the 2 already in the code for the next release will give you exactly what you're after.

    'coursepress_course_completed' will trigger when a user completes a course and will give you access to the course id and the student id.

    'coursepress_course_unit_completed' will trigger when a unit is completed. It will give you access to the course id, student id and unit it.

    Very timely question to ask :slight_smile:

    Are there other events you're thinking of?


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.