Created
December 5, 2018 10:49
-
-
Save kadimi/9e7a5b34396bdd5a3cec22ee89d99b88 to your computer and use it in GitHub Desktop.
WooCommere Bookings - Check if current page is a bookable product
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WooCommere Bookings - Check if current page is a bookable product. | |
* @return boolean True for bookable products, false otherwise | |
*/ | |
function is_bookable_product() { | |
return is_product() && wc_get_product() instanceof WC_Product_Booking; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment