Created
June 26, 2016 20:29
-
-
Save danieliser/afe37a97149144643f49e5476cf42903 to your computer and use it in GitHub Desktop.
Easy Digital Downloads Function: edd_is_download_in_bundle used to determine if a download is included in a specific bundle.
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 | |
/** | |
* Determines if a download is included in a specific bundle. | |
* | |
* @param $download_id | |
* @param $bundle_id | |
* | |
* @return bool | |
*/ | |
function edd_is_download_in_bundle( $download_id, $bundle_id ) { | |
$bundled_products = edd_get_bundled_products( $bundle_id ); | |
return in_array( $download_id, $bundled_products ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment