Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin
UI::process_all_actions
Handles the enable/disable-all actions.
Method of the class: UI{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->process_all_actions( $action );
- $action(string) (required)
- The action to be applied.
UI::process_all_actions() UI::process all actions code WC 10.9.4
private function process_all_actions( string $action ) {
$register = wc_get_container()->get( Register::class );
$redirect = $this->table->get_base_url();
switch ( $action ) {
case 'enable-all':
$redirect = add_query_arg( 'enabled-all', (int) $register->enable_all(), $redirect );
break;
case 'disable-all':
$redirect = add_query_arg( 'disabled-all', (int) $register->disable_all(), $redirect );
break;
}
wp_safe_redirect( $redirect );
exit;
}