sir, Please, How

Hi sir,

Please, How can i make the service provider have the ability to get the booking notification and also add the ability to the provider at control the booking system?

Regards

ASHRAF

  • Bojan Radonic
    • Head of Support

    Hey Ashraf,

    With regards to the notification I already replied to that here: https://premium.wpmudev.org/forums/topic/sir-please-i-set so you can follow up on that thread if you'd like. Please don't post same questions in multiple threads as that just slows down support team responses.

    also add the ability to the provider at control the booking system?

    What kind of access are you looking to give them? Most options you can find in Appointments -> Settings -> Accessibility where you can allow providers to set their own working hours and confirm their own appointments, see screenshot:

    Is there anything else specifically that you'd like to grant them access to?

    Please let me know :slight_smile:

    Cheers,

    Bojan

  • Ashraf
    • Site Builder, Child of Zeus

    Great, I did exact what you said above under the Accessibility. Now the provider get the notification.

    I want then when the provider accept the booking then my client will get a notification about that, and in the same time i don’t want the admin of the site will get a notification about this booking. How can i do that? please

    Regards

    A.J.

  • Bojan Radonic
    • Head of Support

    Hey again,

    If you’re not using payments having “Send Notification to admin if confirmation is required” to No in Appointments -> Settings -> General -> Notifications should do the trick so can you please try that?

    If that still doesn’t work you can send me access to your site through our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question using this template:

    Subject: “Attn: Bojan”

    -WordPress admin username

    -WordPress admin password

    -login url

    -any other relevant urls

    Please use this subject line to ensure that it gets assigned to me :slight_smile:

    Cheers,

    Bojan

  • Tyler Postle
    • CGO

    Hey there Ashraf, thanks for sending that in, I'm working alongside Bojan here.

    I had a look and if you want your clients to receive a confirmation email then you will need to turn on this option:

    Yes, that will send a confirmation to the admin as well. If you don't want that then one option is to change the "Email Address" via Settings > General.

    If that is not an option, then it would require custom development to remove that feature. An easier method would be for your admin to setup a filter in their inbox that filtered out those emails so they don't need to see them but still will have a history there should they ever need to reference any.

    If you really want to remove admin from receiving the email address and you aren't a developer yourself then you can hire a developer from within our community to help you out via our Jobs Board: https://premium.wpmudev.org/wordpress-development/

    Hope that helps! If you have further questions on that or it doesn't address your issue then can you explain further what behaviour you are seeing and also what you are expecting to see?

    Cheers,

    Tyler

  • Ashraf
    • Site Builder, Child of Zeus

    Thanks for your answer,

    Please, in this case, if there is an one option is to change the “Email Address” via Settings > General.

    so in this case, can i change it to any email address that i don’t use. so is that will resolve the problem?

    And I can read the code, so i need to know please, which file and what i need to edit and block by using /* */ the function that sent the email to the admin. is that OK?

    Regards

    A.J.

  • Tyler Postle
    • CGO

    Hey A.J.,

    so in this case, can i change it to any email address that i don’t use. so is that will resolve the problem?

    Yes, so that would work or you could open up this file:

    /appointments/includes/notifications/class-app-notification-confirmation.php

    and edit this line(aprox line 35):

    $admin_email = $appointments->get_admin_email();

    to

    $admin_email = 'yourcustomemail@email.com';

    So you enter in any email you want and it will send to that email instead of the admin. If you don’t want it to send to anyone then just put a fake one in there or leave it blank.

    Keep in mind that since you are editing a plugin file in this case then you will need to make that edit after each update.

    Hope that helps!

    Cheers,

    Tyler

  • Ashraf
    • Site Builder, Child of Zeus

    I mean the admin that is still get the following message:

    The new appointment has an ID 38 and you can edit it clicking this link: /wp-admin/admin.php?page=appointments&type=pending

    and I need at only the provider will get this message, please.

    I changed code to: $admin_email = ”; but it is not working correctly, because I am still receive emails about a new appointments. Please, help me!!!

  • Ashraf
    • Site Builder, Child of Zeus

    I think the following changes is working :

    /* $admin_email = apply_filters( ‘app_notification_email’, $appointments->get_admin_email(), $r ); */

    $admin_email = apply_filters( ‘app_notification_email’, ”, $r );

    I did it that here: class-app-notification-notification.php

    and now the admin didin’t get ant notification about a new appointments, is that Ok and correct? please

    Regards

    A.J.

  • Bojan Radonic
    • Head of Support

    Hey Ashraf,

    I wouldn’t suggest editing plugin core files like that cause that will be overridden in the next plugin update.

    You can edit the following which will be added in the next plugin update: Please download and open class-app-notification-confirmation.php which is located in /wp-content/plugins/appointments/includes/notifications/class-app-notification-confirmation.php and

    change line 115 from that looks like this:

    $disable = apply_filters( 'app_confirmation_disable_admin', false, $r, $app_id );

    to this:

    $disable = apply_filters( 'app_confirmation_disable_admin', false, $r, $app_id, $admin_email );

    We’ll add this change in next plugin update. Then you can add the following to your theme funcitons.php (preferably child theme functions.php so you can avoid this being overridden in next theme update)

    //Admin does not receive Notification email
    add_filter( 'app_notification_email', function( $admin_email, $app ){
    return '';
    }, 10, 2 );

    add_filter( 'app_confirmation_disable_admin', function( $disable, $r, $app_id, $admin_email ){
    global $appointments;

    if( $admin_email == $appointments->get_admin_email() ){
    return true;
    }

    return false;

    }, 10, 23 );

    In plugin settings make sure you have the following:

    – in Appointments -> Settings -> General -> Accessibility that you have “Auto confirm” set to “No” and “Allow service provider confirm own appointments” set to “Yes”.

    – in Appointments -> Settings -> General -> Notifications to have “Send Confirmation email” to “Yes” and “Send Notification to admin if confirmation is required” set to “Yes”.

    This will send one notification email to your provider, once he confirms the appointment both provider and user will receive confirmation email. Admin will not receive any emails.

    With that said I see that you’ve opened thread with the same question here: https://premium.wpmudev.org/forums/topic/sir-please-under. I’ve already mentioned opening multiple threads with the same question just delays support staff response times so I’ll ask you once again to please not do this. I’ll close that thread as it’s not needed as you already asked this question here and on couple other threads.

    Please let me know the solution above works.

    Best regards,

    Bojan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.