Merge pull request #17620 from woocommerce/fix/17583

calculate_totals totals running too often
This commit is contained in:
Claudiu Lodromanean 2017-11-07 13:05:42 -08:00 committed by GitHub
commit a8feba3162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ final class WC_Cart_Session {
do_action( 'woocommerce_cart_loaded_from_session', $this->cart );
if ( $update_cart_session || is_null( $totals ) ) {
if ( $update_cart_session || is_null( WC()->session->get( 'cart_totals', null ) ) ) {
WC()->session->set( 'cart', $this->get_cart_for_session() );
$this->cart->calculate_totals();
}