| @@ -130,9 +130,9 @@ | ||
| 130 | 130 | // Verify email status using external API |
| 131 | 131 | $isValidEmail = $this->verify_email_status( $email ); |
| 132 | 132 | |
| 133 | 133 | |
| 134 | - if ( $isValidEmail !== true ) { | |
| 134 | + if ( true !== $isValidEmail ) { | |
| 135 | 135 | return $this->error( __( 'Email address could not be verified as valid.', 'booktics' ) ); |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | // Prepare webhook call |
| @@ -140,10 +140,10 @@ | ||
| 140 | 140 | $body = [ 'email' => $email ]; |
| 141 | 141 | $webhook_response = wp_remote_post( $webhook_url, [ 'body' => $body ] ); |
| 142 | 142 | |
| 143 | 143 | if ( is_wp_error( $webhook_response ) ) { |
| 144 | - if ( function_exists( 'error_log' ) ) { | |
| 145 | - error_log( 'FluentCRM webhook error: ' . $webhook_response->get_error_message() ); | |
| 144 | + if ( function_exists( 'error_log' ) && defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) { | |
| 145 | + error_log( 'FluentCRM webhook error: ' . $webhook_response->get_error_message() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log | |
| 146 | 146 | } |
| 147 | 147 | return $this->error( $webhook_response->get_error_message() ); |
| 148 | 148 | } |
| 149 | 149 | |