Skip to content

Commit a123b52

Browse files
committed
Add filter hook for hiding promo notices and remove redundant 'Go Pro' notice.
1 parent 5a833fb commit a123b52

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/php/class-admin.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ public function debug_information( array $info ): array {
262262
public function print_notices() {
263263
global $current_user;
264264

265+
if ( apply_filters( 'code_snippets/hide_welcome_banner', false ) ) {
266+
return;
267+
}
268+
265269
$meta_key = 'ignore_code_snippets_survey_message';
266270
$dismissed = get_user_meta( $current_user->ID, $meta_key );
267271

@@ -287,12 +291,6 @@ public function print_notices() {
287291
$action_url = $welcome['action_url_free'];
288292
$action_label = $welcome['action_label_free'];
289293

290-
} elseif ( ! in_array( 'pro', $dismissed, true ) ) {
291-
$notice = 'pro';
292-
$action_url = 'https://snipco.de/Mlll';
293-
$action_label = __( 'Upgrade now', 'code-snippets' );
294-
$text = __( '<strong>Lifetime plans return!</strong> Enjoy Code Snippets Pro with new pricing choices, including lifetime, monthly and yearly subscriptions.', 'code-snippets' );
295-
296294
} elseif ( ! in_array( 'survey', $dismissed, true ) && ! in_array( 'true', $dismissed, true ) ) {
297295
$notice = 'survey';
298296
$action_url = 'https://codesnippets.pro/survey/';

0 commit comments

Comments
 (0)