woocommerce_cart_total хук-фильтр . WC 3.2.0
Gets cart total after calculation.
Использование
add_filter( 'woocommerce_cart_total', 'filter_function_name_3176' ); function filter_function_name_3176( $context ){ // filter... return $context; }
- $context(строка)
- If the context is view, the value will be formatted for display. This keeps it compatible with pre-3.2 versions.
Список изменений
С версии 3.2.0 | Введена. |
Где вызывается хук
woocommerce_cart_total
woocommerce/includes/class-wc-cart.php 291
return 'view' === $context ? apply_filters( 'woocommerce_cart_total', wc_price( $total ) ) : $total;