WC_Coupon::read_object_from_database
If the object has an ID, read using the data store.
Method of the class: WC_Coupon{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->read_object_from_database();
Changelog
| Since 3.4.1 | Introduced. |
WC_Coupon::read_object_from_database() WC Coupon::read object from database code WC 10.4.3
protected function read_object_from_database() {
$this->data_store = WC_Data_Store::load( 'coupon' );
if ( $this->get_id() > 0 ) {
$this->data_store->read( $this );
}
}