woocommerce_variation_prices_array

woocommerce_variation_prices_array

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

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_variation_prices_array') is found 1 times:

  • /includes/data-stores/class-wc-product-variable-data-store-cpt.php line 385
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
            $prices_array['price'][ $variation_id ]         = wc_format_decimal( $price, wc_get_price_decimals() );
            $prices_array['regular_price'][ $variation_id ] = wc_format_decimal( $regular_price, wc_get_price_decimals() );
            $prices_array['sale_price'][ $variation_id ]    = wc_format_decimal( $sale_price, wc_get_price_decimals() );
     
            $prices_array = apply_filters( 'woocommerce_variation_prices_array', $prices_array, $variation, $for_display );
        }
    }
     
    // Add all pricing data to the transient array.
    foreach ( $prices_array as $key => $values ) {
        $transient_cached_prices_array[ $price_hash ][ $key ] = $values;