'; echo esc_html(sprintf( __('ā%sā is available in the Pro version of Rooster One.', 'ai-eshop-optimizer'), $this->get_label() )); echo '
'; } public function is_pro_locked() { return false; } public function get_pro_promo() { return array(); } public function requires_pro_plugin() { return false; } public static function is_aieo_pro_user() { if ( null !== self::$aieo_pro_cache ) { return self::$aieo_pro_cache; } self::$aieo_pro_cache = self::compute_aieo_pro_user(); return self::$aieo_pro_cache; } private static $aieo_pro_cache = null; public static function flush_aieo_pro_cache() { self::$aieo_pro_cache = null; } private static function compute_aieo_pro_user() { $eshop_optimizer_pro = ( get_option('aieo_activate_account') == '1' && get_option('aieo_user_membership') === 'Pro' ); $rooster_connected = ( get_option('aieo_rooster_enabled') && get_option('aieo_rooster_status') === 'connected' ); if ($rooster_connected) { $ent = get_option('aieo_rooster_entitlement'); if (is_array($ent) && isset($ent['tier']) && 'free' === (string) $ent['tier']) { $rooster_connected = false; } if ($rooster_connected && is_array($ent) && isset($ent['site']['status']) && 'free' === (string) $ent['site']['status']) { $rooster_connected = false; } if ($rooster_connected && class_exists('AIEO_Entitlement_Binding') && AIEO_Entitlement_Binding::is_untrusted()) { $rooster_connected = false; } } return $eshop_optimizer_pro || $rooster_connected; } public function render() { if (!$this->is_available()) { $this->render_upsell_stub(); return; } if ($this->is_pro_locked() && !self::is_aieo_pro_user()) { $this->render_pro_locked_screen(); return; } $this->render_subtab(); } protected function pro_preview_shows_real_page() { return false; } public function pro_question_id() { return (string) $this->get_id(); } protected function render_pro_locked_screen() { $promo = (array) $this->get_pro_promo(); $title = !empty($promo['title']) ? (string) $promo['title'] : $this->get_label(); $description = !empty($promo['description']) ? (string) $promo['description'] : ''; $bullets = !empty($promo['bullets']) && is_array($promo['bullets']) ? $promo['bullets'] : array(); $cta_url = 'https://rooster.systems/get-rooster-one/'; self::print_pro_overlay_styles(); $question = class_exists('AIEO_Pro_Question') ? (string) AIEO_Pro_Question::for_id($this->pro_question_id()) : ''; $remembered = class_exists('AIEO_Remembered_Figures') ? (string) AIEO_Remembered_Figures::sentence($this->get_id()) : ''; echo '%s