WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
фильтр не описан

woocommerce_cart_(_FUNCTION__) хук-фильтр . WC 3.2.0

Gets cart total. This is the total of items in the cart, but after discounts. Subtotal is before discounts.

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

add_filter( 'woocommerce_cart_(_FUNCTION__)', 'filter_function_name_5098' );
function filter_function_name_5098( $totals_var ){
	// filter...

	return $totals_var;
}
$totals_var
-

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

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

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

WC_Cart::get_cart_contents_total()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_subtotal()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_subtotal_tax()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_discount_total()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_discount_tax()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_shipping_total()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_shipping_tax()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_cart_contents_tax()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_total()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_total_tax()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_fee_total()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_fee_tax()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_shipping_taxes()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_cart_contents_taxes()
woocommerce_cart_(_FUNCTION__)
WC_Cart::get_fee_taxes()
woocommerce_cart_(_FUNCTION__)
WC_Cart::display_prices_including_tax()
woocommerce_cart_(_FUNCTION__)
woocommerce/includes/class-wc-cart.php 269
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_total' ) );
woocommerce/includes/class-wc-cart.php 209
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'subtotal' ) );
woocommerce/includes/class-wc-cart.php 219
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'subtotal_tax' ) );
woocommerce/includes/class-wc-cart.php 229
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'discount_total' ) );
woocommerce/includes/class-wc-cart.php 239
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'discount_tax' ) );
woocommerce/includes/class-wc-cart.php 249
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'shipping_total' ) );
woocommerce/includes/class-wc-cart.php 259
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'shipping_tax' ) );
woocommerce/includes/class-wc-cart.php 279
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_tax' ) );
woocommerce/includes/class-wc-cart.php 290
$total = apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'total' ) );
woocommerce/includes/class-wc-cart.php 301
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'total_tax' ) );
woocommerce/includes/class-wc-cart.php 311
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'fee_total' ) );
woocommerce/includes/class-wc-cart.php 321
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'fee_tax' ) );
woocommerce/includes/class-wc-cart.php 330
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'shipping_taxes' ) );
woocommerce/includes/class-wc-cart.php 339
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_taxes' ) );
woocommerce/includes/class-wc-cart.php 348
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'fee_taxes' ) );
woocommerce/includes/class-wc-cart.php 358
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, 'incl' === $this->get_tax_price_display_mode() );

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

woocommerce/includes/class-wc-cart.php 49
add_action( 'woocommerce_cart_emptied', array( $this, 'destroy_cart_session' ) );
woocommerce/includes/class-wc-cart.php 51
add_action( 'woocommerce_cart_loaded_from_session', array( $this, 'set_session' ) );
woocommerce/includes/class-wc-cart.php 56
add_action( 'woocommerce_cart_item_removed', array( $this, 'persistent_cart_update' ) );
woocommerce/includes/class-wc-cart.php 57
add_action( 'woocommerce_cart_item_restored', array( $this, 'persistent_cart_update' ) );
woocommerce/includes/class-wc-cart.php 58
add_action( 'woocommerce_cart_item_set_quantity', array( $this, 'persistent_cart_update' ) );
woocommerce/includes/class-wc-cart.php 108
add_action( 'woocommerce_cart_item_removed', array( $this, 'calculate_totals' ), 20, 0 );
woocommerce/includes/class-wc-cart.php 109
add_action( 'woocommerce_cart_item_restored', array( $this, 'calculate_totals' ), 20, 0 );
woocommerce/includes/class-wc-cart.php 238
add_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
woocommerce/includes/class-wc-cart.php 239
add_action( 'woocommerce_cart_collaterals', 'woocommerce_cart_totals', 10 );
woocommerce/includes/class-wc-cart.php 242
add_action( 'woocommerce_cart_is_empty', 'wc_empty_cart_message', 10 );
woocommerce/includes/class-wc-cart.php 303
add_action( 'woocommerce_cart_is_empty', 'woocommerce_output_all_notices', 5 );