Answers.Body: <p>The CDN Tax Receipts extension contains several hooks - one of them allows you to set the 'method' of delivery (Email vs Print) for a specific Contact. Here's an example implementation:</p>
  
  <pre><code>/**
   * Determine Contact's Preferred Communication Method
   * return 'print' -&gt; if Postal Mail is checked
   */
  function my_receipts_cdntaxreceipts_method($contactId) {
  
    // Check if Contact's Preferred Communication Method = Postal Mail -&gt; id = 3
    $result_pcm_id = civicrm_api3('Contact', 'get', array(
      'return' =&gt; "preferred_communication_method",
      'id' =&gt; $contactId,
    ));
  
    if ($result_pcm_id['is_error'] != 1) {
      if (count($result_pcm_id['values'][$contactId]['preferred_communication_method']) == 1) {
        if ($result_pcm_id['values'][$contactId]['preferred_communication_method'][0] == 3) {
          return array('print');
        }
      }
    }
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-15T01:35:15.497Z
Answers.LastActivityDate: 2018-01-15T01:35:15.497Z
Answers.UserDisplayName: KarinG - Semper IT
Body: <p>using:
  CDN Tax Receipts Extension
  <a href="https://github.com/jake-mw/CDNTaxReceipts" rel="nofollow noreferrer">https://github.com/jake-mw/CDNTaxReceipts</a></p>
  
Tags: <extension><cdn-tax-receipts>
Title: How can I indicate if our donors prefer to receive Charitable/Political Tax Receipts by Email or Postal Mail?
ThreadText: # How can I indicate if our donors prefer to receive Charitable/Political Tax Receipts by Email or Postal Mail?
  
  (Asked by: username_0 on 2018-01-15)
  
  using:
  CDN Tax Receipts Extension
  <https://github.com/jake-mw/CDNTaxReceipts>
  
  **Tags:** extension, cdn-tax-receipts
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-01-15. Score: 2
  
  The CDN Tax Receipts extension contains several hooks - one of them allows you to set the 'method' of delivery (Email vs Print) for a specific Contact. Here's an example implementation:
  
  ```
  /**
   * Determine Contact's Preferred Communication Method
   * return 'print' -> if Postal Mail is checked
   */
  function my_receipts_cdntaxreceipts_method($contactId) {
  
    // Check if Contact's Preferred Communication Method = Postal Mail -> id = 3
    $result_pcm_id = civicrm_api3('Contact', 'get', array(
      'return' => "preferred_communication_method",
      'id' => $contactId,
    ));
  
    if ($result_pcm_id['is_error'] != 1) {
      if (count($result_pcm_id['values'][$contactId]['preferred_communication_method']) == 1) {
        if ($result_pcm_id['values'][$contactId]['preferred_communication_method'][0] == 3) {
          return array('print');
        }
      }
    }
  }
  
  ```
  
  
  ---
  
  