The default behavior of our WooCommerce Booking and Appointment Plugin will display all relevant booking details such as showing “No. of Days” and “Per Day Price” associated with each booking item on the cart and checkout pages. But with some customizations, we can also refine how booking information is presented to customers on these pages.
This customization will hide detailed booking specifics like the number of days and the per-day price from the Cart and Checkout pages. Let’s see how to make these pages more user friendly by showcasing only the important details that allows customers to quickly confirm their bookings without unnecessary distractions.
Solution: Remove Booking ‘No of Days’ and ‘Price Per Day’ from Cart & Checkout Page in WooCommerce Booking and Appointment Plugin
This code snippet modifies the information displayed on the cart and checkout pages of WooCommerce removing information such as “No. of Days” and “Per Day Price” associated with each booking item.
/** * Remove No. of Days and Price per day from Cart and Checkout page. * * @param array $other_data Array of Other data. * @param array $cart_item Array value of Cart Item. */ function bkap_get_item_data_callback( $other_data, $cart_item ) { foreach ($other_data as $key => $value) { if ( __( 'No. of Days', 'woocommerce-booking' ) == $value['name'] ) { unset( $other_data[$key] ); } if ( __( 'Per Day Price', 'woocommerce-booking' ) == $value['name'] ) { unset( $other_data[$key] ); } } return $other_data; } add_filter( 'bkap_get_item_data', 'bkap_get_item_data_callback', 10, 2 );
Output
Once customer has done with the booking and proceeds to cart page, the additional details of booking such as number of days and price per day details will be removed from the booking details section.
![How to Remove ‘No of Days’ and ‘Price Per Day’ from Cart & Checkout Page in WooCommerce Booking and Appointment Plugin? 1 How to Remove ‘No of Days’ and ‘Price Per Day’ from Cart & Checkout Page in WooCommerce Booking and Appointment Plugin? - Tyche Softwares](https://media.tychesoftwares.com/wp-content/uploads/hide-additional-booking-details-from-cart-page-1024x604.png)
The code also ensures that the additional booking details are hidden on checkout page as well.
![How to Remove ‘No of Days’ and ‘Price Per Day’ from Cart & Checkout Page in WooCommerce Booking and Appointment Plugin? 2 How to Remove ‘No of Days’ and ‘Price Per Day’ from Cart & Checkout Page in WooCommerce Booking and Appointment Plugin? - Tyche Softwares](https://media.tychesoftwares.com/wp-content/uploads/Hide-additional-booking-details-on-checkout-page-1024x651.png)
When the code snippet is not implemented, the booking details will show the ‘No of Days’ and ‘Per Day Price’ text on the cart and checkout pages.
![How to Remove ‘No of Days’ and ‘Price Per Day’ from Cart & Checkout Page in WooCommerce Booking and Appointment Plugin? 3 How to Remove ‘No of Days’ and ‘Price Per Day’ from Cart & Checkout Page in WooCommerce Booking and Appointment Plugin? - Tyche Softwares](https://media.tychesoftwares.com/wp-content/uploads/Additional-booking-details-displayed-in-cart-page-1024x620.png)
![How to Remove ‘No of Days’ and ‘Price Per Day’ from Cart & Checkout Page in WooCommerce Booking and Appointment Plugin? 4 How to Remove ‘No of Days’ and ‘Price Per Day’ from Cart & Checkout Page in WooCommerce Booking and Appointment Plugin? - Tyche Softwares](https://media.tychesoftwares.com/wp-content/uploads/Additional-booking-details-on-checkout-page-1024x837.png)
Similar to this customization, you can also enhance user experience by hiding booking details in WooCommerce order emails. Such customization helps customers to see simplified booking information not only on checkout and cart pages but also in order emails.