woocommerce_show_variation_price

woocommerce_show_variation_price

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_show_variation_price') is found 1 times:

  • /includes/class-wc-product-variable.php line 380
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    if ( ! $variation instanceof WC_Product_Variation ) {
        return false;
    }
    // See if prices should be shown for each variation after selection.
    $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 );
     
    return apply_filters(
        'woocommerce_available_variation',
        array(
            'attributes'            => $variation->get_variation_attributes(),
            'availability_html'     => wc_get_stock_html( $variation ),