steps = array( 'introduction' => array( 'name' => __( 'Introduction', 'woocommerce' ), 'view' => array( $this, 'wc_setup_introduction' ), 'handler' => '' ), 'pages' => array( 'name' => __( 'Page Setup', 'woocommerce' ), 'view' => array( $this, 'wc_setup_pages' ), 'handler' => array( $this, 'wc_setup_pages_save' ) ), 'locale' => array( 'name' => __( 'Store Locale', 'woocommerce' ), 'view' => array( $this, 'wc_setup_locale' ), 'handler' => array( $this, 'wc_setup_locale_save' ) ), 'shipping_taxes' => array( 'name' => __( 'Shipping & Tax', 'woocommerce' ), 'view' => array( $this, 'wc_setup_shipping_taxes' ), 'handler' => array( $this, 'wc_setup_shipping_taxes_save' ), ), 'next_steps' => array( 'name' => __( 'Ready!', 'woocommerce' ), 'view' => array( $this, 'wc_setup_ready' ), 'handler' => '' ) ); $this->step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) ); $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; wp_register_script( 'select2', WC()->plugin_url() . '/assets/js/select2/select2' . $suffix . '.js', array( 'jquery' ), '3.5.2' ); wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array( 'jquery', 'select2' ), WC_VERSION ); wp_localize_script( 'wc-enhanced-select', 'wc_enhanced_select_params', array( 'i18n_matches_1' => _x( 'One result is available, press enter to select it.', 'enhanced select', 'woocommerce' ), 'i18n_matches_n' => _x( '%qty% results are available, use up and down arrow keys to navigate.', 'enhanced select', 'woocommerce' ), 'i18n_no_matches' => _x( 'No matches found', 'enhanced select', 'woocommerce' ), 'i18n_ajax_error' => _x( 'Loading failed', 'enhanced select', 'woocommerce' ), 'i18n_input_too_short_1' => _x( 'Please enter 1 or more characters', 'enhanced select', 'woocommerce' ), 'i18n_input_too_short_n' => _x( 'Please enter %qty% or more characters', 'enhanced select', 'woocommerce' ), 'i18n_input_too_long_1' => _x( 'Please delete 1 character', 'enhanced select', 'woocommerce' ), 'i18n_input_too_long_n' => _x( 'Please delete %qty% characters', 'enhanced select', 'woocommerce' ), 'i18n_selection_too_long_1' => _x( 'You can only select 1 item', 'enhanced select', 'woocommerce' ), 'i18n_selection_too_long_n' => _x( 'You can only select %qty% items', 'enhanced select', 'woocommerce' ), 'i18n_load_more' => _x( 'Loading more results…', 'enhanced select', 'woocommerce' ), 'i18n_searching' => _x( 'Searching…', 'enhanced select', 'woocommerce' ), 'ajax_url' => admin_url( 'admin-ajax.php' ), 'search_products_nonce' => wp_create_nonce( 'search-products' ), 'search_customers_nonce' => wp_create_nonce( 'search-customers' ) ) ); wp_register_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION ); wp_register_style( 'wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array(), WC_VERSION ); wp_register_script( 'wc-setup', WC()->plugin_url() . '/assets/js/admin/wc-setup.min.js', array( 'jquery' ), WC_VERSION ); wp_localize_script( 'wc-setup', 'wc_setup_params', array( 'locale_info' => json_encode( include( WC()->plugin_path() . '/i18n/locale-info.php' ) ) ) ); wp_enqueue_style( 'dashicons' ); if ( ! empty( $_POST['save_step'] ) && isset( $this->steps[ $this->step ]['handler'] ) ) { call_user_func( $this->steps[ $this->step ]['handler'] ); } $this->setup_wizard_header(); $this->setup_wizard_steps(); $this->setup_wizard_content(); $this->setup_wizard_footer(); exit; } public function get_next_step_link() { $keys = array_keys( $this->steps ); return add_query_arg( 'step', $keys[ array_search( $this->step, array_keys( $this->steps ) ) + 1 ] ); } /** * Setup Wizard Header */ public function setup_wizard_header() { ?> > <?php _e( 'WooCommerce › Setup Wizard', 'woocommerce' ); ?>

WooCommerce

    steps as $step_key => $step ) : ?>
'; call_user_func( $this->steps[ $this->step ]['view'] ); echo ''; } /** * Introduction step */ public function wc_setup_introduction() { ?>

', '' ); ?>

get_next_step_link() ); exit; } /** * Page setup */ public function wc_setup_pages() { ?>

Menus screen%s.', 'woocommerce' ), '', '', '', '' ); ?>

get_next_step_link() ); exit; } /** * Shipping and taxes */ public function wc_setup_shipping_taxes() { ?>

', '', '' ); ?>

plugin_path() . '/i18n/locale-info.php' ); $tax_rates = false; if ( isset( $locale_info[ WC()->countries->get_base_country() ] ) ) { if ( isset( $locale_info[ WC()->countries->get_base_country() ]['tax_rates'][ WC()->countries->get_base_state() ] ) ) { $tax_rates = $locale_info[ WC()->countries->get_base_country() ]['tax_rates'][ WC()->countries->get_base_state() ]; } elseif ( isset( $locale_info[ WC()->countries->get_base_country() ]['tax_rates'][''] ) ) { $tax_rates = $locale_info[ WC()->countries->get_base_country() ]['tax_rates']['']; } } if ( $tax_rates ) { ?>


', '', '' ); ?>

settings['enabled'] = 'yes'; $shipping_method->settings['type'] = 'item'; $shipping_method->settings['cost_per_order'] = woocommerce_format_decimal( sanitize_text_field( $_POST['shipping_cost_domestic'] ) ); $shipping_method->settings['cost'] = woocommerce_format_decimal( sanitize_text_field( $_POST['shipping_cost_domestic_item'] ) ); $shipping_method->settings['fee'] = ''; update_option( $shipping_method->plugin_id . $shipping_method->id . '_settings', $shipping_method->settings ); } if ( 'yes' === $woocommerce_calc_shipping && ! empty( $_POST['shipping_cost_international'] ) ) { // Delete existing settings if they exist delete_option( 'woocommerce_international_delivery_flat_rates' ); delete_option( 'woocommerce_international_delivery_settings' ); // Init rate and settings $shipping_method = new WC_Shipping_International_Delivery(); $shipping_method->settings['enabled'] = 'yes'; $shipping_method->settings['type'] = 'item'; $shipping_method->settings['cost_per_order'] = woocommerce_format_decimal( sanitize_text_field( $_POST['shipping_cost_international'] ) ); $shipping_method->settings['cost'] = woocommerce_format_decimal( sanitize_text_field( $_POST['shipping_cost_international_item'] ) ); $shipping_method->settings['fee'] = ''; update_option( $shipping_method->plugin_id . $shipping_method->id . '_settings', $shipping_method->settings ); } if ( 'yes' === $woocommerce_calc_taxes && ! empty( $_POST['woocommerce_import_tax_rates'] ) ) { $locale_info = include( WC()->plugin_path() . '/i18n/locale-info.php' ); $tax_rates = false; if ( isset( $locale_info[ WC()->countries->get_base_country() ] ) ) { if ( isset( $locale_info[ WC()->countries->get_base_country() ]['tax_rates'][ WC()->countries->get_base_state() ] ) ) { $tax_rates = $locale_info[ WC()->countries->get_base_country() ]['tax_rates'][ WC()->countries->get_base_state() ]; } elseif ( isset( $locale_info[ WC()->countries->get_base_country() ]['tax_rates'][''] ) ) { $tax_rates = $locale_info[ WC()->countries->get_base_country() ]['tax_rates']['']; } } if ( $tax_rates ) { $loop = 0; foreach ( $tax_rates as $rate ) { $tax_rate = array( 'tax_rate_country' => $rate['country'], 'tax_rate_state' => $rate['state'], 'tax_rate' => $rate['rate'], 'tax_rate_name' => $rate['name'], 'tax_rate_priority' => 1, 'tax_rate_compound' => 0, 'tax_rate_shipping' => $rate['shipping'] ? 1 : 0, 'tax_rate_order' => $loop ++, 'tax_rate_class' => '' ); $tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate ); } } } wp_redirect( $this->get_next_step_link() ); exit; } /** * Final step */ public function wc_setup_ready() { ?>

Create your first product
Do something
plugin_url() . '/assets/css/activation.css', array(), WC_VERSION ); } /** * Add styles just for this page, and remove dashboard page links. */ 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' ); ?> version, 0, 3 ); // Random tweet - must be kept to 102 chars to "fit" $tweets = array( 'WooCommerce kickstarts online stores. It\'s free and has been downloaded over 6 million times.', 'Building an online store? WooCommerce is the leading #eCommerce plugin for WordPress (and it\'s free).', 'WooCommerce is a free #eCommerce plugin for #WordPress for selling #allthethings online, beautifully.', 'Ready to ship your idea? WooCommerce is the fastest growing #eCommerce plugin for WordPress on the web' ); shuffle( $tweets ); ?>

version ); ?>

Tweet

intro(); ?>

', '' ); ?>

', '' ); ?>

', '' ); ?>

', '' ); ?>

', '' ); ?>

', '' ); ?>


intro(); ?>

Contribute to WooCommerce.', 'woocommerce' ), 'https://github.com/woothemes/woocommerce/blob/master/CONTRIBUTING.md' ); ?>

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

Translate WooCommerce.', 'woocommerce' ), 'https://www.transifex.com/projects/p/woocommerce/' ); ?>

' . $contributor . ', ' ); } */ ?>

ABSOLUTE_Web, AIRoman, ANNEMARIEDEHAAN11, Abdumejid, Adam_Bajer, AeAdawi, Aerendir, Ahmed_Na, AlexSunnO, Aliom, Almaz, Ana_Sofia_Figueiredo, Andriy.Gusak, AngeloLazzari, Anne19, Apelsinova, ArtGoddess, Ashleyking, AslanDoma, Axium, BaronAndrea, Bhuvanendran, Bitly, BlackJad, Bogusław, CVSz, Chaos, Chea, Clausen, Closemarketing, CoachBirgit, CodeSupply, Compute, CreativeAngels, DAJOHH, DJIO, DNCTrung, Dandebortoli, DanielDoinitsin, Davidinosuper, Didierjr, Dimis13, Dmitrijb3, Dorawiniweb, Ekushey, EmilEriksen, Ewald, Falk, FaniDesign, Fdu4, Flobin, Flums, FrancoBaccarini, FrederikRS, Fredev, GabrielGil, GeertDD, Gerelywave, GhiMax, Gonzalez74, Graffen, Graya, Griga_M, Grześ, GsC.Servers, Gustavogcps, Gyan, HanySamir, Harmke, HelgaRakel, Ian_Razwadowski, JKKim, Jacobo91, JamesIng, Janjaapvandijk, JapanStaff, JoakimAndersen, Joao_Ernani_A_Costa_Jr, Joeri, JohnRevel, Josebash, KennethJ, Kiba_No_Ou, Kind, Komarovski, LUCIANO19731973, LaraPinheiros, Lazybadger, Leones, LeviMoore, M.Mellet, MPV3, MadkingWebDesign, MajaM, Maris, Mastersky, MennStudio, MichalStarybrat, Miefos, Miodrag018, MondayStar, Moo, Morten, Mourid, NANARUIZS1989, Nael.Marcos, NeoTrafy, Nettpilot, Networe, OBenned, OttNorml, OxygenPlus, PSmolic, Pal74, PanglimaKumbang, PhantasyPhockPhaze, Piotr_D, Piotrek290, Promosnet, Pytlas, Rai, RaivisKa, Rakhmanov, RealFugu, Rhys, RicaNeaga, Ricky1990, RistoNiinemets, Rudimidtgaard, Samf, SamuelMunch, Sasni, Se7enTime, SeaBiz, Seonxue, SergeyBiryukov, Shimlesha, SilverXp, SinisaMFS, SkyHiRider, Sluca, SzLegradi, Tarantulo, TeoThemes, Thalitapinheiro, TheBags, TheJoe, TheNominated, ThemeBoy, ThomasHjorth, TomiToivio, TopOSScz, Triheads, Truerick, TungLampham, Updulah, UrgentTranslation, VIPnett, Vaclad, VaporsBazar.Com, Vinci, Violyne, Virtualview, WebArt.es, Wen89, Wonderm00n, WordCommerce, Zouza, Zuige, a.khanamiryan, aOOn, abdmc, abouolia, adiuvo, ahmedbadawy, akmalff, akorsar, alaa13212, alaershov, albook55, alichani, aljs, almapugaa, alvarogois, amatos, amilosavljevic09, amisfranky, amitgilad, anabelle, anakarenjiina, andercola, andizajn, andres.chavez23, andrey.lima.ramos, andygi, angel_ruiz, anma2308, anope, anotherkaz, arcuza, arhipaiva, arielk, aroland.hu, artprojectgroup, artur.prip, aruffini, asapvaleriy, asger2905, audilu, aureliash, avarx, axdil, badsha_eee, badushich, bafakos, banned, baobinh152, barrykooij, belal, ben39276, bergslay, bestariweb.studio, biromax, blaagnu, blackieA, bluecafe, bohoejgaard, bombermidia, bornforlogic, br0ken, brankoturk, bulgarian, bumbon4ik, busic, cadoo, cafevn, caititu, calkut, calvares, canohincapie, capouvrage, carletto0282, cassim, cdevreugd, cegomez, cglaudel, chatzeiliadis, chelling, chrdesigner, claudiosmweb, claudiuiancic, clausRO, clausewitz45, coenjacobs, colibriinteractive, cool2014, corsonr, cotorusso, cpelham, creativejuiz, cris701, cristi.dbr, cserlevente, culkman, dabodude, dacthang1991, dajia, danielp, danieltehnix, danitag78, dannie.haui, danon2, darudar, davor.padovan, dawydo, deckerweb, deepinsource, dekaru, delitestudio, denarefyev, denchev, dencog, dhikkay14, dickysun, didikpri, difreo, dima.budzin, disaada, discipulorajiv2015, dix.alex, djarzyna, doorbook, drorbek, drosendo, dualcore, dudlaj, duniadapur, dyrer, dzonivejin, e01, ecacreator, ecom24h, eculeus, edea, eduardoarandah, eezhal92, egill, elct9620, elixer, ellena, elwins, embuck, emidiobattipaglia, endestaque, endomenec, ernexto, espellcaste, essamsaad, esspressions, estebanburgos, eugenpaun_ro, evanildobarros, exlil, extradragon, fabiobraga.eucaristos, fabyc, fantasy1612, fauzie, fdaciuk, felipersilva, finnes, flyingoff, fnalescio, fquantium, francesco.dicandia, francispio, fredcar12, fridata, funmist, fxbenard, gabejshn, gaspas, geerthoekzema, genipauba, george_pt, ghealf, giani, gilmarsilvadf, gingermig, givitis, glamour, globalaperta, goasdoué, goksy973, gonzunigad, gopress.co.il, gordon168, gorenc.mirko, greenbee, greencore, greguly, gugaalves, guilhermecan, guxin, hacku, hafizero, hamalah, hangga, hannit, haruman, hasanhalabi, hegerworld, helio17, henryk.ibemeinhardt, hermanudin, hermit096, heschin, hfelipe, hhaawwaa, hildago, hisoka512, hnik.martin, hoathienthao, hrich, hugosigaud, huy.ng, huytuduy, iadmir, iagomelanias, ideapress, ideodora, idofri, ihamed, ikadar, ilan256, imSuhaib, imranshahryar, in5arts, inceptive, inesek, inlaand, inpsyde, ironist, irsyadzaki, ishay1999, israel.cefrin, itsameyer, itws, ivy04, iwocs, izzuddinfz, jameskoster, jamesrod29, jeanfsanto, jeanmichell, jeff2ma, jeniya5149, jffelix, jhassler, jhn_rustan, jhovel, jigge, jimconstas, jimkakaz, jims, jlgd, jluisfreitas, joelbal, joesadaeng, joesalty, johny.raid, jolish, josefreitas2, joseluis, josh_marom, joy.doctor, jpBenfica, jsparic, jugmar, jujjer, junedzhan, jungchang, justina_ba, jvissup, kammabranding, kampit, karama89, karistuck, katakutu, keller2.m, kenessar, kevinnguyen, keysuck, khalil.delavaran, kikarina, kikehz, kissmyarch, kjergaardgraphic, kjosenet, klemonnier, konglehong, kornienko, kouteki, kraudio, kreatik, krzysko, kubik999, kweekarius, kyanuj, labdav, laco_, lahiponeja, lamibo, laszlo.espadas, laurbb, lemonthirst, limekex, lincw, lingfeng, linnetoglaursen, liorfeld, lobom, long.run.international, lopescmauro, louiseana, lubalee, lucasfreitas, lucaso, luciferbui, lucky_sevenf, luismcafe, luisrull, lukharb, lumigam, m.cekutis, m1k3lm, maateuszt, maayehkhaled, macbluy, madebyh, madswidding, manuelvillagrdo, marc.andressen, marciotoledo, marcos.nascimento, marcosof, marcozink, mariosbekatoros, marioscrafts, markonikolic, maros336, martian36, martinezmr, martinproject, math_beck, maticer, mattyza, mausimao, maxlam, mazrobby, mcortizo, me2you, megamak, mehdikhatiri, mekom, meryjoearmstrong, metallicamu, mgsolipa, mhmithu, michaeltieso, michalvittek, michelle_zhang, mikaeldui, mikejolley, mikseris1001, milord, minima, minimalstudio, mireczech, mirkowhat, mjepson, mktunited, mo3aser, mobarak, mobiletalk, mod7, modularte, mojtabashahi, molfar, monferro, monsterporing, moodingaway, moon.modena, mortifactor, moss66, mostafizur, mruizoea, mspapadopoulou, mucheroni, muhammetayten, mul14, muratbutun, mustafamsy, mylene, mylowebdesign, nabil_kadimi, namanh, nazar.y92, nbrites, nelblack, nellsavedra, neno0999, neskanu, ng3but, nicolasleon, niels.heijman, nielsen01, njevdjo, nneo, nodarik, nopphan, nsitbon, nttcreative, nvhcuong, ocarol, ocean90, octordigital, od3n, oisie, okudo, olavosimas, olmo, openstream, openvillage, optimuswebsites, orlandobp31, oropesa, pabambino, paletta, paoloalbera, parinya, pastynko, patjun, patrickheiloo, paulgor, paulofioratti, pavlina25, pcepo1987, pdb, peboom, peepe, peetjay, peggywilman, perdersongedal, persianwoocommerce, petebig182, pfrankov, phamdinhdo, pindi, pixolin, pksupply, plaguna, platzh1rsch, playseebow, podlebar, porclick, potgieterg, ppv1979, prepu, primecore, pulanito, puny, qisago, quickbrown, quocanhcgd, rabas.marek, radovanovic3, rafaelfunchal, rafalwolak, ragulka, rahmatilham, raininho, raivis, ramoonus, razorfish79, rbrock, rcovarru, read1, renatofrota, ricardoreis, richardshaylor, rickbauck, rickbronkhorst, rickserrat, rics, ridhoyp, ringi, rizqyhi, rkrizanovskis, rociovaldivia, rocketeer76, rodrigoprior, roidayan, rolfbastiaans, ronshe, rot13, rozumno, rpetkov, rsalafi, rsdkrasen, rvoogdgeert, rwahmao, s0w4, saharj_niksirat, sajjadsalehi, samirbridi, scottaheinrich, scottbasgaard, sebastian.quagliano, selakarweb, sennbrink, senormunoz, sergii.s, sergiomiranda, sergiubagrin, serpav, shady55, shopnel, shoresh319, sima3110, simon.saavedra, sindri, sipostibor.x, sirdaniel, sistemashbs, sixsigma, slasher.art, smartdatasoft, smeier, snaever, snowre, snsnjsn, softkleen, soldier99, sovichet, srpski.dizajn, st025, standoutmedia, stena79, stephaNNb, stgoos, studionetting, stuk88, suifengtec, sukruozge, sumodirjo, supermelann, supertommi, sverrirp, svetrov, svinuesa, sweman, swissky, swoboda, syao.pin, sylvie_janssens, szemcse75, t4rv1, tadeubrasil, tamarazuk, tamvo, tanin, tarikcayir, teddyostergaard, temayra, teotonioricardo, tetsu, thanet, the_fafa, thiagolovatine, thien321091, thvvieira, tinaswelt, tinygiantstudios, tivnet, tntc1978, toblues, tofuSCHNITZEL, tohaitrieu, tomasha, tomboersma, tonz, torbenlundsgaard, trinhquocviet, tshowhey, tszming, tue.holm, tukangbajaksawah, tupeg, tuzka, twisted_tits, uah, urioste, uworx, vaans.freire, vagnerlima, valurthorgunnarsson, vanbo, vburlak, ventruero, vernandosimbolon, vestimir, viamarket, viancu, viidar, viktorhanacek, vinoddalvi, visionreklama, vitivs, vitrinebol1, vlinicx, vrielance, vrnagy, vrozkovec, vvee, w4advn, wachirakorn, wady85, wasim, wasley, weal, webby1973, wicaksono, willemsiebe, winnieji, woodyln, woorockets, wpsk, wtrans, xdosil, xepin, xeviscc, xevivb, xuanlt, y12studio, yuhuhack, zaantar, zanguanga, zedejose, zekule, zhihus, zion.trooper, zodiac1978, zolee1, Натали

get_contributors(); if ( empty( $contributors ) ) { return ''; } $contributor_list = ''; return $contributor_list; } /** * Retrieve list of contributors from GitHub. * * @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, HOUR_IN_SECONDS ); 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 ( WC_Admin_Notices::has_notice( 'install' ) || WC_Admin_Notices::has_notice( 'update' ) ) { 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'] ) || ( ! empty( $_GET['page'] ) && $_GET['page'] === 'wc-about' ) ) { return; } wp_redirect( admin_url( 'index.php?page=wc-about' ) ); exit; } } new WC_Admin_Welcome();