| @@ -134,16 +134,16 @@ | ||
| 134 | 134 | Praesent in risus velit. Donec molestie tincidunt ex sed consequat. Ut ornare fringilla fringilla.', |
| 135 | 135 | ), |
| 136 | 136 | ); |
| 137 | 137 | |
| 138 | - if ( 'plain' !== $style_key ) { | |
| 139 | - $content = self::get_test_rich_text_email_content( $style_key, $table_rows ); | |
| 140 | - } else { | |
| 138 | + if ( 'plain' === $style_key ) { | |
| 141 | 139 | $content = ''; |
| 142 | 140 | |
| 143 | 141 | foreach ( $table_rows as $row ) { |
| 144 | 142 | $content .= $row['label'] . ': ' . $row['value'] . "\r\n"; |
| 145 | 143 | } |
| 144 | + } else { | |
| 145 | + $content = self::get_test_rich_text_email_content( $style_key, $table_rows ); | |
| 146 | 146 | }//end if |
| 147 | 147 | |
| 148 | 148 | return $content; |
| 149 | 149 | } |
| @@ -271,11 +271,9 @@ | ||
| 271 | 271 | if ( ! $style_key ) { |
| 272 | 272 | die( esc_html( $not_exist_msg ) ); |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - $styles = self::get_email_styles(); | |
| 276 | - | |
| 277 | - if ( ! isset( $styles[ $style_key ] ) ) { | |
| 275 | + if ( ! isset( self::get_email_styles()[ $style_key ] ) ) { | |
| 278 | 276 | die( esc_html( $not_exist_msg ) ); |
| 279 | 277 | } |
| 280 | 278 | |
| 281 | 279 | $style_key = FrmAppHelper::get_param( 'style_key', '', 'sanitize_text_field' ); |