Tribe__Tickets_Plus__Commerce__WooCommerce__Orders__Refunded::get_count( int $ticket_id )
Get refunds count. If there’s something in cache, then the cached number, if not run real_get_count().
Contents
Parameters
- $ticket_id
-
(int) (Required) The Ticket ID.
Return
(int|null)
Source
File: src/Tribe/Commerce/WooCommerce/Orders/Refunded.php
public function get_count( $ticket_id ) {
if ( ! is_numeric( $ticket_id ) ) {
return;
}
$ticket_post = get_post( $ticket_id );
if ( empty( $ticket_post ) ) {
return;
}
if ( false === $this->count_cache ) {
$this->count_cache = $this->real_get_count( $ticket_id );
}
return $this->count_cache;
}
Changelog
| Version | Description |
|---|---|
| Updated caching logic. | Updated caching logic. |
| 4.7.3 | Introduced. |