Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin

UI::process_actions()privateWC 1.0

Process bulk and single-row actions.

Method of the class: UI{}

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->process_actions();

UI::process_actions() code WC 7.1.1

private function process_actions() {
	// phpcs:disable WordPress.Security.NonceVerification.Recommended
	$ids = isset( $_REQUEST['url'] ) ? array_map( 'absint', (array) $_REQUEST['url'] ) : array();

	if ( empty( $ids ) || empty( $_REQUEST['action'] ) ) {
		return;
	}

	$this->security_check();

	$action = sanitize_text_field( wp_unslash( $_REQUEST['action'] ) );

	switch ( $action ) {
		case 'edit':
			$this->process_edits( current( $ids ) );
			break;

		case 'delete':
		case 'enable':
		case 'disable':
			$this->process_bulk_actions( $ids, $action );
			break;

		case 'enable-all':
		case 'disable-all':
			$this->process_all_actions( $action );
			break;

		case 'turn-on':
		case 'turn-off':
			$this->process_on_off( $action );
			break;
	}
	// phpcs:enable
}