| @@ -64,9 +64,9 @@ | ||
| 64 | 64 | 'plugin' => 'double-opt-in', |
| 65 | 65 | ] ); |
| 66 | 66 | |
| 67 | 67 | if ( empty( $this->messages ) ) { |
| 68 | - $this->get_logger()->warning( 'No messages found to combine.', [ | |
| 68 | + $this->get_logger()->debug( 'No messages found to combine.', [ | |
| 69 | 69 | 'plugin' => 'double-opt-in', |
| 70 | 70 | ] ); |
| 71 | 71 | return ''; |
| 72 | 72 | } |
| @@ -76,8 +76,11 @@ | ||
| 76 | 76 | $this->get_logger()->debug( 'Combined ' . count($this->messages) . ' messages.', [ |
| 77 | 77 | 'plugin' => 'double-opt-in', |
| 78 | 78 | 'message_count' => count( $this->messages ), |
| 79 | 79 | ] ); |
| 80 | + | |
| 81 | + // Clear messages after retrieval to prevent duplicates | |
| 82 | + $this->messages = []; | |
| 80 | 83 | |
| 81 | 84 | return $combined_messages; |
| 82 | 85 | } |
| 83 | 86 | |