mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
13 lines
289 B
JavaScript
13 lines
289 B
JavaScript
export const inputValue = (element) => {
|
|
const $el = jQuery(element);
|
|
|
|
if ($el.is(':checkbox') || $el.is(':radio')) {
|
|
if ($el.is(':checked')) {
|
|
return $el.val();
|
|
} else {
|
|
return null;
|
|
}
|
|
} else {
|
|
return $el.val();
|
|
}
|
|
}
|