WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_Request::get_line_item_args_single_item() protected WC 1.0

Get line item args for paypal request as a single line item.

{} It's a method of the class: WC_Gateway_Paypal_Request{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_line_item_args_single_item( $order );
$order(WC_Order) (required)
Order object.

Code of WC_Gateway_Paypal_Request::get_line_item_args_single_item() WC 5.6.0

protected function get_line_item_args_single_item( $order ) {
	$this->delete_line_items();

	$all_items_name = $this->get_order_item_names( $order );
	$this->add_line_item( $all_items_name ? $all_items_name : __( 'Order', 'woocommerce' ), 1, $this->number_format( $order->get_total() - $this->round( $order->get_shipping_total() + $order->get_shipping_tax(), $order ), $order ), $order->get_order_number() );
	$line_item_args = $this->get_shipping_cost_line_item( $order, true );

	return array_merge( $line_item_args, $this->get_line_items() );
}