Skip to content

Commit 0aa1594

Browse files
refactor: payload data
1 parent ea49247 commit 0aa1594

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

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

+7-8
Original file line numberDiff line numberDiff line change
@@ -2378,31 +2378,30 @@ public function add_black_friday_data( $configs ) {
23782378
$discount = '70%';
23792379

23802380
// translators: %1$s - discount, %2$s - product label.
2381-
$config['message'] = sprintf( __( 'Our biggest sale of the year: <strong>%1$s OFF</strong> on <strong>%2$s</strong>! Don\'t miss this limited-time offer.', 'feedzy-rss-feeds' ), $discount, $product_label );
2381+
$message_template = __( 'Our biggest sale of the year: %1$s off on %2$s! Don\'t miss this limited-time offer.', 'feedzy-rss-feeds' );
23822382

23832383
$is_pro = feedzy_is_pro();
2384-
$license_key = '';
2384+
$license_key = apply_filters( 'product_feedzy_license_key', '' );
23852385

23862386
if ( $is_pro ) {
23872387
$product_label = __( 'Feedzy Pro', 'feedzy-rss-feeds' );
23882388
$discount = '30%';
23892389

23902390
// translators: %1$s - discount, %2$s - product label.
2391-
$config['message'] = sprintf( __( 'Get <strong>%1$s off</strong> when you upgrade your <strong>%2$s</strong> plan or renew early.', 'feedzy-rss-feeds' ), $discount, $product_label );
2392-
2393-
if ( current_user_can( 'manage_options' ) ) {
2394-
$license_key = apply_filters( 'product_feedzy_license_key', '' );
2395-
}
2391+
$message_template = __( 'Get %1$s off when you upgrade your %2$s plan or renew early.', 'feedzy-rss-feeds' );
23962392
}
23972393

2398-
$url_params = array(
2394+
$discount = sprintf( '<strong>%s</strong>', $discount );
2395+
$product_label = sprintf( '<strong>%s</strong>', $product_label );
2396+
$url_params = array(
23992397
'utm_term' => $is_pro ? 'plan-' . apply_filters( 'product_feedzy_license_plan', 0 ) : 'free'
24002398
);
24012399

24022400
if ( ! empty( $license_key ) ) {
24032401
$url_params['lkey'] = $license_key;
24042402
}
24052403

2404+
$config['message'] = sprintf( $message_template, $discount, $product_label );
24062405
$config['sale_url'] = add_query_arg(
24072406
$url_params,
24082407
tsdk_translate_link( tsdk_utmify( 'https://themeisle.com/plugins/feedzy-rss-feeds/blackfriday', 'bfcm', 'feedzy' ) )

0 commit comments

Comments
 (0)