From 4a517906b390b7e9e73c77902f3a3ebf43c1ac15 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Wed, 27 Jan 2016 02:01:19 +0530 Subject: [PATCH] --CRM-16188, changed code to use contribution_id when retrieving wrt contribution --- Civi/API/Subscriber/ChainSubscriber.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Civi/API/Subscriber/ChainSubscriber.php b/Civi/API/Subscriber/ChainSubscriber.php index f9f24b4c77..46bea11877 100644 --- a/Civi/API/Subscriber/ChainSubscriber.php +++ b/Civi/API/Subscriber/ChainSubscriber.php @@ -132,8 +132,10 @@ class ChainSubscriber implements EventSubscriberInterface { //'entity_table' will be set to 'contact' & 'id' to the contact id //from the parent call. in this case 'contact_id' will also be //set to the parent's id - $subParams["entity_id"] = $parentAPIValues['id']; - $subParams['entity_table'] = 'civicrm_' . $lowercase_entity; + if (!($subEntity == 'line_item' && $lowercase_entity == 'contribution' && $action != 'create')) { + $subParams["entity_id"] = $parentAPIValues['id']; + $subParams['entity_table'] = 'civicrm_' . $lowercase_entity; + } $crm16084 = FALSE; if ($subEntity == 'relationship' && $lowercase_entity == 'contact') { -- 2.25.1