woocommerce_cart_hash_key
Usage
add_filter( 'woocommerce_cart_hash_key', 'wp_kama_woocommerce_cart_hash_key_filter' );
/**
* Function for `woocommerce_cart_hash_key` filter-hook.
*
* @param $string
*
* @return
*/
function wp_kama_woocommerce_cart_hash_key_filter( $string ){
// filter...
return $string;
}
- $string
- -
Where the hook is called
woocommerce_cart_hash_key
woocommerce/includes/class-wc-frontend-scripts.php 732
'cart_hash_key' => apply_filters( 'woocommerce_cart_hash_key', 'wc_cart_hash_' . md5( get_current_blog_id() . '_' . get_site_url( get_current_blog_id(), '/' ) . get_template() ) ),