Created
December 4, 2018 14:56
-
-
Save kadimi/4461c2eaf6df4675e15198f6dc699761 to your computer and use it in GitHub Desktop.
WooCommerce Bookings - Get Bookings for 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 | |
/** | |
* WooCommerce Bookings - Get Bookings for Product. | |
* @param int $product_id Product ID. | |
* @return array Bookings IDs. | |
*/ | |
function wc_bookings_get_booking_ids_by_product_id( $product_id ) { | |
return WC_Booking_Data_Store::get_booking_ids_by( [ | |
'object_id' => $product_id, | |
] ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment