WC_Coupon::read_object_from_database()protectedWC 3.4.1

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

Метод класса: WC_Coupon{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->read_object_from_database();

Список изменений

С версии 3.4.1 Введена.

Код WC_Coupon::read_object_from_database() WC 8.7.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 );
	}
}