Give_Donate_Form::get_sales PHP Method

get_sales() public method

Retrieve the sale count for the donation form
Since: 1.0
public get_sales ( ) : integer
return integer Donation form sale count.
    public function get_sales()
    {
        if (!isset($this->sales)) {
            if ('' == get_post_meta($this->ID, '_give_form_sales', true)) {
                add_post_meta($this->ID, '_give_form_sales', 0);
            }
            // End if
            $this->sales = get_post_meta($this->ID, '_give_form_sales', true);
            if ($this->sales < 0) {
                // Never let sales be less than zero
                $this->sales = 0;
            }
        }
        return $this->sales;
    }