From 7d73f1ef249f86117f785ba81aeb888951f717e8 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 2 Nov 2020 12:36:10 +1300 Subject: [PATCH] Remove IPN reference to _relatedObjects, deprecate property --- CRM/Contribute/BAO/Contribution.php | 12 +++++++++++- CRM/Core/Payment/AuthorizeNetIPN.php | 1 - 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index e426ba786087..ae8a01f91233 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -44,9 +44,19 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { public static $_trxnIDs = NULL; /** - * Field for all the objects related to this contribution + * Field for all the objects related to this contribution. + * + * This is used from + * 1) deprecated function transitionComponents + * 2) function to send contribution receipts _assignMessageVariablesToTemplate + * 3) some invoice code that is copied from 2 + * 4) odds & sods that need to be investigated and fixed. + * + * However, it is no longer used by completeOrder. * * @var \CRM_Member_BAO_Membership|\CRM_Event_BAO_Participant[] + * + * @deprecated */ public $_relatedObjects = []; diff --git a/CRM/Core/Payment/AuthorizeNetIPN.php b/CRM/Core/Payment/AuthorizeNetIPN.php index 87bd21990e1d..dc4340500bfd 100644 --- a/CRM/Core/Payment/AuthorizeNetIPN.php +++ b/CRM/Core/Payment/AuthorizeNetIPN.php @@ -107,7 +107,6 @@ public function main($component = 'contribute') { $contribution->amount_level = $objects['contribution']->amount_level; $contribution->address_id = $objects['contribution']->address_id; $contribution->campaign_id = $objects['contribution']->campaign_id; - $contribution->_relatedObjects = $objects['contribution']->_relatedObjects; $objects['contribution'] = &$contribution; }