Fix checkbox export

This commit is contained in:
Mike Jolley 2012-12-03 11:02:29 +00:00
parent bcc60420da
commit 20a90cddf9
1 changed files with 15 additions and 7 deletions

View File

@ -184,14 +184,22 @@ function woocommerce_tax_rates_setting() {
jQuery('#rates tr:visible').each(function() { jQuery('#rates tr:visible').each(function() {
var row = ''; var row = '';
jQuery(this).find('td:not(.sort) input').each(function() { jQuery(this).find('td:not(.sort) input').each(function() {
if ( jQuery(this).is('.checkbox') ) {
if ( jQuery(this).is(':checked') ) {
val = 1;
} else {
val = 0;
}
} else {
var val = jQuery(this).val(); var val = jQuery(this).val();
if ( ! val ) if ( ! val )
val = jQuery(this).attr('placeholder'); val = jQuery(this).attr('placeholder');
}
if ( val == 'on' )
val = 1;
if ( val == 'off' )
val = 0;
row = row + val + ','; row = row + val + ',';
}); });