當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WC_Install::install方法代碼示例

本文整理匯總了PHP中WC_Install::install方法的典型用法代碼示例。如果您正苦於以下問題:PHP WC_Install::install方法的具體用法?PHP WC_Install::install怎麽用?PHP WC_Install::install使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WC_Install的用法示例。


在下文中一共展示了WC_Install::install方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _install_wc

function _install_wc()
{
    WC_Install::install();
    update_option('woocommerce_calc_shipping', 'yes');
    // Needed for tests cart and shipping methods
    // reload capabilities after install, see https://core.trac.wordpress.org/ticket/28374
    $GLOBALS['wp_roles']->reinit();
}
開發者ID:helgatheviking,項目名稱:woocommerce-multilingual,代碼行數:8,代碼來源:bootstrap.php

示例2: _setup_theme

function _setup_theme()
{
    define('WP_UNINSTALL_PLUGIN', true);
    update_option('woocommerce_status_options', array('uninstall_data' => 1));
    include dirname(__FILE__) . '/../vendor/woocommerce/uninstall.php';
    WC_Install::install();
    $GLOBALS['wp_roles']->reinit();
    echo "Installing WooCommerce..." . PHP_EOL;
}
開發者ID:10up,項目名稱:elasticpress,代碼行數:9,代碼來源:bootstrap.php

示例3: setup

 public function setup()
 {
     update_option('woocommerce_taxjar-integration_settings', array('api_token' => $this->api_token, 'enabled' => 'yes', 'taxjar_download' => 'yes', 'store_zip' => '80111', 'store_city' => 'Greenwood Village', 'debug' => 'yes'));
     update_option('woocommerce_default_country', 'US:CO');
     update_option('woocommerce_calc_shipping', 'yes');
     $wc_install = new WC_Install();
     $wc_install->install();
     do_action('plugins_loaded');
 }
開發者ID:JustinSainton,項目名稱:taxjar-woocommerce-plugin,代碼行數:9,代碼來源:bootstrap.php

示例4: test_install

 /**
  * Test - install
  */
 public function test_install()
 {
     // clean existing install first
     if (!defined('WP_UNINSTALL_PLUGIN')) {
         define('WP_UNINSTALL_PLUGIN', true);
     }
     include dirname(dirname(dirname(dirname(__FILE__)))) . '/uninstall.php';
     \WC_Install::install();
     $this->assertTrue(get_option('woocommerce_version') === WC()->version);
 }
開發者ID:nightbook,項目名稱:woocommerce,代碼行數:13,代碼來源:install.php

示例5: install_wc

 /**
  * Install WooCommerce after the test environment and WC have been loaded
  *
  * @since 2.2
  */
 public function install_wc()
 {
     // clean existing install first
     define('WP_UNINSTALL_PLUGIN', true);
     include $this->plugin_dir . '/uninstall.php';
     WC_Install::install();
     // reload capabilities after install, see https://core.trac.wordpress.org/ticket/28374
     $GLOBALS['wp_roles']->reinit();
     echo "Installing WooCommerce..." . PHP_EOL;
 }
開發者ID:nathanielks,項目名稱:woocommerce,代碼行數:15,代碼來源:bootstrap.php

示例6: install_wc

 /**
  * Install WooCommerce after the test environment and WC have been loaded
  *
  * @since 2.2
  */
 public function install_wc()
 {
     // clean existing install first
     define('WP_UNINSTALL_PLUGIN', true);
     include $this->plugin_dir . '/uninstall.php';
     WC_Install::install();
     update_option('woocommerce_calc_shipping', 'yes');
     // Needed for tests cart and shipping methods
     // reload capabilities after install, see https://core.trac.wordpress.org/ticket/28374
     $GLOBALS['wp_roles']->reinit();
     echo "Installing WooCommerce..." . PHP_EOL;
 }
開發者ID:haltaction,項目名稱:woocommerce,代碼行數:17,代碼來源:bootstrap.php


注:本文中的WC_Install::install方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。