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