Cannot modify notification emails to admin/service provider in Appointments +

When an appointment is made an email is sent to the site admin and the service provider. As the admin, I do not manage the appointments and certainly don’t want unneeded email in my inbox. Unfortunately, there doesn’t seem to be a way to remove the email from the admin without removing the email to the service provider.

Ironically, the unwanted email to the admin contains a convenient link to the pending appointment for confirmation but the link is not included in the email to the service provider who actually manages them. There seems to be no place to edit these notifications either.

  • Ash
    • WordPress Hacker

    Hello @templesmc

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    You need to select “Allow Service Provider Confirm Own Appointments” is set as Yes. It should send an email to the providers with the appointment link.

    Please let us know if that works for you.

    Cheers

    Ash

  • templesmc
    • Flash Drive

    Also getting these messages when debug is on.

    Strict Standards: Redefining already defined constructor for class Appointments in /var/www/smc/htdocs/wp-content/plugins/appointments/appointments.php on line 43

    Strict Standards: Redefining already defined constructor for class AppointmentsGcal in /var/www/smc/htdocs/wp-content/plugins/appointments/includes/class.gcal.php on line 26

    Notice: Undefined index: page_id in /var/www/smc/htdocs/wp-content/plugins/appointments/includes/widgets.php on line 212

  • Michael Bissett
    • Recruit

    Hey @templesmc, thanks for your patience here! :slight_smile:

    In regards to the first issue, could you try inserting this code into your site as an mu-plugin?

    function disable_admin_email() {
    return true;
    }
    add_filter('app_confirmation_disable_admin', 'disable_admin_email', 999 );

    As for your second question, you can try replacing line 4495 of appointments.php with this:

    $body = sprintf( __('The new appointment has an ID %s and you can edit it clicking this link: %s','appointments'), $app_id, admin_url("admin.php?page=appointments&type=pending") );

    Please make sure to back up the file first before making this change though, just to be safe. :slight_smile:

    Also, as we’re modifying the plugin directly, I should note that you’ll want to note the changes that are made, as they’ll be lost on an update to the plugin.

    Hope this helps!

    Kind Regards,

    Michael

    P.S. Please make sure that you’re using the latest version of Appointments+ before making the change I mentioned above.

  • Ash
    • WordPress Hacker

    Hello @templesmc

    I hope you are well today.

    So, is the 2nd issue fixed?

    For the first issue, instead of mu-plugin, please go to /wp-content/plugins/appointments/appointments.php line no 4417 and replace

    $to = array( $this->get_admin_email( ) );

    with

    $to = array();

    Please let us know if that works.

    Cheers

    Ash

  • Michael Bissett
    • Recruit

    Hey @templesmc, thanks for your patience here! :slight_smile:

    At this point, I think it’d be best if we were to have a closer look at things here, could you please send in the following:

    – In the subject field add “Attn: Michael Bissett”

    – Link back to this thread

    – Include WordPress admin access details

    – Include FTP log-in details

    – Include any relevant URLs for your site

    On the contact form, select “I have a different question“, this ensures it comes through and gets assigned to me.

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

    Thanks a bunch! :slight_smile:

    Kind Regards,

    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.