Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Easy Digital Downloads Function: edd_is_download_in_bundle used to determine if a download is included in a specific bundle.
<?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
You can’t perform that action at this time.