From 0588c9fe1c40da48cf1eb88086f0bf0453e8e419 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Tue, 14 Jul 2015 17:49:29 +0530 Subject: [PATCH] get_permalink to wc_get_page_permalink changed get_permalink to wc_get_page_permalink on class-wc-cart.php --- includes/class-wc-cart.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index c3386cbbdf5..9371ab4c9ca 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -651,8 +651,8 @@ class WC_Cart { * @return string url to page */ public function get_remove_url( $cart_item_key ) { - $cart_page_id = wc_get_page_id('cart'); - return apply_filters( 'woocommerce_get_remove_url', $cart_page_id ? wp_nonce_url( add_query_arg( 'remove_item', $cart_item_key, get_permalink( $cart_page_id ) ), 'woocommerce-cart' ) : '' ); + $cart_page_url = wc_get_page_permalink('cart'); + return apply_filters( 'woocommerce_get_remove_url', $cart_page_url ? wp_nonce_url( add_query_arg( 'remove_item', $cart_item_key, $cart_page_url ), 'woocommerce-cart' ) : '' ); } /** @@ -662,13 +662,13 @@ class WC_Cart { * @return string url to page */ public function get_undo_url( $cart_item_key ) { - $cart_page_id = wc_get_page_id( 'cart' ); + $cart_page_url = wc_get_page_permalink( 'cart' ); $query_args = array( 'undo_item' => $cart_item_key, ); - return apply_filters( 'woocommerce_get_undo_url', $cart_page_id ? wp_nonce_url( add_query_arg( $query_args, get_permalink( $cart_page_id ) ), 'woocommerce-cart' ) : '' ); + return apply_filters( 'woocommerce_get_undo_url', $cart_page_url ? wp_nonce_url( add_query_arg( $query_args, $cart_page_url ), 'woocommerce-cart' ) : '' ); } /**