LLMS_REST_Controller::object_inserted( object $object, WP_REST_Request $request, array $schema, bool $creating )

Called right after a resource is inserted (created/updated).

Parameters Parameters


(object) (Required) Inserted or updated object.


(WP_REST_Request) (Required) Request object.


(array) (Required) The item schema.


(bool) (Required) True when creating a post, false when updating.

Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-controller.php

	protected function object_inserted( $object, $request, $schema, $creating ) {

		$type = $this->get_object_type();
		 * Fires after a single llms resource is created or updated via the REST API.
		 * The dynamic portion of the hook name, `$type`, refers to the object type this controller is responsible for managing.
		 * @since 1.0.0-beta.12
		 * @param object          $object   Inserted or updated object.
		 * @param WP_REST_Request $request  Request object.
		 * @param array           $schema   The item schema.
		 * @param bool            $creating True when creating a post, false when updating.
		do_action( "llms_rest_insert_{$type}", $object, $request, $schema, $creating );

Top ↑

Changelog Changelog

Version Description
1.0.0-beta.12 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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