• Resolved hajarsabrani

    (@hajarsabrani)


    I’ve set the Booking Rules to:

    1. Allow only one booking per service from an email, and
    2. Allow only one booking per slot from an email.

    But I can still submit booking with the same email on different days. I attached the link.

    Thank you in advance.

    • This topic was modified 2 years, 1 month ago by hajarsabrani.
    • This topic was modified 2 years, 1 month ago by hajarsabrani.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WebbaPlugins

    (@webba-agency)

    Hello,

    Thank you for reporting about this problem. I have checked on our side and confirm this is a bug.

    Bug fix will be included in the next release.

    If you need it to be fixed right away, please find how to do that below:

    1. Open for edit the following file:

    wp-content/plugins/webba-booking/common/class_wbk_db_utils.php

    2. Search for the following line of the code:

    $count = $wpdb->get_var( $wpdb->prepare( " SELECT COUNT(*) FROM " . get_option( 'wbk_db_prefix', '' ) . " wbk_appointments WHERE email=%s and service_id=%d and time > %d", $email, $service_id, time() ) );

    3. Replace this line with the following:

    $count = $wpdb->get_var( $wpdb->prepare( " SELECT COUNT(*) FROM " . get_option( 'wbk_db_prefix', '' ) . "wbk_appointments WHERE email=%s and service_id=%d and time > %d", $email, $service_id, time() ) );

    Thread Starter hajarsabrani

    (@hajarsabrani)

    Thanks,
    but I can’t find the exact code as above. Do you mean this code?

    $count = $wpdb->get_var( $wpdb->prepare( " SELECT COUNT(*) FROM " . get_option( 'wbk_db_prefix', '' ) . "wbk_services WHERE name = %s ", $value ) );

    • This reply was modified 2 years, 1 month ago by hajarsabrani.
    Plugin Author WebbaPlugins

    (@webba-agency)

    Hi,

    Please, try the following: search for the " wbk_appointments and replace with the "wbk_appointments.

    The idea is to remove extra space before ‘wbk_appointments’.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Limit per Service (on diferrent days) not working’ is closed to new replies.