LLMS_Blocks_Post_Visibility::get_callback( array $obj, WP_REST_Request $request )

Retrieve visibility information for a give object.


Parameters Parameters

$obj

(array) (Required) Assoc. array of WP_Post data.

$request

(WP_REST_Request) (Required) Full details about the request.


Top ↑

Return Return

(WP_Error|string) Visibility term slug or WP_Error object.


Top ↑

Source Source

File: libraries/lifterlms-blocks/includes/class-llms-blocks-post-visibility.php

	public function get_callback( $obj, $request ) {

		$ret = array();

		$obj = new LLMS_Product( $obj['id'] );
		if ( $obj ) {
			$ret = $obj->get_catalog_visibility();
		}
		return $ret;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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