woocommerce_show_variation_price
Usage
add_filter( 'woocommerce_show_variation_price', 'wp_kama_woocommerce_show_variation_price_filter', 10, 3 );
/**
* Function for `woocommerce_show_variation_price` filter-hook.
*
* @param $condition
* @param $that
* @param $variation
*
* @return
*/
function wp_kama_woocommerce_show_variation_price_filter( $condition, $that, $variation ){
// filter...
return $condition;
}
- $condition
- -
- $that
- -
- $variation
- -
Where the hook is called
woocommerce_show_variation_price
woocommerce/includes/class-wc-product-variable.php 460
$show_variation_price = apply_filters( 'woocommerce_show_variation_price', $variation->get_price() === '' || $this->get_variation_sale_price( 'min' ) !== $this->get_variation_sale_price( 'max' ) || $this->get_variation_regular_price( 'min' ) !== $this->get_variation_regular_price( 'max' ), $this, $variation );