Last active
October 1, 2018 18:18
-
-
Save cccamuseme/5efe89f6d266125416a33d2063b4cec2 to your computer and use it in GitHub Desktop.
Woocommerce shipping dropdown options. additional fields .show .hide based on selection.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function ($) { | |
$("#additional_Shipping_Method").change(function() { | |
var val = $(this).val(); | |
if (val === "third-party") { | |
$("#additional_Carrier_Name_field").show(); | |
$("#additional_Carrier_Account_Number_field").show(); | |
} | |
else if (val === "collect") { | |
$("#additional_Carrier_Name_field").show(); | |
$("#additional_Carrier_Account_Number_field").show(); | |
} | |
else if (val === "prepay-add-will-advise-via-email") { | |
$("#additional_Carrier_Name_field").hide(); | |
$("#additional_Carrier_Account_Number_field").hide(); | |
} else { | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment