active_theme ) { $this->url = 'https://getsellkit.com/pricing/?coupon=promo_1NjxuCCrEq1rXLl9SD1SsLXM&utm_source=BridgeThemeWPAdminTopUpgradeBar&utm_medium=PartnerThemeWPAdmin'; } } /** * Set the priority of notice. * * @since 1.7.9 * @return int */ public function priority() { return 1; } /** * Check if notice is valid or not. * * @since 1.7.9 * @return bool */ public function is_valid() { $valid_themes = [ 'Phlox', 'Bridge' ]; if ( ! in_array( $this->active_theme, $valid_themes, true ) || sellkit()->has_pro ) { return false; } $previous_client = false; $current_time = time(); $valid_period = 7 * ( 24 * 3600 ); // 7 days timestamp. $sellkit_installed_time = get_option( 'sellkit-installed-time', 0 ); $dismissed_time = get_option( 'sellkit-partner-offer-theme-dismissed', 0 ); // User installed sellkit since or before V1.5.9 and installed time was not set. if ( 0 === $sellkit_installed_time ) { $previous_client = true; } // Do not display if dismissed less than 90 days ago. if ( in_array( $this->key, $this->dismissed_notices, true ) && $dismissed_time > 0 && $current_time - $dismissed_time <= 90 * ( 24 * 3600 ) ) { return false; } // Display notice 90 days after it is dismissed. if ( in_array( $this->key, $this->dismissed_notices, true ) && $dismissed_time > 0 && $current_time - $dismissed_time >= 90 * ( 24 * 3600 ) ) { return true; } // Display notice 7 days after plugin is installed. if ( ( $current_time - $sellkit_installed_time >= $valid_period && $sellkit_installed_time > 0 ) || true === $previous_client ) { return true; } return false; } /** * Notice content wrapper. * * @since 1.7.9 */ public function notice_content_wrapper() { $checkmark_url = sellkit()->plugin_assets_url() . '/img/icons/checkmark.svg'; ?>