Skip to content

Commit e54ee5e

Browse files
author
Soare Robert-Daniel
committed
chore: add plugin meta link integration
1 parent a803490 commit e54ee5e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

inc/admin/dashboard/main.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,8 @@ public static function get_black_friday_data( $default = array() ) {
13121312
$has_valid_license = 'valid' === $license_status;
13131313
$has_expired_license = 'expired' === $license_status || 'active-expired' === $license_status;
13141314

1315+
$neve_pro_product_slug = defined( 'NEVE_PRO_BASEFILE' ) ? basename( dirname( NEVE_PRO_BASEFILE ) ) : '';
1316+
13151317
if ( $has_valid_license ) {
13161318
// translators: %1$s - the discount percentage for the upgrade, %2$s - the discount percentage for the renewal.
13171319
$message = sprintf( __( 'Upgrade your Neve Pro plan: %1$s off this week. Already on the plan you need? Renew early and save up to %2$s.', 'neve' ), '30%', '20%' );
@@ -1323,6 +1325,15 @@ public static function get_black_friday_data( $default = array() ) {
13231325
// translators: %s - the discount percentage for the upgrade.
13241326
$config['title'] = sprintf( __( 'Neve Pro: %s off this week', 'neve' ), '60%' );
13251327
}
1328+
1329+
if ( $has_valid_license || $has_expired_license ) {
1330+
// translators: %s is the discount percentage.
1331+
$config['plugin_meta_message'] = sprintf( __( 'Black Friday Sale - up to %s off', 'neve' ), '30%' );
1332+
$config['plugin_meta_targets'] = array( $neve_pro_product_slug );
1333+
} else {
1334+
// translators: %s is the discount percentage.
1335+
$config['plugin_meta_message'] = sprintf( __( 'Black Friday Sale - %s off', 'neve' ), '60%' );
1336+
}
13261337

13271338
$url_params = array(
13281339
'utm_term' => $is_pro ? 'plan-' . $plan : 'free',

0 commit comments

Comments
 (0)