| @@ 2999-3008 (lines=10) @@ | ||
| 2996 | $message_type |
|
| 2997 | )) { |
|
| 2998 | $success = $this->_preview_message(true); |
|
| 2999 | if ($success) { |
|
| 3000 | EE_Error::add_success(__('Test message sent', 'event_espresso')); |
|
| 3001 | } else { |
|
| 3002 | EE_Error::add_error( |
|
| 3003 | esc_html__('The test message was not sent', 'event_espresso'), |
|
| 3004 | __FILE__, |
|
| 3005 | __FUNCTION__, |
|
| 3006 | __LINE__ |
|
| 3007 | ); |
|
| 3008 | } |
|
| 3009 | } |
|
| 3010 | } |
|
| 3011 | ||
| @@ 4371-4383 (lines=13) @@ | ||
| 4368 | // okay we should have the data all setup. Now we just update! |
|
| 4369 | $success = $this->_message_resource_manager->update_active_messengers_option(); |
|
| 4370 | ||
| 4371 | if ($success) { |
|
| 4372 | EE_Error::add_success(__('Settings updated', 'event_espresso')); |
|
| 4373 | } else { |
|
| 4374 | EE_Error::add_error( |
|
| 4375 | esc_html__( |
|
| 4376 | 'Settings did not get updated', |
|
| 4377 | 'event_espresso' |
|
| 4378 | ), |
|
| 4379 | __FILE__, |
|
| 4380 | __FUNCTION__, |
|
| 4381 | __LINE__ |
|
| 4382 | ); |
|
| 4383 | } |
|
| 4384 | ||
| 4385 | $this->_template_args['success'] = $success; |
|
| 4386 | $this->_return_json(); |
|
| @@ 216-220 (lines=5) @@ | ||
| 213 | } |
|
| 214 | $config_saved = EE_Registry::instance()->CFG->update_espresso_config(false, false); |
|
| 215 | } |
|
| 216 | if ($config_saved) { |
|
| 217 | EE_Error::add_success(__('Display Order has been successfully updated.', 'event_espresso')); |
|
| 218 | } else { |
|
| 219 | EE_Error::add_error( |
|
| 220 | __('Display Order was not updated.', 'event_espresso'), |
|
| 221 | __FILE__, |
|
| 222 | __FUNCTION__, |
|
| 223 | __LINE__ |
|
| @@ 1158-1177 (lines=20) @@ | ||
| 1155 | } else { |
|
| 1156 | // can count how many sent by using the messages in the queue |
|
| 1157 | $sent_count = $sent_queue->count_STS_in_queue(EEM_Message::instance()->stati_indicating_sent()); |
|
| 1158 | if ($sent_count > 0) { |
|
| 1159 | EE_Error::add_success( |
|
| 1160 | sprintf( |
|
| 1161 | _n( |
|
| 1162 | 'There was %d message successfully sent.', |
|
| 1163 | 'There were %d messages successfully sent.', |
|
| 1164 | $sent_count, |
|
| 1165 | 'event_espresso' |
|
| 1166 | ), |
|
| 1167 | $sent_count |
|
| 1168 | ) |
|
| 1169 | ); |
|
| 1170 | } else { |
|
| 1171 | EE_Error::overwrite_errors(); |
|
| 1172 | EE_Error::add_error( |
|
| 1173 | __( |
|
| 1174 | 'No message was sent because of problems with sending. Either all the messages you selected were not a sendable message, they were ALREADY sent on a different scheduled task, or there was an error. |
|
| 1175 | If there was an error, you can look at the messages in the message activity list table for any error messages.', |
|
| 1176 | 'event_espresso' |
|
| 1177 | ), |
|
| 1178 | __FILE__, |
|
| 1179 | __FUNCTION__, |
|
| 1180 | __LINE__ |
|
| @@ 1266-1283 (lines=18) @@ | ||
| 1263 | || EE_Registry::instance()->NET_CFG->core->do_messages_on_same_request |
|
| 1264 | ) { |
|
| 1265 | $queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(EEM_Message::status_sent); |
|
| 1266 | if ($queue_count > 0) { |
|
| 1267 | EE_Error::add_success( |
|
| 1268 | sprintf( |
|
| 1269 | _n( |
|
| 1270 | '%d message successfully sent.', |
|
| 1271 | '%d messages successfully sent.', |
|
| 1272 | $queue_count, |
|
| 1273 | 'event_espresso' |
|
| 1274 | ), |
|
| 1275 | $queue_count |
|
| 1276 | ) |
|
| 1277 | ); |
|
| 1278 | } else { |
|
| 1279 | EE_Error::add_error( |
|
| 1280 | __( |
|
| 1281 | 'No messages were queued for resending. This usually only happens when all the messages flagged for resending are not a status that can be resent.', |
|
| 1282 | 'event_espresso' |
|
| 1283 | ), |
|
| 1284 | __FILE__, |
|
| 1285 | __FUNCTION__, |
|
| 1286 | __LINE__ |
|
| @@ 248-252 (lines=5) @@ | ||
| 245 | } |
|
| 246 | $config_saved = $config->update_espresso_config(false, false); |
|
| 247 | } |
|
| 248 | if ($config_saved) { |
|
| 249 | EE_Error::add_success(__('Display Order has been successfully updated.', 'event_espresso')); |
|
| 250 | } else { |
|
| 251 | EE_Error::add_error( |
|
| 252 | __('Display Order was not updated.', 'event_espresso'), |
|
| 253 | __FILE__, |
|
| 254 | __FUNCTION__, |
|
| 255 | __LINE__ |
|
| @@ 1033-1037 (lines=5) @@ | ||
| 1030 | ); |
|
| 1031 | $this->_redirect_after_action(false, '', '', $query_args, true); |
|
| 1032 | } |
|
| 1033 | if ($errors > 0) { |
|
| 1034 | EE_Error::add_error( |
|
| 1035 | sprintf(__('There were %d records that did not delete successfully', 'event_espresso'), $errors), |
|
| 1036 | __FILE__, |
|
| 1037 | __FUNCTION__, |
|
| 1038 | __LINE__ |
|
| 1039 | ); |
|
| 1040 | } else { |
|
| @@ 1918-1925 (lines=8) @@ | ||
| 1915 | /** @type EE_Transaction_Payments $transaction_payments */ |
|
| 1916 | $transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments'); |
|
| 1917 | // update the transaction with this payment |
|
| 1918 | if ($transaction_payments->calculate_total_payments_and_update_status($transaction)) { |
|
| 1919 | EE_Error::add_success( |
|
| 1920 | esc_html__( |
|
| 1921 | 'The payment has been processed successfully.', |
|
| 1922 | 'event_espresso' |
|
| 1923 | ), |
|
| 1924 | __FILE__, |
|
| 1925 | __FUNCTION__, |
|
| 1926 | __LINE__ |
|
| 1927 | ); |
|
| 1928 | } else { |
|