WordPress at Your Fingertips
function is not described

WC_Data::__toString() public WC 2.6.0

Change data to JSON format.

{} It's a 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.

Code of WC_Data::__toString() WC 5.8.0

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