WC_Settings_API::get_description_html()publicWC 1.0

Get HTML for descriptions.

Method of the class: WC_Settings_API{}

No Hooks.

Return

String.

Usage

$WC_Settings_API = new WC_Settings_API();
$WC_Settings_API->get_description_html( $data );
$data(array) (required)
Data for the description.

WC_Settings_API::get_description_html() code WC 8.7.0

public function get_description_html( $data ) {
	if ( true === $data['desc_tip'] ) {
		$description = '';
	} elseif ( ! empty( $data['desc_tip'] ) ) {
		$description = $data['description'];
	} elseif ( ! empty( $data['description'] ) ) {
		$description = $data['description'];
	} else {
		$description = '';
	}

	return $description ? '<p class="description">' . wp_kses_post( $description ) . '</p>' . "\n" : '';
}