WC_Install::install()
Install WC.
Method of the class: WC_Install{}
Hooks from the method
Return
null
. Nothing.
Usage
$result = WC_Install::install();
WC_Install::install() WC Install::install code WC 7.7.0
public static function install() { if ( ! is_blog_installed() ) { return; } // Check if we are not already running this routine. if ( self::is_installing() ) { return; } // If we made it till here nothing is running yet, lets set the transient now. set_transient( 'wc_installing', 'yes', MINUTE_IN_SECONDS * 10 ); wc_maybe_define_constant( 'WC_INSTALLING', true ); WC()->wpdb_table_fix(); self::remove_admin_notices(); self::create_tables(); self::verify_base_tables(); self::create_options(); self::migrate_options(); self::create_roles(); self::setup_environment(); self::create_terms(); self::create_cron_jobs(); self::delete_obsolete_notes(); self::create_files(); self::maybe_create_pages(); self::maybe_set_activation_transients(); self::set_paypal_standard_load_eligibility(); self::update_wc_version(); self::maybe_update_db_version(); delete_transient( 'wc_installing' ); // Use add_option() here to avoid overwriting this value with each // plugin version update. We base plugin age off of this value. add_option( 'woocommerce_admin_install_timestamp', time() ); /** * Flush the rewrite rules after install or update. * * @since 2.7.0 */ do_action( 'woocommerce_flush_rewrite_rules' ); /** * Run after WooCommerce has been installed or updated. * * @since 3.2.0 */ do_action( 'woocommerce_installed' ); /** * Run after WooCommerce Admin has been installed or updated. * * @since 6.5.0 */ do_action( 'woocommerce_admin_installed' ); }