WC_Order::get_cancel_endpoint()
Helper method to return the cancel endpoint.
Description Description
Return Return
(string) the cancel endpoint; either the cart page or the home page.
Source Source
File: includes/class-wc-order.php
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; }