ActionScheduler_DBStore::delete_action()
Delete an action.
Method of the class: ActionScheduler_DBStore{}
Hooks from the method
Return
null
. Nothing (null).
Usage
$ActionScheduler_DBStore = new ActionScheduler_DBStore(); $ActionScheduler_DBStore->delete_action( $action_id );
- $action_id(int) (required)
- Action ID.
ActionScheduler_DBStore::delete_action() ActionScheduler DBStore::delete action code WC 9.3.3
public function delete_action( $action_id ) { /** @var \wpdb $wpdb */ global $wpdb; $deleted = $wpdb->delete( $wpdb->actionscheduler_actions, array( 'action_id' => $action_id ), array( '%d' ) ); if ( empty( $deleted ) ) { /* translators: %s is the action ID */ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to delete this action. It may may have been deleted by another process.', 'woocommerce' ), $action_id ) ); } do_action( 'action_scheduler_deleted_action', $action_id ); }