| Server IP : 104.21.25.182 / Your IP : 216.73.217.123 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/nobi37te/public_html/wp-content/plugins/woocommerce-multi-currency/js/ |
Upload File : |
jQuery(document).ready(function ($) {
'use strict';
$(document.body).on('change', '#woocommerce_free_shipping_requires', function () {
wcFreeShippingShowHideMinAmountField(this);
}).trigger('change');
$(document.body).on('wc_backbone_modal_loaded', function (evt, target) {
if ('wc-modal-shipping-method-settings' === target) {
wcFreeShippingShowHideMinAmountField($('#wc-backbone-modal-dialog #woocommerce_free_shipping_requires', evt.currentTarget));
}
});
/**
* Show/hide fixed min_amount based on the free shipping requires option
*
* @param ele
*/
function wcFreeShippingShowHideMinAmountField(ele) {
let $requires = $(ele);
let $form = $requires.closest('form');
if ('coupon' === $requires.val() || '' === $requires.val()) {
for (let i in woocommerce_multi_currency_admin_shipping.currencies) {
$form.find(`#woocommerce_free_shipping_min_amount_${woocommerce_multi_currency_admin_shipping.currencies[i]}`, $form).closest('tr').hide();
}
} else {
for (let i in woocommerce_multi_currency_admin_shipping.currencies) {
$form.find(`#woocommerce_free_shipping_min_amount_${woocommerce_multi_currency_admin_shipping.currencies[i]}`).closest('tr').show();
}
}
}
});