WC_Order::get_cancel_endpoint
Helper method to return the cancel endpoint.
Метод класса: WC_Order{}
Хуков нет.
Возвращает
string. the cancel endpoint; either the cart page or the home page.
Использование
$WC_Order = new WC_Order(); $WC_Order->get_cancel_endpoint();
Код WC_Order::get_cancel_endpoint() WC Order::get cancel endpoint WC 11.2.2
public function get_cancel_endpoint() {
$cancel_endpoint = wc_get_cart_url();
if ( ! $cancel_endpoint ) {
$cancel_endpoint = home_url();
}
if ( false === strpos( $cancel_endpoint, '?' ) ) {
$cancel_endpoint = trailingslashit( $cancel_endpoint );
}
return $cancel_endpoint;
}