diff --git a/batchexportperm.php b/batchexportperm.php index 4d13d0a..79a41c3 100644 --- a/batchexportperm.php +++ b/batchexportperm.php @@ -286,10 +286,12 @@ function _batchexportperm_civicrm_allow_contribution_to_edit($contributionId) { 'custom_group_id' => "batchexportperm_batch_details", 'name' => "export_date", ]); - $exportDate = civicrm_api3('Contribution', 'getvalue', [ + $exportDate = civicrm_api3('Contribution', 'get', [ 'return' => "custom_{$customFieldId}", 'id' => $contributionId, - ]); + 'sequential' => 1, + ])['values'][0]["custom_{$customFieldId}"]; + CRM_Core_Error::debug('exportdate', $exportDate); if (empty($exportDate) || CRM_Core_Permission::check('edit exported contributions')) { return TRUE; }