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

Commit

Permalink
fixes #354 by including updates from woocommerce
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon007 committed Aug 20, 2018
1 parent edf0993 commit 42db06e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions public/js/Cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jQuery( function( $ ) {

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

try {
$supports_html5_storage = ( 'sessionStorage' in window && window.sessionStorage !== null );
Expand Down Expand Up @@ -99,7 +99,7 @@ jQuery( function( $ ) {
refresh_cart_fragment();
});

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

if ( prev_cart_hash === null || prev_cart_hash === undefined || prev_cart_hash === '' ) {
Expand Down
2 changes: 1 addition & 1 deletion public/js/Cart.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 42db06e

Please sign in to comment.