WordPress at Your Fingertips
function is not described

WC_Settings_API::get_custom_attribute_html() public WC 1.0

Get custom attributes.

{} It's a method of the class: WC_Settings_API{}

No Hooks.

Return

String.

Usage

$WC_Settings_API = new WC_Settings_API();
$WC_Settings_API->get_custom_attribute_html( $data );
$data(array) (required)
Field data.

Code of WC_Settings_API::get_custom_attribute_html() WC 5.5.2

<?php
public function get_custom_attribute_html( $data ) {
	$custom_attributes = array();

	if ( ! empty( $data['custom_attributes'] ) && is_array( $data['custom_attributes'] ) ) {
		foreach ( $data['custom_attributes'] as $attribute => $attribute_value ) {
			$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
		}
	}

	return implode( ' ', $custom_attributes );
}