WC_Data::__construct
Default constructor.
Method of the class: WC_Data{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Data = new WC_Data(); $WC_Data->__construct( $read );
- $read(int|object|array)
- ID to load from the DB (optional) or already queried data.
WC_Data::__construct() WC Data:: construct code WC 10.8.1
public function __construct( $read = 0 ) {
$this->data = array_merge( $this->data, $this->extra_data );
$this->default_data = $this->data;
}