LLMS_REST_Table_Webhooks::get_data( string $key, LLMS_REST_API_Key $webhook )

Retrieve data for the columns


Parameters Parameters

$key

(string) (Required) the column id / key.

$webhook

(LLMS_REST_API_Key) (Required) API key object.


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/admin/tables/class-llms-rest-table-webhooks.php

	public function get_data( $key, $webhook ) {

		switch ( $key ) {

			case 'name':
				$value = $this->get_name_cell( $webhook );
				break;

			case 'status':
				$statuses = LLMS_REST_API()->webhooks()->get_statuses();
				$value    = $webhook->get( $key );
				$value    = isset( $statuses[ $value ] ) ? $statuses[ $value ] : $value;
				break;

			case 'delivery_url':
				$value = llms_trim_string( $webhook->get( $key ), 40 );
				break;

			default:
				$value = $webhook->get( $key );

		}

		return $this->filter_get_data( $value, $key, $webhook );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.3 Output translated status instead of the database value; trim the delivery URL to 40 characters.
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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