WC_Gateway_Paypal_Request::round( double $price, WC_Order $order )
Round prices.
Description Description
Parameters Parameters
- $price
-
(Required) Price to round.
- $order
-
(Required) Order object.
Return Return
(double)
Source Source
File: includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php
protected function round( $price, $order ) { $precision = 2; if ( ! $this->currency_has_decimals( $order->get_currency() ) ) { $precision = 0; } return round( $price, $precision ); }