WC_Data::__toString()publicWC 2.6.0

Change data to JSON format.

Method of the class: WC_Data{}

No Hooks.

Return

String. Data in JSON format.

Usage

$WC_Data = new WC_Data();
$WC_Data->__toString();

Changelog

Since 2.6.0 Introduced.

WC_Data::__toString() code WC 8.7.0

public function __toString() {
	return wp_json_encode( $this->get_data() );
}