Filters issue

Hi to follow up on the message on the very first thread, I've used the filters as indicated and it worked ok on the front end: the staring time shows the one set on the filter, and it increments by periods of 45min.

The issue now is that it seems the filter is not taken into consideration in the admin side. Example, if someone book a 45 min session from 3:15pm to 4:00pm, the pending appointment in the admin show a requested time of 12:00am (though a proper ending time of 4:00pm), and worst, the email received indicate the appointment is confirmed for 12:00am.

Any idea where the problem is coming from?

  • Hakan

    Hi,

    I've just tested this and I got the right email and appointment record is also correct:

    Date and time: September 24, 2012 4:15 pm

    Did you already defined the services before adding new time base? If it is so, simply select services tab and save them with the new time base. Please note that they must be multiples of the new time base. For example the "default service" will be staying at 30 minutes duration until you save the services.

    There is one issue here though: Starting from 12:00 am, 45 minutes increases do not match to 4:15pm at all (I see 3:45pm and 4:30pm nearest), therefore if you want to manually edit the appointment you don't see a 4:15pm selection and manual edit shows 12:00 am. I will find a solution for that with the next release, probably by adding another filter.

    However this case does not affect the already taken appointment. So you should check your services' duration.

    Cheers,
    Hakan

  • Hakan

    Ok, here is the solution for the issue I mentioned above:

    Find this line around 7290:

    $min_secs = 60 * $this->min_time;

    Replace it with:

    $min_secs = 60 * apply_filters( 'app_admin_min_time', $this->min_time );

    In your functions.php add these lines:

    function my_new_admin_min_time( $min ) {
    	return 15;
    }
    add_filter( 'app_admin_min_time', 'my_new_admin_min_time' );

    Now 4:15pm (or 3:15pm in your case) is visible and selectable. In fact, now you can also reschedule the appointments in 15 minutes intervals, although it is not available on the front end.

    This filter will be there with next release, so you won't need to modify it after the update.

    Cheers,
    Hakan

  • Tom Eagles

    Greetings and thanks for being a great community member.
    We haven't heard from you on this one for long and I am doing a regular followup to see if there is still something we can assist you on this thread.
    Just to manage the support issues more efficiently, I am marking this thread as resolved for now however this is not being done to avoid your questions in any way.
    Please feel free to mark this is "Not resolved" in case you have further questions and we would be back on it.
    Thanks a lot for being with WPMU DEV.
    Cheers!
    Tom
    Sales &Support
    Did you know we offer FREE lifetime memberships? Click here to learn more.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.