WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\BlockTypes

AtomicBlock::get_html_data_attributes() protected WC 1.0

Converts block attributes to HTML data attributes.

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

No Hooks.

Return

String. Rendered HTML attributes.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_html_data_attributes( $attributes );
$attributes(array) (required)
Key value pairs of attributes.

Code of AtomicBlock::get_html_data_attributes() WC 5.7.1

protected function get_html_data_attributes( array $attributes ) {
	$data = parent::get_html_data_attributes( $attributes );
	return trim( $data . ' data-block-name="' . esc_attr( $this->namespace . '/' . $this->block_name ) . '"' );
}