Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Abstract_Database_Store::update( array $data )

Update object data in the database

Parameters Parameters


(array) (Required) Data to update as key=>val.

Top ↑

Return Return


Top ↑

Source Source

File: includes/abstracts/

	private function update( $data ) {

		global $wpdb;
		$format = array_map( array( $this, 'get_column_format' ), array_keys( $data ) );
		$where  = array_combine( array_keys( $this->primary_key ), array( $this->id ) );
		$res    = $wpdb->update( $this->get_table(), $data, $where, $format, array_values( $this->primary_key ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
		if ( $res ) {

			 * Fires when a new database record is updated.
			 * The dynamic portion of this hook, `$this->type`, refers to the record type.
			 * @since Unknown.
			 * @param int                          $id  Record ID.
			 * @param LLMS_Abstract_Database_Store $obj Instance of the record object.
			do_action( "llms_{$this->type}_updated", $this->id, $this );

			return true;
		return false;


Top ↑

Changelog Changelog

Version Description
6.0.0 Removed deprecated llms__updated action hook.
4.3.0 Added deprecated hook call to llms__updated action to preserve backwards compatibility.
3.24.0 Unknown.
3.14.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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