is_premium()) { return; } $cs = get_current_screen(); if ( ! empty($cs->base) && strpos($cs->base, 'dgwt_wcas') !== false) { add_thickbox(); add_action('admin_footer', array($this, 'renderUpgradeModal'), 10); add_action('admin_footer', array($this, 'upgradeModalHandler'), 20); } } /** * Render plugin upgrade modal * * @return void */ public function renderUpgradeModal() { $features = array( __('Speed up search! (even 10x faster) - users love it!', 'ajax-search-for-woocommerce'), __('New modern search engine based on bm25 ranking algorithm', 'ajax-search-for-woocommerce'), __('Fuzzy search', 'ajax-search-for-woocommerce'), __('Search in attributes and variation products SKUs (option)', 'ajax-search-for-woocommerce'), __('Individual customization of the search form (simple CSS improvements)', 'ajax-search-for-woocommerce'), __('Individual tips and support by Damian Góra - the author of the plugin', 'ajax-search-for-woocommerce'), __('and more...', 'ajax-search-for-woocommerce'), ); echo ''; echo ''; } /** * JS for the upgrade modal * * @return void */ public function upgradeModalHandler() { ?> get_upgrade_url()); } }