Cart::is_current_page()
If the current page is the cart page or not.
Return
(bool)
Source
File: src/Tickets/Commerce/Cart.php
public function is_current_page() {
$cart_mode = tribe_get_request_var( static::$url_query_arg, false );
if ( ! $this->is_available_mode( $cart_mode ) ) {
return false;
}
// When the current cart doesn't use this mode we fail the page check.
if ( $this->get_mode() !== $cart_mode ) {
return false;
}
return true;
}
Changelog
| Version | Description |
|---|---|
| 5.1.9 | Introduced. |