WordPress at Your Fingertips
function is not described

WC_Abstract_Order::set_currency() public WC 1.0

Set order_currency.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->set_currency( $value );
$value(string) (required)
Value to set.

Code of WC_Abstract_Order::set_currency() WC 5.8.0

public function set_currency( $value ) {
	if ( $value && ! in_array( $value, array_keys( get_woocommerce_currencies() ), true ) ) {
		$this->error( 'order_invalid_currency', __( 'Invalid currency code', 'woocommerce' ) );
	}
	$this->set_prop( 'currency', $value ? $value : get_woocommerce_currency() );
}