@@ -69,6 +69,8 @@ function() use ( $global_settings ) {
6969 return $ global_settings ->license_type ();
7070 }
7171 );
72+
73+ add_filter ( 'themeisle_sdk_blackfriday_data ' , array ( $ this , 'add_black_friday_data ' ) );
7274 }
7375
7476
@@ -444,10 +446,6 @@ function( $data, $page_slug ) use ( $accounts_count, $is_post_sharing_active ) {
444446 );
445447 }
446448 do_action ( 'themeisle_internal_page ' , ROP_PRODUCT_SLUG , 'dashboard ' );
447-
448- if ( ! defined ( 'ROP_PRO_VERSION ' ) ) {
449- do_action ( 'themeisle_sdk_load_banner ' , 'rop ' );
450- }
451449 }
452450
453451 /**
@@ -1845,4 +1843,46 @@ public function get_languages() {
18451843 }
18461844 return apply_filters ( 'wpml_active_languages ' , null , array ( 'skip_missing ' => 1 ) );
18471845 }
1846+
1847+ /**
1848+ * Add the Black Friday configuration.
1849+ *
1850+ * @param array $configs An array of configurations.
1851+ *
1852+ * @return array The configurations.
1853+ */
1854+ public static function add_black_friday_data ( $ configs ) {
1855+ $ config = $ configs ['default ' ];
1856+
1857+ // translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name.
1858+ $ 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. ' , 'neve ' );
1859+ $ product_label = __ ( 'Revive Social ' , 'neve ' );
1860+ $ discount = '50% ' ;
1861+
1862+ $ plan = apply_filters ( 'product_rop_license_plan ' , 0 );
1863+ $ is_pro = 0 < $ plan ;
1864+
1865+ if ( $ is_pro ) {
1866+ // translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name.
1867+ $ message_template = __ ( 'Get %1$sup to %2$s off%3$s when you upgrade your %4$s plan or renew early. ' , 'neve ' );
1868+ $ product_label = __ ( 'Revive Social Pro ' , 'neve ' );
1869+ $ discount = '20% ' ;
1870+ }
1871+
1872+ $ product_label = sprintf ( '<strong>%s</strong> ' , $ product_label );
1873+ $ url_params = array (
1874+ 'utm_term ' => $ is_pro ? 'plan- ' . $ plan : 'free ' ,
1875+ 'lkey ' => apply_filters ( 'product_rop_license_key ' , false ),
1876+ );
1877+
1878+ $ config ['message ' ] = sprintf ( $ message_template , '<strong> ' , $ discount , '</strong> ' , $ product_label );
1879+ $ config ['sale_url ' ] = add_query_arg (
1880+ $ url_params ,
1881+ tsdk_translate_link ( tsdk_utmify ( 'https://themeisle.com/rs-bf ' , 'bfcm ' , 'revive ' ) )
1882+ );
1883+
1884+ $ configs [ ROP_PRODUCT_SLUG ] = $ config ;
1885+
1886+ return $ configs ;
1887+ }
18481888}
0 commit comments