WordPress at Your Fingertips
function is not described

WC_REST_Data_Currencies_Controller::get_currency() public WC 1.0

Get currency information.

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

No Hooks.

Return

Array|Mixed. Response data, ready for insertion into collection data.

Usage

$WC_REST_Data_Currencies_Controller = new WC_REST_Data_Currencies_Controller();
$WC_REST_Data_Currencies_Controller->get_currency( $code, $request );
$code(string) (required)
Currency code.
$request(WP_REST_Request) (required)
Request data.

Code of WC_REST_Data_Currencies_Controller::get_currency() WC 5.9.0

public function get_currency( $code, $request ) {
	$currencies = get_woocommerce_currencies();
	$data       = array();

	if ( ! array_key_exists( $code, $currencies ) ) {
		return false;
	}

	$currency = array(
		'code'   => $code,
		'name'   => $currencies[ $code ],
		'symbol' => get_woocommerce_currency_symbol( $code ),
	);

	return $currency;
}