Skip to content

Commit 0cceac4

Browse files
refactor: update black friday labels (#2755)
1 parent 7ebde40 commit 0cceac4

3 files changed

Lines changed: 50 additions & 30 deletions

File tree

inc/class-main.php

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -599,30 +599,52 @@ public function about_page() {
599599
public function add_black_friday_data( $configs ) {
600600
$config = $configs['default'];
601601

602-
// translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name.
603-
$message_template = __( 'Our biggest sale of the year: %1$sup to %2$s OFF%3$s on %4$s. Don\'t miss this limited-time offer.', 'otter-blocks' );
604-
$product_label = 'Otter Blocks';
605-
$discount = '70%';
602+
$message = __( 'Advanced blocks, custom CSS, WooCommerce integration. Everything you need to build better pages, without code. Exclusively for existing Otter users.', 'otter-blocks' );
603+
$cta_label = __( 'Get Otter Pro', 'otter-blocks' );
606604

607605
$plan = apply_filters( 'product_otter_license_plan', 0 );
608606
$license = apply_filters( 'product_otter_license_key', false );
609-
$is_pro = 0 < $plan;
607+
$status = apply_filters( 'product_otter_license_status', false );
608+
609+
$is_pro = 'valid' === $status;
610+
$is_expired = 'expired' === $status || 'active-expired' === $status;
611+
$pro_product_slug = defined( 'OTTER_PRO_BASEFILE' ) ? basename( dirname( OTTER_PRO_BASEFILE ) ) : '';
610612

611613
if ( $is_pro ) {
612-
// translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name.
613-
$message_template = __( 'Get %1$sup to %2$s off%3$s when you upgrade your %4$s plan or renew early.', 'otter-blocks' );
614-
$product_label = 'Otter Pro';
615-
$discount = '30%';
616-
}
617-
618-
$product_label = sprintf( '<strong>%s</strong>', $product_label );
619-
$url_params = array(
614+
// translators: %s is the discount percentage.
615+
$config['plugin_meta_message'] = sprintf( __( 'Black Friday Sale - up to %s off', 'otter-blocks' ), '30%' );
616+
// translators: %1$s - discount, %2$s - discount.
617+
$message = sprintf( __( 'Upgrade your Otter Pro plan: %1$s off this week. Already on the plan you need? Renew early and save up to %2$s.', 'otter-blocks' ), '30%', '20%' );
618+
$cta_label = __( 'See your options', 'otter-blocks' );
619+
} elseif ( $is_expired ) {
620+
// translators: %s is the discount percentage.
621+
$config['plugin_meta_message'] = sprintf( __( 'Black Friday Sale - %s off', 'otter-blocks' ), '50%' );
622+
// translators: %s is the discount percentage.
623+
$config['upgrade_menu_text'] = sprintf( __( 'BF Sale - %s off', 'otter-blocks' ), '50%' );
624+
$message = __( 'Your Otter Pro features are still here, just locked. Renew at a reduced rate this week.', 'otter-blocks' );
625+
$cta_label = __( 'Reactivate now', 'otter-blocks' );
626+
} else {
627+
// translators: %s is the discount percentage.
628+
$config['plugin_meta_message'] = sprintf( __( 'Black Friday Sale - %s off', 'otter-blocks' ), '60%' );
629+
// translators: %s is the discount percentage.
630+
$config['upgrade_menu_text'] = sprintf( __( 'BF Sale - %s off', 'otter-blocks' ), '60%' );
631+
// translators: %s - discount.
632+
$config['title'] = sprintf( __( 'Otter Pro: %s off this week', 'otter-blocks' ), '60%' );
633+
}
634+
635+
$url_params = array(
620636
'utm_term' => $is_pro ? 'plan-' . $plan : 'free',
621637
'lkey' => ! empty( $license ) ? $license : false,
638+
'expired' => $is_expired ? '1' : false,
622639
);
623-
624-
$config['message'] = sprintf( $message_template, '<strong>', $discount, '</strong>', $product_label );
625-
$config['sale_url'] = add_query_arg(
640+
641+
if ( ( $is_pro || $is_expired ) && ! empty( $pro_product_slug ) ) {
642+
$config['plugin_meta_targets'] = array( $pro_product_slug );
643+
}
644+
645+
$config['cta_label'] = $cta_label;
646+
$config['message'] = $message;
647+
$config['sale_url'] = add_query_arg(
626648
$url_params,
627649
tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/otter-bf', 'bfcm', 'otter' ) )
628650
);

plugins/blocks-animation/blocks-animation.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,18 @@ function ( $configs ) {
7272

7373
$config = $configs['default'];
7474

75-
// translators: %1$s - plugin name, %2$s - plugin name, %3$s - discount.
76-
$message_template = __( 'Extend %1$s with %2$s – up to %3$s OFF in our biggest sale of the year. Limited time only.', 'blocks-animation' );
77-
78-
$config['message'] = sprintf( $message_template, 'Block Animation', 'Otter Pro Blocks', '70%' );
79-
$config['sale_url'] = add_query_arg(
75+
// translators: 1. Number of free licenses, 2. The price of the product.
76+
$config['message'] = sprintf( __( 'You’re using Blocks Animation, and the team behind it is celebrating Black Friday by giving away %1$s licences of Otter Pro. A powerful block collection worth %2$s, with advanced blocks, custom CSS, animations, and WooCommerce integration. Claim yours before they run out.', 'blocks-animation' ), 100, '$69' );
77+
$config['plugin_meta_message'] = __( 'Black Friday Sale - Get Otter Pro free', 'blocks-animation' );
78+
$config['sale_url'] = add_query_arg(
8079
array(
8180
'utm_term' => 'free',
8281
),
83-
tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/otter-bf', 'bfcm', 'blocks-animation' ) )
82+
tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/otter-claim-bf', 'bfcm', 'blocks-animation' ) )
8483
);
8584

8685
$configs[ BLOCKS_ANIMATION_PRODUCT_SLUG ] = $config;
8786

8887
return $configs;
89-
}
88+
}
9089
);

plugins/blocks-css/blocks-css.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,18 @@ function ( $configs ) {
6868

6969
$config = $configs['default'];
7070

71-
// translators: %1$s - plugin name, %2$s - plugin name, %3$s - discount.
72-
$message_template = __( 'Extend %1$s with %2$s – up to %3$s OFF in our biggest sale of the year. Limited time only.', 'blocks-css' );
73-
74-
$config['message'] = sprintf( $message_template, 'Blocks CSS', 'Otter Pro Blocks', '70%' );
75-
$config['sale_url'] = add_query_arg(
71+
// translators: 1. Number of free licenses, 2. The price of the product.
72+
$config['message'] = sprintf( __( 'You’re using Blocks CSS, and the team behind it is celebrating Black Friday by giving away %1$s licences of Otter Pro. A powerful block collection worth %2$s, with advanced blocks, custom CSS, animations, and WooCommerce integration. Claim yours before they run out.', 'blocks-css' ), 100, '$69' );
73+
$config['plugin_meta_message'] = __( 'Black Friday Sale - Get Otter Pro free', 'blocks-css' );
74+
$config['sale_url'] = add_query_arg(
7675
array(
7776
'utm_term' => 'free',
7877
),
79-
tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/otter-bf', 'bfcm', 'blocks-css' ) )
78+
tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/otter-claim-bf', 'bfcm', 'blocks-css' ) )
8079
);
8180

8281
$configs[ BLOCKS_CSS_PRODUCT_SLUG ] = $config;
8382

8483
return $configs;
85-
}
84+
}
8685
);

0 commit comments

Comments
 (0)