Skip to content

Commit 0c5509b

Browse files
refactor: simplify
1 parent 27c94a9 commit 0c5509b

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

includes/admin/feedzy-rss-feeds-admin.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2374,27 +2374,25 @@ private function enable_telemetry() {
23742374
public function add_black_friday_data( $configs ) {
23752375
$config = $configs['default'];
23762376

2377-
$product_label = __( 'Feedzy', 'feedzy-rss-feeds' );
2378-
$discount = '70%';
2379-
23802377
// translators: %1$s - discount, %2$s - product label.
23812378
$message_template = __( 'Our biggest sale of the year: %1$s off on %2$s! Don\'t miss this limited-time offer.', 'feedzy-rss-feeds' );
2379+
$product_label = __( 'Feedzy', 'feedzy-rss-feeds' );
2380+
$discount = '70%';
23822381

2383-
$is_pro = feedzy_is_pro();
2384-
$license_key = apply_filters( 'product_feedzy_license_key', '' );
2382+
$is_pro = feedzy_is_pro();
23852383

23862384
if ( $is_pro ) {
2387-
$product_label = __( 'Feedzy Pro', 'feedzy-rss-feeds' );
2388-
$discount = '30%';
2389-
23902385
// translators: %1$s - discount, %2$s - product label.
23912386
$message_template = __( 'Get %1$s off when you upgrade your %2$s plan or renew early.', 'feedzy-rss-feeds' );
2387+
$product_label = __( 'Feedzy Pro', 'feedzy-rss-feeds' );
2388+
$discount = '30%';
23922389
}
23932390

23942391
$discount = sprintf( '<strong>%s</strong>', $discount );
23952392
$product_label = sprintf( '<strong>%s</strong>', $product_label );
23962393
$url_params = array(
2397-
'utm_term' => $is_pro ? 'plan-' . apply_filters( 'product_feedzy_license_plan', 0 ) : 'free'
2394+
'utm_term' => $is_pro ? 'plan-' . apply_filters( 'product_feedzy_license_plan', 0 ) : 'free',
2395+
'lkey' => apply_filters( 'product_feedzy_license_key', false )
23982396
);
23992397

24002398
if ( ! empty( $license_key ) ) {

0 commit comments

Comments
 (0)