当前位置: 首页>>代码示例>>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;未经允许,请勿转载。