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

How to Remove the Bookings menu from the ‘My Account’ page when using the Booking and Appointment plugin for WooCommerce?

This customization provides the flexibility to store owners to dynamically manage the visibility of the ‘Bookings‘ menu from the My Account page based on their specific needs. You can relate this to businesses that have both seasonal service bookings and product orders.

In such scenarios, this customization ensures that you can hide the bookings menu from the My Account page while no booking services are open for customers. So that users will find only relevant options that enhance the clarity and usability.

Solution: Remove the Bookings menu from the ‘My Account’ page when using the Booking and Appointment plugin for WooCommerce

The code snippet allows store owners to hide the visibility of the ‘Bookings’ menu item on the My Account page.

/**
 * Remove the Bookings menu from the My Accounts page
 *
 * @param array $menu My Account Menu.
 */
function bkap_remo_booking_endpoint( $menu ) {

	unset( $menu['bookings'] );

	return $menu;
}
add_filter( 'woocommerce_account_menu_items', 'bkap_remo_booking_endpoint', 20, 1 );

Output

When a customer logs into their account and navigates to the My Account page, they usually see the ‘Bookings’ menu when using the booking and appointment plugin. This menu will be removed if the above snippet is activated.

How to Remove the Bookings menu from the 'My Account' page when using the Booking and Appointment plugin for WooCommerce? - Tyche Softwares

When the snippet is disabled, the ‘Bookings’ menu will reappear on the My Account page along with the other menu options.

How to Remove the Bookings menu from the 'My Account' page when using the Booking and Appointment plugin for WooCommerce? - Tyche Softwares

Removing unnecessary options can indeed declutter the customer’s user interface. Similarly, you can also customize WooCommerce emails to remove billing details, which not only improves the visual appearance of emails but also ensures that only essential information stands out.

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

Share It:

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