Check for truthiness.
This avoids silliness where `’0’` evaluates to true. Just parse it as an int and evaluate that.
This commit is contained in:
parent
dff70a0509
commit
5e8ef8f18d
|
@ -82,11 +82,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="compound">
|
<td class="compound">
|
||||||
<input type="checkbox" class="checkbox" name="tax_rate_compound[{{ data.tax_rate_id }}]" <# if ( '1' === data.tax_rate_compound ) { #> checked="checked" <# } #> data-attribute="tax_rate_compound" />
|
<input type="checkbox" class="checkbox" name="tax_rate_compound[{{ data.tax_rate_id }}]" <# if ( parseInt( data.tax_rate_compound, 10 ) ) { #> checked="checked" <# } #> data-attribute="tax_rate_compound" />
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="apply_to_shipping">
|
<td class="apply_to_shipping">
|
||||||
<input type="checkbox" class="checkbox" name="tax_rate_shipping[{{ data.tax_rate_id }}]" <# if ( '1' === data.tax_rate_shipping ) { #> checked="checked" <# } #> data-attribute="tax_rate_shipping" />
|
<input type="checkbox" class="checkbox" name="tax_rate_shipping[{{ data.tax_rate_id }}]" <# if ( parseInt( data.tax_rate_shipping, 10 ) ) { #> checked="checked" <# } #> data-attribute="tax_rate_shipping" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue