Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::get_mode()publicWC 1.0

Returns a string indicating the current mode.

May be one of: 'disabled', 'enabled', 'migrating'.

Method of the class: Register{}

No Hooks.

Return

String.

Usage

$Register = new Register();
$Register->get_mode(): string;

Register::get_mode() code WC 7.1.0

public function get_mode(): string {
	$current_mode = get_option( $this->mode_option, self::MODE_DISABLED );
	return in_array( $current_mode, self::MODES, true ) ? $current_mode : self::MODE_DISABLED;
}