woocommerce_get_discounted_price filter-hook . WC 1.0
Allow plugins to filter this price like in the legacy cart class.
This is legacy and should probably be deprecated in the future. $item->object is the cart item object. $this->cart is the cart object.
Usage
add_filter( 'woocommerce_get_discounted_price', 'filter_function_name_936', 10, 3 ); function filter_function_name_936( $wc_remove_number_precision, $object, $cart ){ // filter... return $wc_remove_number_precision; }
- $wc_remove_number_precision
- -
- $object
- -
- $cart
- -
Where the hook is called
woocommerce_get_discounted_price
woocommerce/includes/class-wc-cart-totals.php 668
apply_filters( 'woocommerce_get_discounted_price', wc_remove_number_precision( $item->total ), $item->object, $this->cart )