WordPress at a glance
function is not described

WC_Tax::_insert_tax_rate() public WC 2.3.0

Insert a new tax rate.

Internal use only.

{} It's a method of the class: WC_Tax{}

Hooks from the method
Return

Int. tax rate id

Usage

$result = WC_Tax::_insert_tax_rate( $tax_rate );
$tax_rate(array) (required)
Tax rate to insert.

Changelog

Since 2.3.0 Introduced.

Code of WC_Tax::_insert_tax_rate() WC 5.3.0

<?php
public static function _insert_tax_rate( $tax_rate ) {
	global $wpdb;

	$wpdb->insert( $wpdb->prefix . 'woocommerce_tax_rates', self::prepare_tax_rate( $tax_rate ) );

	$tax_rate_id = $wpdb->insert_id;

	WC_Cache_Helper::invalidate_cache_group( 'taxes' );

	do_action( 'woocommerce_tax_rate_added', $tax_rate_id, $tax_rate );

	return $tax_rate_id;
}