WOOCS - Cambiador de divisas de WooCommerce

Giftware - Tarjetas de regalo de WooCommerce

Enlace del complementohttps://makewebbetter.com/product/giftware-woocommerce-gift-cards/

  • En archivo \ wp-content \ plugins \ woocommerce-ultimate-gift-card \ function \ woocommerce-ultimate-gift-card-function.php agregar el siguiente código:
    if (class_exists ('WOOCS')) {global $ WOOCS; $ moneda = $ WOOCS-> moneda_actual; $ monedas = $ WOOCS-> get_currencies (); $ tasa = $ monedas [$ moneda] ['tasa']; if (isset ($ _ POST ['mwb_wgm_price']) AND floatval ($ _ POST ['mwb_wgm_price'])! = 0.0) {$ _POST ['mwb_wgm_price'] = floatval ($ _ POST ['mwb_wgm_price']) / $ tarifa; }}

  • $ tasa = 1; if (class_exists ('WOOCS')) {global $ WOOCS; // $ order_id = $ item-> get_order_id (); // $ order_currency = get_post_meta ($ order_id, '_order_currency', true); // woocs $ order_currency = $ WOOCS-> current_currency; $ monedas = $ WOOCS-> get_currencies (); $ tasa = $ monedas [$ order_currency] ['tasa']; }

  • $ total_discount = $ mwb_ugc_discount / $ tarifa;

  • $ total_discount = $ mwb_ugc_discount / $ tarifa;

  • if (class_exists ('WOOCS')) {global $ WOOCS; $ cur_cur = $ WOOCS-> moneda_actual; $ WOOCS-> reset_currency (); $ args ['monto'] = wc_price ($ mwb_wgm_common_arr ['cupónamont']); $ WOOCS-> set_currency ($ cur_cur); }

  • // woocs $ currency_symbol = get_woocommerce_currency_symbol (); if (class_exists ('WOOCS')) {global $ WOOCS; $ moneda = $ WOOCS-> default_currency; $ monedas = $ WOOCS-> get_currencies (); $ currency_symbol = $ monedas [$ moneda] ['símbolo']; } $ mensaje = str_replace ('COUPONAMOUNT', $ símbolo_moneda. $ monto_restante, $ mensaje);