WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_Request::get_paypal_args() protected WC 1.0

Get PayPal Args for passing to PP.

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

Return

Array.

Usage

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

Code of WC_Gateway_Paypal_Request::get_paypal_args() WC 5.6.0

protected function get_paypal_args( $order ) {
	WC_Gateway_Paypal::log( 'Generating payment form for order ' . $order->get_order_number() . '. Notify URL: ' . $this->notify_url );

	$force_one_line_item = apply_filters( 'woocommerce_paypal_force_one_line_item', false, $order );

	if ( ( wc_tax_enabled() && wc_prices_include_tax() ) || ! $this->line_items_valid( $order ) ) {
		$force_one_line_item = true;
	}

	$paypal_args = apply_filters(
		'woocommerce_paypal_args',
		array_merge(
			$this->get_transaction_args( $order ),
			$this->get_line_item_args( $order, $force_one_line_item )
		),
		$order
	);

	return $this->fix_request_length( $order, $paypal_args );
}