plugin = 'woocommerce/woocommerce.php'; add_action( 'admin_menu', array( $this, 'admin_menus') ); add_action( 'admin_head', array( $this, 'admin_head' ) ); add_action( 'admin_init', array( $this, 'welcome' ) ); } /** * Add admin menus/screens * * @access public * @return void */ public function admin_menus() { $welcome_page_title = __( 'Welcome to WooCommerce', 'woocommerce' ); // About $about = add_dashboard_page( $welcome_page_title, $welcome_page_title, 'manage_options', 'wc-about', array( $this, 'about_screen' ) ); // Credits $credits = add_dashboard_page( $welcome_page_title, $welcome_page_title, 'manage_options', 'wc-credits', array( $this, 'credits_screen' ) ); // Credits $translators = add_dashboard_page( $welcome_page_title, $welcome_page_title, 'manage_options', 'wc-translators', array( $this, 'translators_screen' ) ); add_action( 'admin_print_styles-'. $about, array( $this, 'admin_css' ) ); add_action( 'admin_print_styles-'. $credits, array( $this, 'admin_css' ) ); add_action( 'admin_print_styles-'. $translators, array( $this, 'admin_css' ) ); } /** * admin_css function. * * @access public * @return void */ public function admin_css() { wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/activation.css', WC_PLUGIN_FILE ), array(), WC_VERSION ); } /** * Add styles just for this page, and remove dashboard page links. * * @access public * @return void */ public function admin_head() { remove_submenu_page( 'index.php', 'wc-about' ); remove_submenu_page( 'index.php', 'wc-credits' ); remove_submenu_page( 'index.php', 'wc-translators' ); // Badge for welcome page $badge_url = WC()->plugin_url() . '/assets/images/welcome/wc-badge.png'; ?> version, 0, 3 ); ?>

version ); ?>

Tweet

intro(); ?>

Orders, Coupons, Customers, Products and Reports in both XML and JSON formats.', 'woocommerce' ); ?>

OAuth 1.0a specification if you don\'t have SSL. Data is only available to authenticated users.', 'woocommerce' ); ?>

filtering capabilities, a new customer report showing orders/spending, and the ability to export CSVs.', 'woocommerce' ); ?>

default_credit_card_form.', 'woocommerce' ); ?>

intro(); ?>

Contribute to WooCommerce.', 'woocommerce' ); ?>

contributors(); ?>
intro(); ?>

Translate WooCommerce.', 'woocommerce' ); ?>

ABSOLUTE_Web, AIRoman, Andriy.Gusak, Apelsinova, Chaos, Closemarketing, CoachBirgit, DJIO, Dimis13, GabrielGil, GeertDD, Griga_M, JKKim, Janjaapvandijk, KennethJ, Lazybadger, RistoNiinemets, SergeyBiryukov, SzLegradi, TRFlavourart, Thalitapinheiro, TomiToivio, TopOSScz, Wen89, abdmc, adamedotco, ahmedbadawy, alaa13212, alichani, amitgilad, andrey.lima.ramos, arhipaiva, bobosbodega, calkut, cglaudel, claudiosmweb, coenjacobs, corsonr, cpelham, culkman, darudar, deckerweb, dekaru, denarefyev, e01, espellcaste, fdaciuk, flyingoff, fnalescio, fxbenard, gingermig, gopress.co.il, greguly, henryk.ibemeinhardt, iagomelanias, ideodora, inceptive, inpsyde, israel.cefrin, jameskoster, jeanmichell, jluisfreitas, joelbal, joesalty, josh_marom, jpBenfica, jujjer, karistuck, kraudio, lad.ruz, lubalee, maayehkhaled, marcosof, martian36, martinproject, math_beck, mattyza, me2you, mikejolley, mjepson, mobarak, mom0916, mortifactor, nsitbon, perdersongedal, potgieterg, rabas.marek, rafaelfunchal, ragulka, ramoonus, rcovarru, renatofrota, richardshaylor, rickserrat, rodrigoprior, scottbasgaard, sennbrink, stgoos, stuk88, sumodirjo, sylvie_janssens, tinaswelt, toszcze, tshowhey, tszming, tue.holm, uworx, vanbo, viamarket, wasim, zodiac1978

get_contributors(); if ( empty( $contributors ) ) return ''; $contributor_list = ''; return $contributor_list; } /** * Retrieve list of contributors from GitHub. * * @access public * @return mixed */ public function get_contributors() { $contributors = get_transient( 'woocommerce_contributors' ); if ( false !== $contributors ) return $contributors; $response = wp_remote_get( 'https://api.github.com/repos/woothemes/woocommerce/contributors', array( 'sslverify' => false ) ); if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) return array(); $contributors = json_decode( wp_remote_retrieve_body( $response ) ); if ( ! is_array( $contributors ) ) return array(); set_transient( 'woocommerce_contributors', $contributors, 3600 ); return $contributors; } /** * Sends user to the welcome page on first activation */ public function welcome() { // Bail if no activation redirect transient is set if ( ! get_transient( '_wc_activation_redirect' ) ) return; // Delete the redirect transient delete_transient( '_wc_activation_redirect' ); // Bail if we are waiting to install or update via the interface update/install links if ( get_option( '_wc_needs_update' ) == 1 || get_option( '_wc_needs_pages' ) == 1 ) return; // Bail if activating from network, or bulk, or within an iFrame if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) ) return; if ( ( isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action'] ) && ( isset( $_GET['plugin'] ) && strstr( $_GET['plugin'], 'woocommerce.php' ) ) ) return; wp_redirect( admin_url( 'index.php?page=wc-about' ) ); exit; } } new WC_Admin_Welcome();