WC_Gateway_Paypal_Request::currency_has_decimals()protectedWC 1.0

Check if currency has decimals.

Method of the class: WC_Gateway_Paypal_Request{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->currency_has_decimals( $currency );
$currency(string) (required)
Currency to check.

WC_Gateway_Paypal_Request::currency_has_decimals() code WC 8.7.0

protected function currency_has_decimals( $currency ) {
	if ( in_array( $currency, array( 'HUF', 'JPY', 'TWD' ), true ) ) {
		return false;
	}

	return true;
}