Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories
Register::set_mode()
Sets the mode. This effectively controls if approved directories are enforced or not.
May be one of: 'disabled', 'enabled', 'migrating'.
Метод класса: Register{}
Хуков нет.
Возвращает
true|false
.
Использование
$Register = new Register(); $Register->set_mode( $mode ): bool;
- $mode(строка) (обязательный)
- One of the values contained within self::MODES.
Код Register::set_mode() Register::set mode WC 7.5.1
public function set_mode( string $mode ): bool { if ( ! in_array( $mode, self::MODES, true ) ) { return false; } update_option( $this->mode_option, $mode ); return get_option( $this->mode_option ) === $mode; }