woocommerce_add_to_cart_hash
Использование
add_filter( 'woocommerce_add_to_cart_hash', 'wp_kama_woocommerce_add_to_cart_hash_filter', 10, 2 );
/**
* Function for `woocommerce_add_to_cart_hash` filter-hook.
*
* @param $array
* @param $string
*
* @return
*/
function wp_kama_woocommerce_add_to_cart_hash_filter( $array, $string ){
// filter...
return $array;
}
- $array
- -
- $string
- -
Где вызывается хук
woocommerce_add_to_cart_hash
woocommerce/includes/class-wc-cart.php 2382
$hash = apply_filters_deprecated( 'woocommerce_add_to_cart_hash', array( $hash, $cart_session ), '3.6.0', 'woocommerce_cart_hash' );