WC

Main instance of WooCommerce.

Description

WC(); 

Returns the main instance of WC to prevent the need to use globals.


Usage

  1. if ( !function_exists( 'WC' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/woocommerce.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = WC(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/woocommerce.php  
  1. function WC() { 
  2. return WooCommerce::instance();