WC_Abstract_Order::set_currency( string $value )

Set order_currency.


Description Description


Parameters Parameters

$value

(Required) Value to set.


Top ↑

Source Source

File: includes/abstracts/abstract-wc-order.php

	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() );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.