WC_Data::__toString
Change data to JSON format.
Method of the class: WC_Data{}
No Hooks.
Returns
String. Data in JSON format.
Usage
$WC_Data = new WC_Data(); $WC_Data->__toString();
Changelog
| Since 2.6.0 | Introduced. |
WC_Data::__toString() WC Data:: toString code WC 10.6.2
public function __toString() {
return wp_json_encode( $this->get_data() );
}