/**
  * Returns the status of the donation.
  *
  * @return  string
  * @access  public
  * @since   1.3.0
  */
 public function get_donation_status()
 {
     if (!$this->has_valid_donation()) {
         return '';
     }
     return $this->donation->get_status(true);
 }
Esempio n. 2
0
    ?>
</h3></caption>
            <?php 
    foreach ($donations as $post) {
        $donation = new Charitable_Donation($post);
        ?>
            <tr>
                <td class="donation-date"><?php 
        echo $donation->get_date();
        ?>
</td>
                <td class="donation-id">#<?php 
        echo $donation->get_number();
        ?>
</td>
                <td class="donation-status"><?php 
        echo $donation->get_status(true);
        ?>
</td>
                <td class="donation-total"><?php 
        echo charitable_format_money($donation->get_total_donation_amount());
        ?>
</td>
            </tr>
            <?php 
    }
    ?>
        </table>
    </div>
<?php 
}
Esempio n. 3
0
 /**
  * @depends test_add_donation
  */
 public function test_update_status()
 {
     $donation_id = Charitable_Donation_Helper::create_donation(array('campaigns' => array(array('campaign_id' => $this->campaign_1->ID, 'campaign_name' => 'Test Campaign', 'amount' => 10)), 'status' => 'charitable-pending'));
     $donation = new Charitable_Donation($donation_id);
     $donation->update_status('charitable-completed');
     $this->assertEquals('charitable-completed', $donation->get_status());
 }