Merge pull request #16548 from woocommerce/fix/16524

Swap to text input for tax rate %, and format as decimal.
This commit is contained in:
Claudio Sanches 2017-08-21 12:32:53 -03:00 committed by GitHub
commit 1cfdaaa108
2 changed files with 4 additions and 1 deletions

View File

@ -68,7 +68,7 @@ if ( ! defined( 'ABSPATH' ) ) {
</td>
<td class="rate">
<input type="number" step="any" min="0" value="{{ data.tax_rate }}" placeholder="0" name="tax_rate[{{ data.tax_rate_id }}]" data-attribute="tax_rate" />
<input type="text" value="{{ data.tax_rate }}" placeholder="0" name="tax_rate[{{ data.tax_rate_id }}]" data-attribute="tax_rate" />
</td>
<td class="name">

View File

@ -2209,6 +2209,9 @@ class WC_AJAX {
'tax_rate_order' => 1,
) );
// Format the rate.
$tax_rate['tax_rate'] = wc_format_decimal( $tax_rate['tax_rate'] );
if ( isset( $data['newRow'] ) ) {
// Hurrah, shiny and new!
$tax_rate['tax_rate_class'] = $current_class;