@@ 1119-1131 (lines=13) @@ | ||
1116 | protected function _refresh_registration( $reg_cache_ID, $registration ) { |
|
1117 | ||
1118 | // verify object |
|
1119 | if ( $registration instanceof EE_Registration ) { |
|
1120 | // update the entity mapper attendee |
|
1121 | $this->_refresh_registration_attendee( $registration ); |
|
1122 | // update the entity mapper answers for reg form questions |
|
1123 | $this->_refresh_registration_answers( $registration ); |
|
1124 | // make sure the cached registration is added to the model entity mapper |
|
1125 | $registration->get_model()->refresh_entity_map_with( $reg_cache_ID, $registration ); |
|
1126 | } else { |
|
1127 | EE_Error::add_error( |
|
1128 | __( 'An invalid Registration object was discovered when attempting to update the model entity mapper.', 'event_espresso' ), |
|
1129 | __FILE__, __FUNCTION__, __LINE__ |
|
1130 | ); |
|
1131 | } |
|
1132 | } |
|
1133 | ||
1134 | ||
@@ 1171-1181 (lines=11) @@ | ||
1168 | // now update the answers |
|
1169 | foreach ( $registration->answers() as $cache_key => $answer ) { |
|
1170 | // verify object |
|
1171 | if ( $answer instanceof EE_Answer ) { |
|
1172 | if ( $answer->ID() ) { |
|
1173 | // make sure the cached answer is added to the model entity mapper |
|
1174 | $answer->get_model()->refresh_entity_map_with( $answer->ID(), $answer ); |
|
1175 | } |
|
1176 | } else { |
|
1177 | EE_Error::add_error( |
|
1178 | __( 'An invalid Answer object was discovered when attempting to update the model entity mapper.', 'event_espresso' ), |
|
1179 | __FILE__, __FUNCTION__, __LINE__ |
|
1180 | ); |
|
1181 | } |
|
1182 | } |
|
1183 | } |
|
1184 |