Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    Do you need to disable the delete button at the Booking Listing page in admin panel ? Or what exactly button do you mean? Can you send the screenshot ? Thank you.

    Please note, if you simply need to deactivate the sending emails to customer after deletion of the booking or approving, etc.. then you can disable option “Email sending” at the top right side under filter toolbar at the Booking Listing page.

    Kind regards.

    Thread Starter mikeyvanrijsbergen

    (@mikeyvanrijsbergen)

    Hello,

    It is indeed the delete button in de admin panel, for when the booking is not excepted and is already in the trashcan.

    Sorry fot the Dutch, but i want to disable the button with the red arrow. but only for 1 rol.

    Not only because of the mail but also becaise we need to save the information for 2 year for finance department.

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.

    Is it okay if this button is only visible to users with the ‘Administrator’ role and not shown to users with other roles on your website?

    Kind regards.

    Thread Starter mikeyvanrijsbergen

    (@mikeyvanrijsbergen)

    Hello,

    yes if that is possible.

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    By default it’s does not possible from the settings of the plugin to configure it, yet. But you can make this fix.

    Please open this file ../{Booking Calendar Folder}/includes/page-bookings/bookings__actions.php

    ( you can check how to edit files in WordPress menu in this article https://wpbookingcalendar.com/faq/how-edit-file-in-wp-menu/ )

    Then find this code:

    case 'delete_booking_completely':
    break;

    and replace it to this code:

    case 'delete_booking_completely':
    $user = get_userdata( $user_id );
    $user_roles = ( empty( $user ) ? array() : $user->roles );
    if ( ! in_array( 'administrator', (array) $user_roles ) ) {
    /* WordPress standard roles: 'administrator'|'editor'|'author'|'contributor'|'subscriber' */
    return false;
    }
    break;

    Disclaimer. Check more about, what support we are providing here https://wpbookingcalendar.com/faq/what-support-do-you-provide/
    Thank you for understanding.

    Kind Regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable delete’ is closed to new replies.