woocommerce_variation_prices хук-фильтрWC 1.0

Give plugins one last chance to filter the variation prices array which has been generated and store locally to the class. This value may differ from the transient cache. It is filtered once before storing locally.

Использование

add_filter( 'woocommerce_variation_prices', 'wp_kama_woocommerce_variation_prices_filter', 10, 3 );

/**
 * Function for `woocommerce_variation_prices` filter-hook.
 * 
 * @param  $price_hash ] 
 * @param  $product      
 * @param  $for_display  
 *
 * @return 
 */
function wp_kama_woocommerce_variation_prices_filter( $price_hash ], $product, $for_display ){

	// filter...
	return $price_hash ];
}
$price_hash ]
-
$product
-
$for_display
-

Где вызывается хук

WC_Product_Variable_Data_Store_CPT::read_price_data()
woocommerce_variation_prices
woocommerce/includes/data-stores/class-wc-product-variable-data-store-cpt.php 385
$this->prices_array[ $price_hash ] = apply_filters( 'woocommerce_variation_prices', $transient_cached_prices_array[ $price_hash ], $product, $for_display );

Где используется хук в WooCommerce

Использование не найдено.