@@ 299-301 (lines=3) @@ | ||
296 | ||
297 | $tax_data = $this->format_taxes_to_items( array( $args[0] ) ); |
|
298 | ||
299 | if ( empty( $tax_data ) ) { |
|
300 | throw new WC_CLI_Exception( 'woocommerce_cli_invalid_tax_rate', sprintf( __( 'Invalid tax rate ID: %s', 'woocommerce' ), $args[0] ) ); |
|
301 | } |
|
302 | ||
303 | $tax_data = apply_filters( 'woocommerce_cli_get_tax_rate', $tax_data[0] ); |
|
304 | ||
@@ 494-496 (lines=3) @@ | ||
491 | // Get current tax rate data |
|
492 | $tax_data = $this->format_taxes_to_items( array( $args[0] ) ); |
|
493 | ||
494 | if ( empty( $tax_data ) ) { |
|
495 | throw new WC_CLI_Exception( 'woocommerce_cli_invalid_tax_rate', sprintf( __( 'Invalid tax rate ID: %s', 'woocommerce' ), $args[0] ) ); |
|
496 | } |
|
497 | ||
498 | $current_data = $tax_data[0]; |
|
499 | $id = $current_data['id']; |