Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin
UI::process_on_off()
Handles turning on/off the entire approved download directory system (vs enabling and disabling of individual rules).
Method of the class: UI{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->process_on_off( $action );
- $action(string) (required)
- Whether the feature should be turned on or off.
UI::process_on_off() UI::process on off code WC 8.7.0
private function process_on_off( string $action ) { switch ( $action ) { case 'turn-on': $this->register->set_mode( Register::MODE_ENABLED ); break; case 'turn-off': $this->register->set_mode( Register::MODE_DISABLED ); break; } }