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_1604' );
function filter_function_name_1604( $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 267
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_total' ) );
woocommerce/includes/class-wc-cart.php 207
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'subtotal' ) );
woocommerce/includes/class-wc-cart.php 217
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'subtotal_tax' ) );
woocommerce/includes/class-wc-cart.php 227
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'discount_total' ) );
woocommerce/includes/class-wc-cart.php 237
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'discount_tax' ) );
woocommerce/includes/class-wc-cart.php 247
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'shipping_total' ) );
woocommerce/includes/class-wc-cart.php 257
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'shipping_tax' ) );
woocommerce/includes/class-wc-cart.php 277
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_tax' ) );
woocommerce/includes/class-wc-cart.php 288
$total = apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'total' ) );
woocommerce/includes/class-wc-cart.php 299
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'total_tax' ) );
woocommerce/includes/class-wc-cart.php 309
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'fee_total' ) );
woocommerce/includes/class-wc-cart.php 319
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'fee_tax' ) );
woocommerce/includes/class-wc-cart.php 328
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'shipping_taxes' ) );
woocommerce/includes/class-wc-cart.php 337
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_taxes' ) );
woocommerce/includes/class-wc-cart.php 346
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'fee_taxes' ) );
woocommerce/includes/class-wc-cart.php 356
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, 'incl' === $this->get_tax_price_display_mode() );

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

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