PluginProbe
Property Hive / 2.3.0
Property Hive v2.3.0
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
← All changes | includes/class-ph-emails.php +0 -34 2.3.12.3.0 View file →
@@ -229,41 +229,8 @@
229 229 foreach ( $emails_to_send as $email_to_send )
230 230 {
231 231 $email_id = $email_to_send->email_id;
232 232
233 - $contact_id = (int)$email_to_send->contact_id;
234 -
235 - // Ensure client is still publised, hasn't unsubscribed from emails and that send matching properties is yes
236 - // To combat being added to the queue but then the queue only getting processed at a later date
237 - $forbidden_contact_methods = get_post_meta( $contact_id, '_forbidden_contact_methods', true );
238 -
239 - $email_forbidden = is_array( $forbidden_contact_methods ) && in_array( 'email', $forbidden_contact_methods, true );
240 -
241 - $applicant_profile = get_post_meta( $contact_id, '_applicant_profile_' . (int)$email_to_send->applicant_profile_id, true );
242 -
243 - $matching_enabled = is_array( $applicant_profile )
244 - && isset( $applicant_profile['send_matching_properties'] )
245 - && 'yes' === $applicant_profile['send_matching_properties'];
246 -
247 - if (
248 - 'publish' !== get_post_status( $contact_id )
249 - || $email_forbidden
250 - || !$matching_enabled
251 - ) {
252 - $wpdb->update(
253 - $wpdb->prefix . 'ph_email_log',
254 - array(
255 - 'status' => 'fail2',
256 - 'lock_id' => '',
257 - ),
258 - array( 'email_id' => (int)$email_id ),
259 - array( '%s', '%s' ),
260 - array( '%d' )
261 - );
262 -
263 - continue;
264 - }
265 -
266 233 $headers = array();
267 234 $headers[] = 'From: ' . html_entity_decode($email_to_send->from_name) . ' <' . $email_to_send->from_email_address . '>';
268 235 if ( $email_to_send->cc_email_address != '' )
269 236 {
@@ -452,9 +419,8 @@
452 419
453 420 // Get all contacts that have a type of applicant
454 421 $args = array(
455 422 'post_type' => 'contact',
456 - 'post_status' => 'publish',
457 423 'nopaging' => true,
458 424 // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query -- Matching mail must include all eligible applicant profiles; membership and opt-in eligibility are stored in contact metadata.
459 425 'meta_query' => $meta_query,
460 426 'fields' => 'ids'