You are here

function _commerce_file_license_property_downloads_remaining in Commerce File 7

Remaining Callback for License downloads

1 string reference to '_commerce_file_license_property_downloads_remaining'
commerce_file_commerce_file_license_info in ./commerce_file.commerce.inc
Implements hook_commerce_file_license_info().

File

./commerce_file.commerce.inc, line 151
Implementations of Commerce Hooks

Code

function _commerce_file_license_property_downloads_remaining($license, $limit_value) {
  if (is_numeric($limit_value)) {
    $current = _commerce_file_license_property_downloads_current($license);
    if (isset($current)) {
      return $limit_value - $current;
    }

    // default to full limit
    return $limit_value;
  }
  return 0;
}