Disable confirmation email to site admin

Hi,
Our department is multifaceted which makes our website multipurpose as well. We recently added A+ for scheduling appts with our photographers, but our site admin has no involvement with the photography group. He does not want to receive emails when photography appointments are made. Is there a way to disable this in the settings so that confirmation emails go to the provider but not the admin?

Thanks

  • Michael Bissett

    Hey @cbenson583, hope you're doing well this evening! :slight_smile:

    One way we could resolve this would be to change the admin email for Appointments+ to use, we could do that with this PHP snippet:

    add_filter( 'app_get_admin_email', 'app_get_admin_email_cb' );
    function app_get_admin_email_cb( $email ){
        return 'example@example.com';
    }

    You'd want to change the email address there to an email address more appropriate for this.

    You can add this snippet into the functions.php inside your theme, if you think your theme won’t be changed.

    Otherwise, inserting it as a mu-plugin (must use plugin) is the best solution. To do this, go to your /wp-content/ folder via FTP, and find the folder called "mu-plugins". If there is no folder with that name, then you'll want to create one. Then, create a file inside that folder, and give the file any name you like and paste the code in there.

    You don't need to activate that plugin, as it will be always be automatically activated. Please be sure to add a PHP start tag at the beginning of the code if you insert this code as a mu-plugin, like this:

    <?php

    Hope this helps! :slight_smile:

    Kind Regards,
    Michael

  • cbenson583

    Hi,
    Thanks for the reply, unfortunately that won't work for us, we run a multisite, so doing this would change the email for all 400 subsites.

    So, under 'Notification Settings,' if I set 'Send Confirmation email' to 'Yes' then it sends an email to the client, the service provider, and the site admin, correct? And no way around this other than making a change to our code base? Which of course, would affect all of our subsites, introducing behavior that not everyone in our network would want. Seems like the plugin could apply to a broader range of use cases if there were three separate options to control this. Any likelihood of a fix or add-on that would address this?

    Gravity forms also sends confirmation emails when a form is completed, one of the things they allow is a way to change who the email is sent from, looks like this plugin just pulls the site admin's email, which brings the admin back into the appointments loop even if the problem above is resolved (i.e. a client replies to the confirmation email with a schedule change request, that reply goes to the site admin who has to figure out who it needs to be forwarded to). Is there a setting to change this?

    Also, when I go to the appointments list in the dashboard, it is only displaying two appointments per page, we are still testing and we already have 8 pages. Any way to increase the number per page? Normally I just go to screen options at the top and change it there for posts/pages/cpt's but the handy 'screen options' tab is not displaying for Appointments.

    Sorry for the laundry list, we're trying to get an enterprise appointments solution so whatever we choose has to meet some broad needs; I was informed of the first issue by another team member. It wasn't until I dug in on it today that I found the others.

    Thanks

  • Michael Bissett

    Hey @cbenson583,

    Seems like the plugin could apply to a broader range of use cases if there were three separate options to control this.

    This would definitely be a handy feature to have, and something I would open a feature request for over here:

    https://premium.wpmudev.org/forums/forum/feature-suggestions#question

    For the moment though, regarding this:

    Any likelihood of a fix or add-on that would address this?

    A workaround we could try, would be to adjust the earlier code I provided to target this particular subsite:

    add_filter( 'app_get_admin_email', 'app_get_admin_email_cb' );
    function app_get_admin_email_cb( $email ){
    
    $blog_id = get_current_blog_id();
    
    if ( $blog_id == 9 ) {
    	return 'example@example.com';
    } else {
    	return $email;
        }
    }

    You'd want to exchange the "9" there for the ID of the subsite in question, and you'd want to set the email address there for the desired email address.

    You can determine the ID for the site by going inside the Network Dashboard, and navigating to:

    Sites -> All Sites

    And clicking on the "Edit" link for the subsite in question. You'll see the ID in the URL, it should look like this:

    wp-admin/network/site-info.php?id=9

    Gravity forms also sends confirmation emails when a form is completed, one of the things they allow is a way to change who the email is sent from, looks like this plugin just pulls the site admin's email, which brings the admin back into the appointments loop even if the problem above is resolved (i.e. a client replies to the confirmation email with a schedule change request, that reply goes to the site admin who has to figure out who it needs to be forwarded to). Is there a setting to change this?

    That's where the code snippet would come in handy, as it would adjust the admin email to send this to, so if someone else is managing this, the email would be sent to him instead of the site admin, if that makes sense?

    Also, when I go to the appointments list in the dashboard, it is only displaying two appointments per page, we are still testing and we already have 8 pages. Any way to increase the number per page?

    Hmm... this'd be something we'd want to discuss in a separate thread, but it sounds like something I'd want to have a closer look at the subsite for, could you open a new thread for this, and make sure to enable Support Access?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please also be sure to mention the subsite in question here, seeing as there's 400 of them in your network. :slight_smile:

    Kind Regards,
    Michael

  • Michael Bissett

    Hey @cbenson583! :slight_smile:

    Here's how you can send those in securely:

    - 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 admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password) - just in case a deeper look's required
    - 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/

    Kind Regards,
    Michael

  • cbenson583

    Hi Michael,
    Thanks for the reply, I got the number of records displayed on the admin appointments page issue figured out. You guys had it covered, it's just the setting under advanced settings. Someone here had set it to 2 for some reason before I started looking into the other issues they were having. I just didn't notice that setting for some reason, sorry about that.

    I tried your code snippet for the admin email issue. Looks like it is a workable solution for us, thanks for that and have a great day!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.