WC_Order_Item_Tax::get_label( string $context = 'view' )

Get label.


Description Description


Parameters Parameters

$context

(Optional) What the value is for. Valid values are 'view' and 'edit'.

Default value: 'view'


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class-wc-order-item-tax.php

	public function get_label( $context = 'view' ) {
		$label = $this->get_prop( 'label', $context );
		if ( 'view' === $context ) {
			return $label ? $label : __( 'Tax', 'woocommerce' );
		} else {
			return $label;
		}
	}

Top ↑

User Contributed Notes User Contributed Notes

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