Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ChrisFlannagan/003d3efa9cb2aec88b0e54b654e20c77 to your computer and use it in GitHub Desktop.
Save ChrisFlannagan/003d3efa9cb2aec88b0e54b654e20c77 to your computer and use it in GitHub Desktop.
<?php
/**
* Clear cache on add to cart so the cart counter in header is updated
*/
add_action( 'woocommerce_add_to_cart', 'my_custom_clear_cache', 10, 1 );
function my_custom_clear_cache( ) {
comet_cache::clear();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment