is_already_installed = isset($installed_plugins['emailkit/EmailKit.php']) ? 1 : 0; $message = '
Edit your woocommerce emails with EmailKit builder for free.

Get 22+ WooCommerce elements, 14+ templates, Shortcode support, and more for absolutely free with EmailKit - The Best WordPress Email Customizer.✨

Get EmailKit
'; $dismissed_coutner = get_option('metform-edit_with_emailkit_banner_dismissed_'.get_current_user_id(), 0); $notice_showing_delay_time = (3600 * 24 * 15); if($dismissed_coutner == 1){ $notice_showing_delay_time = (3600 * 24 * 30); }elseif($dismissed_coutner == 2){ $notice_showing_delay_time = (3600 * 24 * 180); }elseif($dismissed_coutner >= 3){ $notice_showing_delay_time = (3600 * 24 * 1825); } \Oxaim\Libs\Notice::instance('metform', 'edit_with_emailkit_banner') ->set_dismiss('user', $notice_showing_delay_time) ->set_message($message) ->call(); add_action('admin_head', [$this, 'emailkit_admin_head']); } /** * Added script and style for Edit with EmailKit in admin head * * @access public * @return void */ public function emailkit_admin_head() { ?> get_plugin_slug( $pluginName ); return wp_nonce_url( add_query_arg( array( 'action' => $action, 'plugin' => $pluginSlug ), admin_url( 'update.php' ) ), $action . '_' . $pluginSlug ); } /** * Get plugin activation url * * @access public * @param string * @return string */ public function activation_url( $pluginName ) { return wp_nonce_url( add_query_arg( array( 'action' => 'activate', 'plugin' => $pluginName, 'plugin_status' => 'all', 'paged' => '1&s', ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $pluginName ); } } }