Checkout::get_url()
Determine the Current checkout URL.
Return
(string)
Source
File: src/Tickets/Commerce/Checkout.php
public function get_url() {
$url = home_url( '/' );
$checkout_page = $this->get_page_id();
if ( is_numeric( $checkout_page ) ) {
$checkout_page = get_post( $checkout_page );
}
// Only modify the URL in case we have a checkout page setup in the settings.
if ( $checkout_page instanceof \WP_Post ) {
$url = get_the_permalink( $checkout_page );
}
/**
* Allows modifications to the checkout url for Tickets Commerce.
*
* @since 5.1.9
*
* @param string $url URL for the cart.
*/
return (string) apply_filters( 'tec_tickets_commerce_checkout_url', $url );
}
Changelog
| Version | Description |
|---|---|
| 5.1.9 | Introduced. |