Este hook se utiliza en index.php del plugin -> public function woocommerce_price_format:
public function woocommerce_price_format()
{
$currencies = $this->get_currencies();
$currency_pos = 'left';
if (isset($currencies[$this->current_currency]))
{
$currency_pos = $currencies[$this->current_currency]['position'];
}
$format = '%1$s%2$s';
switch ($currency_pos)
{
case 'left' :
$format = '%1$s%2$s';
break;
case 'right' :
$format = '%2$s%1$s';
break;
case 'left_space' :
$format = '%1$s %2$s';
break;
case 'right_space' :
$format = '%2$s %1$s';
break;
}
return apply_filters('woocs_price_format', $format, $currency_pos);
}
Por lo tanto, si tienes alguna idea sobre tu propio formato de precio, utiliza este hook con o sin condiciones según tu propia lógica:
add_filter('woocs_price_format', 'my_woocs_custom_format', 999, 2);
function my_woocs_custom_format($format, $currency_pos)
{
//do smth with $format here
return $format;
}