FOX - Currency Switcher for WooCommerce

How to round prices to 500

Some currencies have no meaningful small units — a price of 12,473 reads as noise where every shop quotes round hundreds. Converted prices need rounding to a larger step than cents.

Round every converted price to the nearest 500 with the woocs_raw_woocommerce_price filter, in the functions.php of your theme:

add_filter('woocs_raw_woocommerce_price', function ($price) {
    global $WOOCS;

    if ($WOOCS->current_currency === $WOOCS->default_currency) {
        return $price;   // leave the base currency alone
    }

    return ceil($price / 500) * 500;
});

The base-currency check matters: without it your own prices get rounded too, and the amounts you typed in stop being the amounts you charge.

Variable products carry a price range that is calculated separately — to round that as well, add the same logic on woocs_woocommerce_variation_prices. For smaller steps see rounding to whole units, 50 cents or 99 cents.