ActionScheduler_DBStore::delete_action()publicWC 1.0

Delete an action.

{} Это метод класса: ActionScheduler_DBStore{}

Хуки из метода

Возвращает

null. Ничего.

Использование

$ActionScheduler_DBStore = new ActionScheduler_DBStore();
$ActionScheduler_DBStore->delete_action( $action_id );
$action_id(int) (обязательный)
Action ID.

Код ActionScheduler_DBStore::delete_action() WC 6.9.1

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 );
}