YourPlugins

Enable or disable price formatting

Part of Developer reference.

All docs

You can enable or disable price formatting by using the calculator formatting filter. This is useful when you need the raw numeric price without currency symbols or storefront formatting.

For new integrations, use yps_calcsheet_calculator_format_price. The legacy woo_price_calculator_format_price hook is still supported for backward compatibility, but it should not be used in new code.

Return true to enable formatting or false to keep the raw value.

function custom_yps_calcsheet_calculator_format_price($formatPrice, $price, $productId, $calculatorId, $data){
    return true; // or false
}
add_filter('yps_calcsheet_calculator_format_price', 'custom_yps_calcsheet_calculator_format_price', 10, 5);