0.00  View Cart

Support Easy Booking: Google Calendar multiple entries in calendar

This topic contains 1 reply, has 2 voices, and was last updated by  Ashanna 3 weeks, 1 day ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6041

    fla2paris
    Participant

    Hello,

    I have multiple events displayed un my calendar for the same booking.

    I think it’s because I’ve made this filter in function.php file :

    add_filter( 'easy_booking_calendar_event_summary', 'add_custom_event_name', 10, 3 );
    function add_custom_event_name( $name, $order_item, $order ) {
        
    	$name = 'RI#' . absint( $order->get_order_number() ). ' - ' . $order_item->get_quantity() . ' x Enfants - '. $order->get_billing_company();
        return $name;  
    }
    
    add_filter( 'easy_booking_calendar_event_description', 'add_custom_event_description', 10, 3 );
    function add_custom_event_description( $description, $order_item, $order ) {
    	
        $description = 'Le client: ' . $order->get_billing_company() . ' - ' . $order->get_billing_first_name() . ' ' . $order->get_billing_last_name() . '<br>a réservé ' . $order_item->get_quantity() . ' x ' . $order_item->get_name() . '<br>Il précise: ' . $order->get_customer_note() . '<br>' . $order->get_billing_email() . '<br>' . $order->get_billing_phone();
        return $description;
    }

    if my order has several product, it will create the same number of events.
    $order_item is probably the cause of that.

    I would like to list in my event title and event description all the products that was chosen in my order.

    If you have any suggestion to adapt my filter code it would be great.

    Thank you

    #6046

    Ashanna
    Plugin's author

    Bonjour,

    Je vous ai répondu par mail mais je le remets ici au cas où.

    Donc c’est normal, les évènements sont créés par produit et non pas par commande 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘multiple entries in calendar’ is closed to new replies.