woocommerce_cart_contents_changed хук-фильтр . WC 1.0
If it's not empty, it's been already populated by the loop above.
Использование
add_filter( 'woocommerce_cart_contents_changed', 'filter_function_name_6711' ); function filter_function_name_6711( $cart_contents ){ // filter... return $cart_contents; }
- $cart_contents
- -
Где вызывается хук
woocommerce_cart_contents_changed
woocommerce_cart_contents_changed
woocommerce/includes/class-wc-cart-session.php 170
$this->cart->set_cart_contents( apply_filters( 'woocommerce_cart_contents_changed', $cart_contents ) );
woocommerce/includes/class-wc-cart.php 1245
$this->cart_contents = apply_filters( 'woocommerce_cart_contents_changed', $this->cart_contents );
woocommerce/packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php 88
$cart->cart_contents = apply_filters( 'woocommerce_cart_contents_changed', $cart->cart_contents );