@@ 1101-1113 (lines=13) @@ | ||
1098 | protected function _refresh_registration( $reg_cache_ID, $registration ) { |
|
1099 | ||
1100 | // verify object |
|
1101 | if ( $registration instanceof EE_Registration ) { |
|
1102 | // update the entity mapper attendee |
|
1103 | $this->_refresh_registration_attendee( $registration ); |
|
1104 | // update the entity mapper answers for reg form questions |
|
1105 | $this->_refresh_registration_answers( $registration ); |
|
1106 | // make sure the cached registration is added to the model entity mapper |
|
1107 | $registration->get_model()->refresh_entity_map_with( $reg_cache_ID, $registration ); |
|
1108 | } else { |
|
1109 | EE_Error::add_error( |
|
1110 | __( 'An invalid Registration object was discovered when attempting to update the model entity mapper.', 'event_espresso' ), |
|
1111 | __FILE__, __FUNCTION__, __LINE__ |
|
1112 | ); |
|
1113 | } |
|
1114 | } |
|
1115 | ||
1116 | ||
@@ 1151-1161 (lines=11) @@ | ||
1148 | // now update the answers |
|
1149 | foreach ( $registration->answers() as $cache_key => $answer ) { |
|
1150 | // verify object |
|
1151 | if ( $answer instanceof EE_Answer ) { |
|
1152 | if ( $answer->ID() ) { |
|
1153 | // make sure the cached answer is added to the model entity mapper |
|
1154 | $answer->get_model()->refresh_entity_map_with( $answer->ID(), $answer ); |
|
1155 | } |
|
1156 | } else { |
|
1157 | EE_Error::add_error( |
|
1158 | __( 'An invalid Answer object was discovered when attempting to update the model entity mapper.', 'event_espresso' ), |
|
1159 | __FILE__, __FUNCTION__, __LINE__ |
|
1160 | ); |
|
1161 | } |
|
1162 | } |
|
1163 | } |
|
1164 |