MainWP Community

Replace the dash with a slash on product prices range if using WooCommerce

Replace the dash with a slash on product prices range if using WooCommerce on your child site.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'woocommerce_format_price_range', 'custom_format_price_range', 10, 3 );
function custom_format_price_range( $price ) {
    $price = str_replace('–', '/', $price);
    return $price;
}
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.