public function refresh( $destroy_changes = false ) {

		if ( ! $this->exists() ) {
			return;
		}

		$data = (array) static::get_data_from_pk( $this->get_pk() );

		$this->_original = $data;

		if ( $destroy_changes ) {
			$this->set_raw_attributes( $data );
		}
	}
public function refresh( $destroy_changes = false ) {

		if ( ! $this->exists() ) {
			return;
		}

		$data = (array) static::get_data_from_pk( $this->get_pk() );

		$this->_original = $data;

		if ( $destroy_changes ) {
			$this->set_raw_attributes( $data );
		}
	}
public function refresh ( $ destroy_changes = false ) { if ( ! $ this -> exists ( ) ) { return ; } $ data = ( array ) static :: get_data_from_pk ( $ this -> get_pk ( ) ) ; $ this -> _original = $ data ; if ( $ destroy_changes ) { $ this -> set_raw_attributes ( $ data ) ; } }
Refresh the attributes on this model.

This will fetch the latest data from either the cache or DB.

@param bool $destroy_changes If true, will destroy local changes.

@since 2.0.0
Refresh the attributes on this model .