@@ -37,6 +37,7 @@ public function setup_admin_hooks() {
37
37
38
38
add_action ( 'enqueue_block_editor_assets ' , array ( $ this , 'add_fse_design_pack_notice ' ) );
39
39
add_action ( 'wp_ajax_jaxon_dismiss_design_pack_notice ' , array ( $ this , 'remove_design_pack_notice ' ) );
40
+ add_filter ( 'themeisle_sdk_blackfriday_data ' , array ( $ this , 'add_black_friday_data ' ) );
40
41
}
41
42
42
43
/**
@@ -338,4 +339,31 @@ function( $data, $page_slug ) {
338
339
);
339
340
do_action ( 'themeisle_internal_page ' , JAXON_PRODUCT_SLUG , $ screen ->id );
340
341
}
342
+
343
+ /**
344
+ * Add Black Friday data.
345
+ *
346
+ * @param array $configs The configuration array for the loaded products.
347
+ *
348
+ * @return array
349
+ */
350
+ public function add_black_friday_data ( $ configs ) {
351
+ $ config = $ configs ['default ' ];
352
+
353
+ // translators: %1$s - plugin name, %2$s - HTML tag, %3$s - discount, %4$s - HTML tag, %5$s - company name.
354
+ $ message_template = __ ( 'Enhance %1$s with %2$s– up to %3$s OFF in our biggest sale of the year. Limited time only. ' , 'jaxon ' );
355
+
356
+ $ config ['dismiss ' ] = true ; // Note: Allow dismiss since it appears on `/wp-admin`.
357
+ $ config ['message ' ] = sprintf ( $ message_template , 'Jaxon ' , 'Otter Blocks Pro ' , '70% ' );
358
+ $ config ['sale_url ' ] = add_query_arg (
359
+ array (
360
+ 'utm_term ' => 'free ' ,
361
+ ),
362
+ tsdk_translate_link ( tsdk_utmify ( 'https://themeisle.link/otter-bf ' , 'bfcm ' , 'jaxon ' ) )
363
+ );
364
+
365
+ $ configs [ JAXON_PRODUCT_SLUG ] = $ config ;
366
+
367
+ return $ configs ;
368
+ }
341
369
}
0 commit comments