ActionScheduler_DBStore::delete_action()
Delete an action.
Метод класса: ActionScheduler_DBStore{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
$ActionScheduler_DBStore = new ActionScheduler_DBStore(); $ActionScheduler_DBStore->delete_action( $action_id );
- $action_id(int) (обязательный)
- Action ID.
Код ActionScheduler_DBStore::delete_action() ActionScheduler DBStore::delete action 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 ); }