Skip to content

Commit

Permalink
Merge pull request #4316 from Codeinwp/feat/bf
Browse files Browse the repository at this point in the history
feat: show BF banner for Tier 1 Pro and Free
  • Loading branch information
vytisbulkevicius authored Nov 11, 2024
2 parents f3d08f1 + 8180fed commit 1e1f01e
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 1e1f01e

Please sign in to comment.