FOX - Conmutador de moneda WooCommerce profesional

Cómo redondear el precio a 99 centavos

Abra su tema de wp actual functions.php archivo y suelte el siguiente código:

add_filter ('woocs_raw_woocommerce_price', function ($ precio) {ronda de retorno ($ precio + 0.01) - 0.01;});

También puede hacer manipulaciones para monedas seleccionadas usando IF:

add_filter('woocs_raw_woocommerce_price', function ($precio) { global $WOOCS; if ($WOOCS->current_currency === 'USD') { $price = round($price + 0.01) - 0.01; } /* if ($ WOOCS->current_currency !== 'EUR') { $precio = round($precio + 0.01) - 0.01; } * */ return $precio; });

Lea también: https://currency-switcher.com/hook/woocs_raw_woocommerce_price/

Origen: https://wordpress.org/support/topic/round-price-xx-99/