b0y-101 Mini Shell


Current Path : E:/wordpress/wp-content/plugins/woocommerce-multilingual/res/js/
File Upload :
Current File : E:/wordpress/wp-content/plugins/woocommerce-multilingual/res/js/admin-currency-selector.js

jQuery(function () {
    var dashboard_dropdown = jQuery('#dropdown_dashboard_currency').clone();
    jQuery('#dropdown_dashboard_currency').remove();
    dashboard_dropdown.insertBefore('.sales-this-month a').show();
    jQuery('#woocommerce_dashboard_status .wc_status_list li').css('display', 'table');
});

jQuery(document).on('change', '#dropdown_dashboard_currency', function () {
    jQuery.ajax({
        url: ajaxurl,
        type: 'post',
        data: {
            action: 'wcml_dashboard_set_currency',
            currency: jQuery('#dropdown_dashboard_currency').val(),
            wcml_nonce: wcml_admin_currency_selector.nonce
        },
        error: function(xhr, status, error){
            alert(xhr.responseJSON.data);
        },
        success: function (response) {
            if ( response.success ) {
                window.location = window.location.href;
            }
        }
    })
});

Copyright © 2019 by b0y-101