Replace wc_get_page_permalink( 'cart' ) with wc_get_cart_url()

This commit is contained in:
Marco Almeida 2019-08-29 08:46:25 +01:00 committed by GitHub
parent 4800fda66c
commit 80c2ecd692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1600,7 +1600,7 @@ class WC_Order extends WC_Abstract_Order {
* @return string the cancel endpoint; either the cart page or the home page.
*/
public function get_cancel_endpoint() {
$cancel_endpoint = wc_get_page_permalink( 'cart' );
$cancel_endpoint = wc_get_cart_url();
if ( ! $cancel_endpoint ) {
$cancel_endpoint = home_url();
}