Ability to Disable Email Notifications

Is there any way to disable the email notifications?

Reason: We are doing some automatic "just-in-time" provisioning for users that does some checks outside of WordPress and then based on those results provisions the users and makes them students of the correct courses accordingly. This means that a user gets emails for every course they are enrolled in each time they login.

  • Michelle Shull
    • DEV MAN’s Apprentice

    Hey there, Susan!

    I'm not finding a way in the settings to disable all email notifications in coursepress, so let's ask second level for a little extra help here. It may take just a while longer to hear back from them, they're a very small and very busy team, but they'll stop in as soon as they can.

    Thanks!

    • Susan
      • Site Builder, Child of Zeus

      Thank you Michele. It seems that email notifications should be something that is completely under my control as a site administrator. I should be able to enable/disable and customize those emails are my whims. The customization pieces are there and I believe we are just missing the enable/disable.

  • Hoang Ngo
    • Code Slayer

    Hi Susan,

    I hope you are well today.

    When looking to the CoursePresss code, I only see one function which handler the email sending. In the file /coursepress/includes/functions.php line 514, you will see a code like this
    function coursepress_send_email( $email_args = array() ) {
    Just update it to

    function coursepress_send_email( $email_args = array() ) {
    return true;

    Let's see if it help :slight_smile:

    Best regards,
    Hoang

  • Hoang Ngo
    • Code Slayer

    Hi @Susan,

    I hope you are well today.

    Currently, we don't have any hooks or filters to make this work without update the plugin code. I will check with the developer, so he can include a condition check for the function like this

    if(!function_exist('coursepress_send_email')){
    //the rest code goes here
    }

    So we can override the function in mu-plugins.

    Best regards,
    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.