Skip to content

Instantly share code, notes, and snippets.

@danieliser
Created June 26, 2016 20:29
Show Gist options
  • Save danieliser/afe37a97149144643f49e5476cf42903 to your computer and use it in GitHub Desktop.
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.
<?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