wc_get_product_tax_class_options()WC 3.0.0

Get product tax class options.

No Hooks.

Return

Array.

Usage

wc_get_product_tax_class_options();

Changelog

Since 3.0.0 Introduced.

wc_get_product_tax_class_options() code WC 8.7.0

function wc_get_product_tax_class_options() {
	$tax_classes           = WC_Tax::get_tax_classes();
	$tax_class_options     = array();
	$tax_class_options[''] = __( 'Standard', 'woocommerce' );

	if ( ! empty( $tax_classes ) ) {
		foreach ( $tax_classes as $class ) {
			$tax_class_options[ sanitize_title( $class ) ] = $class;
		}
	}
	return $tax_class_options;
}