WC_Abstract_Order::get_items_tax_classes()

Get all tax classes for items in the order.


Description Description


Return Return

(array)


Top ↑

Source Source

File: includes/abstracts/abstract-wc-order.php

	public function get_items_tax_classes() {
		$found_tax_classes = array();

		foreach ( $this->get_items() as $item ) {
			if ( is_callable( array( $item, 'get_tax_status' ) ) && in_array( $item->get_tax_status(), array( 'taxable', 'shipping' ), true ) ) {
				$found_tax_classes[] = $item->get_tax_class();
			}
		}

		return array_unique( $found_tax_classes );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.3 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.