0.00  View cart

To change event name, use the following filters:

  • For order items:
add_filter( 'easy_booking_calendar_event_order_item_summary', 'add_custom_order_item_event_name', 10, 3 );

function add_custom_order_item_event_name( $name, $order_item, $order ) {

    $name = '#' . absint( $order->get_order_number() ) . ' - ' . $order_item->get_name(); // Default name
    return $name;
    
}
  • For imported bookings (Availability Check):
add_filter( 'easy_booking_calendar_event_import_summary', 'add_custom_import_event_name', 10, 2 );

function add_custom_import_event_name( $name, $import ) {

	$names = array();
	foreach ( $import['product_ids'] as $index => $product_id ) {
		$product = wc_get_product( $product_id );
		$names[] = $product->get_name();
	}

	$product_names = implode( ', ', $names );

    $name = 'Imported booking: ' . $product_names; // Default name

    return $name;
    
}

To change event description, use the following filter:

  • For order item:
add_filter( 'easy_booking_calendar_event_order_item_description', 'add_custom_order_item_event_description', 10, 3 );

function add_custom_order_item_event_description( $description, $order_item, $order ) {

    $description = ''; // Default: empty
    return $description;

}
  • For imported bookings (Availability Check):
add_filter( 'easy_booking_calendar_event_import_description', 'add_custom_import_event_description', 10, 2 );

function add_custom_import_event_description( $description, $import ) {

    $description = ''; // Default: empty
    return $description;

}

Want to know what's next with Easy Booking? Check the roadmap!