Skip to content

Commit

Permalink
feat: show BF banner for Tier 1 Pro and Free
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Nov 6, 2024
1 parent 3888af1 commit 8180fed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions assets/apps/dashboard/src/Components/Deal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/* global neveDash */

const Deal = () => {
if (1 < neveDash?.license?.tier) {
return <></>;
}

if (
!Boolean(window.neveDash?.deal?.active) ||
!Boolean(neveDash?.deal?.bannerUrl) ||
Expand Down
2 changes: 1 addition & 1 deletion inc/admin/dashboard/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 : '',
Expand Down

0 comments on commit 8180fed

Please sign in to comment.