• Resolved rodolphec

    (@rodolphec)


    Hi,

    A client of mine that is using booking activities need to remove old booking from his booking page.

    When you see your bookings, you have the old and new ones, but they don’t need to see the old bookings.

    I made a mod to remove the olds one, but now I can’t find a way to do it.

    Could you help me build a filter to remove the old bookings ?

    (Il me faut enlever les réservations passées dans la page “Mes Réservations”. Je ne comprends pas comment utiliser le système de filtre pour le faire)

Viewing 1 replies (of 1 total)
  • Plugin Author yoancutillas

    (@yoancutillas)

    Hello,

    Yes you can filter by date,

    • Go to Booking Activities > Bookings
    • In the “Date” filter, set the “From” field to “2019-06-19”
    • Click on “Apply filters”

    Now, only the bookings made on events starting after 2019-06-19 00:00:00 will appear in the list.
    If a booking group contains at least one booking after 2019-06-19, the booking group line will appear too.

    You need to set this filter each time you go to the booking list.
    If you want it by default, you can set default filters by adding this code to your child theme functions.php:

    function my_theme_default_booking_filter() {
    	if( ! isset( $_REQUEST[ 'from' ] ) ) { $_REQUEST[ 'from' ] = date( 'Y-m-d' ); }
    }
    add_action( 'bookacti_before_booking_filters', 'my_theme_default_booking_filter' );

    You can also totally remove old bookings and old events thanks to the embedded archiving tool.

    • Go to Booking Activities > Settings > System
    • Set a date
    • Follow the archiving process

    All the events and bookings before that date will be archived. You and your customers won’t be able to access them anymore. You need to take all the precaution before you do that, here is a documentation.

    Regards,
    Yoan Cutillas

Viewing 1 replies (of 1 total)
  • The topic ‘Remove old booking’ is closed to new replies.