Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Add ‘Select Resource’ Option in Dropdown When Using the Booking and Appointment Plugin for WooCommerce?

Our booking and appointment plugin for WooCommerce allows store owners to list specific resources that are relevant to their products or services. To extend this resource dropdown feature on the frontend, we are going to add customized options to make the interface easier for customers to navigate and find information quickly.

Solution: Add ‘Select Resource’ Option in Dropdown When Using the Booking and Appointment Plugin for WooCommerce

The code snippet modifies the default dropdown option to start with a default option labeled ‘Select Resource’ and has an empty value. This option will clearly indicate customers for selecting resources specifically with the Booking and Appointment Plugin for WooCommerce.

function bkap_default_resource_option_value() {

	return '<option value="">' . __( 'Select Resource', 'woocommerce-booking' ) . '</option>';
}
add_filter( 'bkap_default_resource_option_value', 'bkap_default_resource_option_value', 10, 1 );

Output

When customers visit the booking form on the front of a WooCommerce website that uses the Booking and Appointment Plugin, they see a straightforward dropdown labeled “Select Resource,” which is easy to use and understand.

How to Add 'Select Resource' Option in Dropdown When Using the Booking and Appointment Plugin for WooCommerce? - Tyche Softwares


Without implementing the code, the resource dropdown will simply show the available resource options that have been set up in the backend booking settings for that specific product.

How to Add 'Select Resource' Option in Dropdown When Using the Booking and Appointment Plugin for WooCommerce? - Tyche Softwares

Through this customization, we have added the label ‘Select Resource’ to the resource dropdown. However, each store’s needs may vary. For instance, some admins may require hiding the cost associated with resources in the dropdown. If you need any further customization options, feel free to ask in the comments.

Browse more in: Code Snippets, WooCommerce Booking & Appointment, WooCommerce How Tos

Share It:

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x