Skip to content
This repository was archived by the owner on Mar 17, 2022. It is now read-only.

Commit 42db06e

Browse files
committed
fixes #354 by including updates from woocommerce
1 parent edf0993 commit 42db06e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

public/js/Cart.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jQuery( function( $ ) {
2222

2323
/* Storage Handling */
2424
var $supports_html5_storage;
25-
var cart_hash_key = wc_cart_fragments_params.ajax_url.toString() + '-wc_cart_hash';
25+
var cart_hash_key = wc_cart_fragments_params.cart_hash_key;
2626

2727
try {
2828
$supports_html5_storage = ( 'sessionStorage' in window && window.sessionStorage !== null );
@@ -99,7 +99,7 @@ jQuery( function( $ ) {
9999
refresh_cart_fragment();
100100
});
101101

102-
$( document.body ).on( 'added_to_cart', function( event, fragments, cart_hash ) {
102+
$( document.body ).on( 'added_to_cart removed_from_cart', function( event, fragments, cart_hash ) {
103103
var prev_cart_hash = sessionStorage.getItem( cart_hash_key );
104104

105105
if ( prev_cart_hash === null || prev_cart_hash === undefined || prev_cart_hash === '' ) {

public/js/Cart.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)