From 8180fed3d4123acb00a0e42fbe4fdb411f6d25e0 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Tue, 5 Nov 2024 10:53:33 +0200 Subject: [PATCH] feat: show BF banner for Tier 1 Pro and Free --- assets/apps/dashboard/src/Components/Deal.js | 4 ++++ inc/admin/dashboard/main.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/apps/dashboard/src/Components/Deal.js b/assets/apps/dashboard/src/Components/Deal.js index 1bb3998184..8e9fbc5682 100644 --- a/assets/apps/dashboard/src/Components/Deal.js +++ b/assets/apps/dashboard/src/Components/Deal.js @@ -1,6 +1,10 @@ /* global neveDash */ const Deal = () => { + if (1 < neveDash?.license?.tier) { + return <>; + } + if ( !Boolean(window.neveDash?.deal?.active) || !Boolean(neveDash?.deal?.bannerUrl) || diff --git a/inc/admin/dashboard/main.php b/inc/admin/dashboard/main.php index 097497c709..1f06563171 100755 --- a/inc/admin/dashboard/main.php +++ b/inc/admin/dashboard/main.php @@ -384,7 +384,7 @@ private function get_localization() { 'getPluginStateBaseURL' => esc_url( rest_url( '/nv/v1/dashboard/plugin-state/' ) ), 'canInstallPlugins' => current_user_can( 'install_plugins' ), 'canActivatePlugins' => current_user_can( 'activate_plugins' ), - 'deal' => ! defined( 'NEVE_PRO_VERSION' ) ? $offer->get_localized_data() : array(), + 'deal' => $offer->get_localized_data(), 'rootUrl' => get_site_url(), 'daysSinceInstall' => round( ( time() - get_option( 'neve_install', 0 ) ) / DAY_IN_SECONDS ), 'proPluginVersion' => defined( 'NEVE_PRO_VERSION' ) ? NEVE_PRO_VERSION : '',