LLMS_Transaction::can_be_refunded()

Determine if the transaction can be refunded Status must not be “failed” and total refunded amount must be less than order amount


Description Description


Return Return

(boolean)


Top ↑

Source Source

File: includes/models/model.llms.transaction.php

	public function can_be_refunded() {
		$status = $this->get( 'status' );
		// can't refund failed or pending transactions
		if ( 'llms-txn-failed' === $status || 'llms-txn-pending' === $status ) {
			return false;
		} // End if().
		elseif ( $this->get_refundable_amount( array(), 'float' ) <= 0 ) {
			return false;
		}
		return true;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.





Permalink: