If you are using our Booking and Appointment Plugin for WooCommerce, the dafault labels such as “Number of days selected” and ‘Price per Day’ is displayed on the booking form after the customer has chosen their booking dates. However, you don’t have to stick with the default text provided by the plugin.
With these simple customizations, you can change it to the text that is easily understandable and relatable to your customers. We’ve already covered how to change the number of selected days on the booking product page. Now, we’ll show you how to customize the text displayed on the cart and checkout pages.
Solution: Change the Number of Days and Price per Day Text on the Cart & Checkout Page
Imagine a business that handles booking hotels using the WooCommerce Booking and Appointment Plugin, which by default shows “No. of Days” and “Per Day Price” on the cart and checkout pages. To make the booking details more relevant and much clearer for customers, you can customize the text to “Nights selected” and “Price Per Night” using the following code:
function bkap_get_item_data_callback( $other_data, $cart_item ) { $new_data = $other_data; foreach ($other_data as $key => $value) { if ( __( 'No. of Days', 'woocommerce-booking' ) == $value['name'] ) { $new_data[$key]['name'] = __( 'Nights selected', 'woocommerce-booking' ); } if ( __( 'Per Day Price', 'woocommerce-booking' ) == $value['name'] ) { $new_data[$key]['name'] = __( 'Price per night', 'woocommerce-booking' ); } } return $new_data; } add_filter( 'bkap_get_item_data', 'bkap_get_item_data_callback', 10, 2 );
Output
The above code has changed the text to ‘Nights selected’ and ‘Price Per Night’ on the cart page which is more relevant and understandable to customers booking for hotel stays.
![How to Change the 'Number of Days' and 'Price per Day' Text on the Cart & Checkout Page with WooCommerce Booking and Appointment Plugin? 1 How to Change the 'Number of Days' and 'Price per Day' Text on the Cart & Checkout Page with WooCommerce Booking and Appointment Plugin? - Tyche Softwares](https://media.tychesoftwares.com/wp-content/uploads/Customize-the-default-text-displayed-when-using-the-bkap-plugin-1024x756.png)
The same modified text will also be displayed on the checkout page as shown below.
![How to Change the 'Number of Days' and 'Price per Day' Text on the Cart & Checkout Page with WooCommerce Booking and Appointment Plugin? 2 How to Change the 'Number of Days' and 'Price per Day' Text on the Cart & Checkout Page with WooCommerce Booking and Appointment Plugin? - Tyche Softwares](https://media.tychesoftwares.com/wp-content/uploads/customize-the-default-text-when-using-the-booking-plugin-for-WooCommerce-1024x792.png)
In addition to customizing the text options on the cart and checkout page, you can also display Price Ă— Number of Days Calculation in Cart and Checkout Pages, which helps customers quickly verify the booking cost so that they are more convinced to proceed and complete the booking process.