Add noisy deprecation warning to Contribution.transact
authoreileen <emcnaughton@wikimedia.org>
Wed, 23 Oct 2019 19:27:45 +0000 (08:27 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 23 Oct 2019 19:27:45 +0000 (08:27 +1300)
Note that the Order api has been an adequate replacement for over a year - per efforts by wordpress integration

api/v3/Contribution/Transact.php

index d97167e7f29080344ab302523c8efbc2849af41c..137cce175f1792445200f7f37761f51d6a969915 100644 (file)
@@ -46,6 +46,8 @@ function _civicrm_api3_contribution_transact_spec(&$params) {
 /**
  * Process a transaction and record it against the contact.
  *
+ * @deprecated
+ *
  * @param array $params
  *   Input parameters.
  *
@@ -53,6 +55,7 @@ function _civicrm_api3_contribution_transact_spec(&$params) {
  *   contribution of created or updated record (or a civicrm error)
  */
 function civicrm_api3_contribution_transact($params) {
+  CRM_Core_Error::deprecatedFunctionWarning('The contibution.transact api is unsupported & known to have issues. Please see the section at the bottom of https://docs.civicrm.org/dev/en/latest/financial/OrderAPI/ for getting off it');
   // Set some params specific to payment processing
   // @todo - fix this function - none of the results checked by civicrm_error would ever be an array with
   // 'is_error' set