LLMS_Abstract_Database_Store::delete()

Delete the object from the database


Description Description


Return Return

(boolean) true on success, false otherwise


Top ↑

Source Source

File: includes/abstracts/llms.abstract.database.store.php

	public function delete() {

		if ( ! $this->id ) {
			return false;
		}

		$id = $this->id;
		global $wpdb;
		$where = array_combine( array_keys( $this->primary_key ), array( $this->id ) );
		$res = $wpdb->delete( $this->get_table(), $where, array_values( $this->primary_key ) );
		if ( $res ) {
			$this->id = null;
			$this->data = array();
			do_action( 'llms_' . $this->type . '_deleted', $id, $this );
			return true;
		}
		return false;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.14.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.





Permalink: