Skip to content

Commit

Permalink
chore: update condition for Hyve promo
Browse files Browse the repository at this point in the history
  • Loading branch information
HardeepAsrani committed Oct 14, 2024
1 parent 183ccf1 commit 2a4afdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion views/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

$is_otter_active = is_plugin_active( 'otter-blocks/otter-blocks.php' ) || defined( 'OTTER_BLOCKS_VERSION' );
$is_hyve_installed = file_exists( ABSPATH . 'wp-content/plugins/hyve-lite/hyve-lite.php' ) || defined( 'HYVE_LITE_VERSION' );
$is_min_php_8_1 = version_compare( PHP_VERSION, '8.1', '>=' );

$hyve_url = add_query_arg(
array(
Expand Down Expand Up @@ -830,7 +831,7 @@ class="button image_uploader_trigger"
<tbody>
<tr valign="top">
<td colspan="2">
<?php if ( ! $is_hyve_installed ) : ?>
<?php if ( ! $is_hyve_installed && $is_min_php_8_1 ) : ?>
<div class="wpmm-notice">
<div class="wpmm-notice-content">
<h3><?php esc_html_e( 'Enhance Your WordPress Site with Hyve AI Chatbot', 'wp-maintenance-mode' ); ?></h3>
Expand Down
4 changes: 3 additions & 1 deletion views/wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
),
);

$show_hyve_promo = version_compare( PHP_VERSION, '8.1', '>=' ) && ! is_plugin_active( 'hyve-lite/hyve-lite.php' ) && ! defined( 'HYVE_LITE_VERSION' );

?>
<div id="wpmm-wizard-wrapper">
<div class="slider-wrap">
Expand Down Expand Up @@ -86,7 +88,7 @@
</div>
<?php } ?>

<?php if ( ! is_plugin_active( 'hyve-lite/hyve-lite.php' ) || ! defined( 'HYVE_LITE_VERSION' ) ) { ?>
<?php if ( $show_hyve_promo ) { ?>
<div class="optimole-upsell">
<div class="optimole-upsell-container">
<span class="components-checkbox-control__input-container">
Expand Down

0 comments on commit 2a4afdf

Please sign in to comment.