WordPress at Your Fingertips
function is not described

WC_Coupon::read_object_from_database() protected WC 3.4.1

If the object has an ID, read using the data store.

{} It's a method of the class: WC_Coupon{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->read_object_from_database();

Changelog

Since 3.4.1 Introduced.

Code of WC_Coupon::read_object_from_database() WC 5.6.0

protected function read_object_from_database() {
	$this->data_store = WC_Data_Store::load( 'coupon' );

	if ( $this->get_id() > 0 ) {
		$this->data_store->read( $this );
	}
}