woocommerce_get_cart_contents хук-фильтрWC 3.2.0

Gets cart contents.

Использование

add_filter( 'woocommerce_get_cart_contents', 'wp_kama_woocommerce_get_cart_contents_filter' );

/**
 * Function for `woocommerce_get_cart_contents` filter-hook.
 * 
 * @param  $condition 
 *
 * @return 
 */
function wp_kama_woocommerce_get_cart_contents_filter( $condition ){

	// filter...
	return $condition;
}
$condition
-

Список изменений

С версии 3.2.0 Введена.

Где вызывается хук

WC_Cart::get_cart_contents()
woocommerce_get_cart_contents
woocommerce/includes/class-wc-cart.php 142
return apply_filters( 'woocommerce_get_cart_contents', (array) $this->cart_contents );

Где используется хук в WooCommerce

Использование не найдено.