Booking slots not available in January

After upgrade from Appointments, lite to Appointments+ the slots in January can't be booked

  • Panos

    Hi Robin ,

    I imported your settings and noticed that you have set the Appointments upper limit (days) to 7.

    This allows only first 7 days from current date to be booked. In case you have set that by accident you should change that value in order to set the other dates available.

    I assume, though, that you were trying to set the first 7 days of each week as available. If this is the case, then leave that option as it is ( 7 ), and add the following snippet in a mu-plugin:

    add_filter( 'app_limit', function( $limit ){
        if( isset( $_GET['wcalendar'] ) ){
            $start_time = current_time( 'timestamp' );
            $week_start = (int) $_GET['wcalendar'];
            $end_limit_for_week = $week_start + ( DAY_IN_SECONDS * $limit );
            $datediff = $end_limit_for_week - $start_time;
            $limit = floor( $datediff / ( DAY_IN_SECONDS ) );
        return $limit;
    }, 10 );

    If you are not familiar with what a mu-plugin is, simply create the folder wp-content/mu-plugins (if it doesn't exist already ). Inside that folder create a new php file ( eg app-limit.php ). Open that file to edit. In the very top of that file insert the opening php tag:
    then add a new line and paste the snippet I shared above.

    Hope this helps :slight_smile:

    Please let us know if I assume wrong and it is something else you were trying to achieve.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.