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 8.7.0
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 ) ) { throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'woocommerce' ), $action_id ) ); //phpcs:ignore WordPress.WP.I18n.MissingTranslatorsComment } do_action( 'action_scheduler_deleted_action', $action_id ); }