WC_Order_Item_Fee::get_name()publicWC 1.0

Get order item name.

Method of the class: WC_Order_Item_Fee{}

No Hooks.

Return

String.

Usage

$WC_Order_Item_Fee = new WC_Order_Item_Fee();
$WC_Order_Item_Fee->get_name( $context );
$context(string)
What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'

WC_Order_Item_Fee::get_name() code WC 8.9.0

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