示例#1
0
 /**
  * Add idempotent checks, flood control and batch recording to the parent send method.
  *
  * @since 2.0.0
  */
 public function send()
 {
     $this->batch->lock_for_sending();
     $result = parent::send();
     if ($result and !is_wp_error($result)) {
         $this->record_successful_outbound_message_batch($result);
     }
     return $result;
 }
示例#2
0
 /**
  * Add idempotent checks and batch recording to the parent send method.
  *
  * @since 2.0.0
  *
  * @return null|object|WP_Error
  */
 public function send()
 {
     $this->batch->set_individual_message_values(array())->add_unsent_recipients()->lock_for_sending();
     $result = parent::send();
     if ($result and !is_wp_error($result)) {
         $this->record_successful_outbound_message_batch($result);
     }
     return $result;
 }