Form_Category_Manager::delete_from_db( int $form_category_id )

Internal method to delete a form from the database.

Description

Parameters

$form_category_id

(int) (Required) ID of the form to delete.

Return

(bool) True on success, or false on failure.

Source

File: src/db-objects/form-categories/form-category-manager.php

	protected function delete_from_db( $form_category_id ) {
		$term = $this->fetch_from_db( $form_category_id );
		if ( ! $term ) {
			return false;
		}

		$result = wp_delete_term( $form_category_id, $term->taxonomy );
		if ( ! $result || is_wp_error( $result ) ) {
			return false;
		}

		return true;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.