Content of the page

Yandex Money Gateway for WooCommerce (by Dayes)

Content of the article

//in file \woocommerce-yandex-money.php add next code
if (class_exists('WOOCS')) {
    global $WOOCS;
    $currencies = $WOOCS->get_currencies();
    if (isset($currencies['RUB'])) {
        $rub_rate = $currencies['RUB']['rate'];
        $curr_rate = $currencies[$WOOCS->current_currency]['rate'];
        $yandex_args['sum'] = number_format(($order->order_total / $curr_rate) * $rub_rate, 2, '.', '');
    }
}

Faster WordPress Hosting