Tribe__Tickets__Commerce__PayPal__Order::get_line_total()
Returns the line total for this Order.
Note that the line total might be non-zero when the ticket revenue is, instead, zero (e.g. pending orders).
Return
(int|float)
Source
File: src/Tribe/Commerce/PayPal/Order.php
public function get_line_total() {
$statuses = array(
Tribe__Tickets__Commerce__PayPal__Stati::$completed,
Tribe__Tickets__Commerce__PayPal__Stati::$pending,
Tribe__Tickets__Commerce__PayPal__Stati::$denied,
);
/**
* Filters the Order statuses that should display a non-zero line total.
*
* @since 4.7
*
* @param array $statuses
* @param Tribe__Tickets__Commerce__PayPal__Order $this
*/
$statuses = apply_filters( 'tribe_tickets_tpp_order_line_total_statuses', $statuses, $this );
if ( in_array( $this->status, $statuses ) ) {
return ! empty( $this->meta['mc_gross'] ) ? (float) $this->meta['mc_gross'] : 0;
}
return 0;
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |