Inline documentation explaining some functionality.

This commit is contained in:
George Stephanis 2015-08-07 15:34:45 -04:00
parent 55e0bb6302
commit 846dcb95c6
1 changed files with 3 additions and 0 deletions

View File

@ -116,6 +116,9 @@
return false; return false;
}); });
/**
* Postcode and city don't have `name` values by default. They're only created if the contents changes, to save on database queries (I think)
*/
$('.wc_tax_rates td.postcode, .wc_tax_rates td.city').find('input').change(function() { $('.wc_tax_rates td.postcode, .wc_tax_rates td.city').find('input').change(function() {
$(this).attr( 'name', $(this).attr( 'data-name' ) ); $(this).attr( 'name', $(this).attr( 'data-name' ) );
}); });