From d2040eca4ddadf4577d17e9b129d12702dcb2964 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 11 Feb 2015 23:25:31 +0000 Subject: [PATCH] When updating shipping in cart, keep shipping calculator in DOM. --- includes/wc-conditional-functions.php | 2 +- readme.txt | 1 + templates/cart/shipping-calculator.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/wc-conditional-functions.php b/includes/wc-conditional-functions.php index 45dbc6648fc..fb42cad99a2 100644 --- a/includes/wc-conditional-functions.php +++ b/includes/wc-conditional-functions.php @@ -100,7 +100,7 @@ if ( ! function_exists( 'is_cart' ) ) { * @return bool */ function is_cart() { - return is_page( wc_get_page_id( 'cart' ) ); + return is_page( wc_get_page_id( 'cart' ) ) || defined( 'WOOCOMMERCE_CART' ); } } diff --git a/readme.txt b/readme.txt index 5b8fd3a9889..6c9fb490725 100644 --- a/readme.txt +++ b/readme.txt @@ -142,6 +142,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Fix - Pass correct shipping cost to PayPal. * Fix - Flat rate extra costs when costs are an array. * Fix - When ratings are required for reviews, ensure validation is performed if the rating element is removed from DOM. +* Fix - When updating shipping in cart, keep shipping calculator in DOM. = 2.3.1 - 11/02/2015 = * Fix - When the geolocation database cannot download, ensure the correct method is used to log the error. diff --git a/templates/cart/shipping-calculator.php b/templates/cart/shipping-calculator.php index 995cd76eeca..5a03d70aa51 100644 --- a/templates/cart/shipping-calculator.php +++ b/templates/cart/shipping-calculator.php @@ -23,7 +23,7 @@ if ( get_option( 'woocommerce_enable_shipping_calc' ) === 'no' || ! WC()->cart->

-
+