WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_Request::round() protected WC 1.0

Round prices.

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

No Hooks.

Return

double.

Usage

// protected - for code of main (parent) or child class
$result = $this->round( $price, $order );
$price(double) (required)
Price to round.
$order(WC_Order) (required)
Order object.

Code of WC_Gateway_Paypal_Request::round() WC 5.6.0

protected function round( $price, $order ) {
	$precision = 2;

	if ( ! $this->currency_has_decimals( $order->get_currency() ) ) {
		$precision = 0;
	}

	return NumberUtil::round( $price, $precision );
}