ActionScheduler_ListTable::process_row_action
Implements the logic behind processing an action once an action link is clicked on the list table.
Method of the class: ActionScheduler_ListTable{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->process_row_action( $action_id, $row_action_type );
- $action_id(int) (required)
- Action ID.
- $row_action_type(string) (required)
- The type of action to perform on the action.
ActionScheduler_ListTable::process_row_action() ActionScheduler ListTable::process row action code WC 10.7.0
protected function process_row_action( $action_id, $row_action_type ) {
try {
switch ( $row_action_type ) {
case 'run':
$this->runner->process_action( $action_id, 'Admin List Table' );
break;
case 'cancel':
$this->store->cancel_action( $action_id );
break;
}
$success = 1;
$error_message = '';
} catch ( Exception $e ) {
$success = 0;
$error_message = $e->getMessage();
}
set_transient( 'action_scheduler_admin_notice', compact( 'action_id', 'success', 'error_message', 'row_action_type' ), 30 );
}