WooCommerce Code Reference
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hook Reference
  • WooCommerce Docs
  • REST API Docs

Packages

  • None
  • WooCommerce
    • Abstracts
    • Admin
      • Customize
      • Functions
      • Importers
      • Meta
      • Reports
      • System
    • API
    • Classes
      • Data
        • Store
      • Emails
      • Embed
      • Integrations
      • Interfaces
      • Log
        • Handlers
      • Payment
      • Products
      • Shipping
      • Walkers
    • Export
    • Functions
    • Import
    • l10n
    • PaymentTokens
    • PayPal
    • Shortcodes
      • Cart
      • Checkout
      • My
        • Account
      • Order
        • Tracking
    • Webhooks
    • Widgets
  • WP-Background-Processing

Classes

  • Abstract_WC_Order_Data_Store_CPT
  • WC_Abstract_Order
  • WC_AJAX
  • WC_Autoloader
  • WC_Background_Emailer
  • WC_Background_Process
  • WC_Background_Updater
  • WC_Breadcrumb
  • WC_Cache_Helper
  • WC_Cart
  • WC_Cart_Fees
  • WC_Cart_Session
  • WC_Cart_Totals
  • WC_Checkout
  • WC_Coupon
  • WC_Customer
  • WC_Customer_Download
  • WC_Customer_Download_Log
  • WC_DateTime
  • WC_Discounts
  • WC_Download_Handler
  • WC_Geo_IP
  • WC_Geo_IP_Record
  • WC_Geolocation
  • WC_HTTPS
  • WC_Install
  • WC_Legacy_Cart
  • WC_Legacy_Coupon
  • WC_Legacy_Customer
  • WC_Legacy_Payment_Token
  • WC_Legacy_Shipping_Zone
  • WC_Legacy_Webhook
  • WC_Log_Levels
  • WC_Logger
  • WC_Order
  • WC_Order_Data_Store_CPT
  • WC_Order_Factory
  • WC_Order_Item
  • WC_Order_Item_Coupon
  • WC_Order_Item_Fee
  • WC_Order_Item_Meta
  • WC_Order_Item_Product
  • WC_Order_Item_Shipping
  • WC_Order_Item_Tax
  • WC_Order_Query
  • WC_Order_Refund
  • WC_Payment_Gateway_CC
  • WC_Payment_Gateway_eCheck
  • WC_Payment_Tokens
  • WC_Product_Attribute
  • WC_Product_Data_Store_CPT
  • WC_Product_Download
  • WC_Product_Factory
  • WC_Product_Query
  • WC_Product_Variable_Data_Store_CPT
  • WC_Product_Variation
  • WC_Query
  • WC_Regenerate_Images
  • WC_Regenerate_Images_Request
  • WC_Register_WP_Admin_Settings
  • WC_Session_Handler
  • WC_Shipping_Zone
  • WC_Shipping_Zones
  • WC_Shortcodes
  • WC_Structured_Data
  • WC_Tax
  • WC_Template_Loader
  • WC_Tracker
  • WC_Twenty_Eleven
  • WC_Twenty_Fifteen
  • WC_Twenty_Fourteen
  • WC_Twenty_Seventeen
  • WC_Twenty_Sixteen
  • WC_Twenty_Ten
  • WC_Twenty_Thirteen
  • WC_Twenty_Twelve
  • WC_Validation

Class WC_Install

WC_Install Class.

Package: WooCommerce\Classes
Author: WooThemes
Located at class-wc-install.php

Methods summary

public static
# init( )

Hook in tabs.

Hook in tabs.

public static
# init_background_updater( )

Init background updates

Init background updates

public static
# check_version( )

Check WooCommerce version and run the updater is required.

Check WooCommerce version and run the updater is required.

This check is done on all requests and runs if the versions do not match.

public static
# install_actions( )

Install actions when a update button is clicked within the admin area.

Install actions when a update button is clicked within the admin area.

This function is hooked into admin_init to affect admin only.

public static
# install( )

Install WC.

Install WC.

public static array
# get_db_update_callbacks( )

Get list of DB update callbacks.

Get list of DB update callbacks.

Returns

array

Since

3.0.0
public static
# update_db_version( string|null $version = null )

Update DB version to current.

Update DB version to current.

Parameters

$version
New WooCommerce DB version or null.
public static array
# cron_schedules( array $schedules )

Add more cron schedules.

Add more cron schedules.

Parameters

$schedules
List of WP scheduled cron jobs.

Returns

array
public static
# create_pages( )

Create pages that the plugin relies on, storing page IDs in variables.

Create pages that the plugin relies on, storing page IDs in variables.

public static
# create_terms( )

Add the default terms for WC taxonomies - product types and order statuses. Modify this at your own risk.

Add the default terms for WC taxonomies - product types and order statuses. Modify this at your own risk.

public static
# create_roles( )

Create roles and capabilities.

Create roles and capabilities.

public static
# remove_roles( )

Remove WooCommerce roles.

Remove WooCommerce roles.

public static array
# plugin_action_links( mixed $links )

Show action links on the plugin screen.

Show action links on the plugin screen.

Parameters

$links
Plugin Action links.

Returns

array
public static array
# plugin_row_meta( mixed $links, mixed $file )

Show row meta on the plugin screen.

Show row meta on the plugin screen.

Parameters

$links
Plugin Row Meta.
$file
Plugin Base file.

Returns

array
public static string[]
# wpmu_drop_tables( array $tables )

Uninstall tables when MU blog is deleted.

Uninstall tables when MU blog is deleted.

Parameters

$tables
List of tables that will be deleted by WP.

Returns

string[]
public static
# background_installer( string $plugin_to_install_id, array $plugin_to_install )

Install a plugin from .org in the background via a cron job (used by installer - opt in).

Install a plugin from .org in the background via a cron job (used by installer - opt in).

Parameters

$plugin_to_install_id
Plugin ID.
$plugin_to_install
Plugin information.

Throws

Exception
If unable to proceed with plugin installation.

Since

2.6.0
public static
# theme_background_installer( string $theme_slug )

Install a theme from .org in the background via a cron job (used by installer - opt in).

Install a theme from .org in the background via a cron job (used by installer - opt in).

Parameters

$theme_slug
Theme slug.

Throws

Exception
If unable to proceed with theme installation.

Since

3.1.0
WooCommerce Code Reference API documentation generated by ApiGen