WC_Abstract_Order::get_items_tax_classes()
Get all tax classes for items in the order.
Description Description
Return Return
(array)
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 ); }
Changelog Changelog
Version | Description |
---|---|
2.6.3 | Introduced. |