WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi

Formatters::__get() public WC 1.0

Get a new instance of a formatter class.

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

No Hooks.

Return

FormatterInterface. Formatter class instance.

Usage

$Formatters = new Formatters();
$Formatters->__get( $name );
$name(string) (required)
Name of the formatter.

Code of Formatters::__get() WC 5.8.0

public function __get( $name ) {
	if ( ! isset( $this->formatters[ $name ] ) ) {
		if ( defined( 'WP_DEBUG' ) && WP_DEBUG && current_user_can( 'manage_woocommerce' ) ) {
			throw new Exception( $name . ' formatter does not exist' );
		}
		return new DefaultFormatter();
	}
	return $this->formatters[ $name ];
}