Update monero-woocommerce-gateway.php

This commit is contained in:
SerHack 2021-07-17 10:45:48 +02:00 committed by GitHub
parent 6f8ed354e5
commit d3bebc45bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,6 +119,7 @@ function monero_init() {
// This filter will replace all prices with amount in Monero (live rates)
add_filter('wc_price', 'monero_live_price_format', 10, 3);
function monero_live_price_format($price_html, $price_float, $args) {
$price_float = wc_format_decimal($price_float);
if(!isset($args['currency']) || !$args['currency']) {
global $woocommerce;
$currency = strtoupper(get_woocommerce_currency());