Checkout::is_current_page()
Determines if the current page is the Checkout page.
Return
(bool)
Source
File: src/Tickets/Commerce/Checkout.php
public function is_current_page() {
if ( is_admin() ) {
return false;
}
$current_page = get_queried_object_id();
$is_current_page = $this->get_page_id() === $current_page;
/**
* @todo determine hte usage of tribe_ticket_redirect_to
* $redirect = tribe_get_request_var( 'tribe_tickets_redirect_to', null );
*/
/**
* Allows modifications to the conditional of if we are in the checkout page.
*
* @since 5.1.9
*
* @param bool $is_current_page Are we in the current page for checkout.
*/
return tribe_is_truthy( apply_filters( 'tec_tickets_commerce_checkout_is_current_page', $is_current_page ) );
}
Changelog
| Version | Description |
|---|---|
| 5.1.9 | Introduced. |