WooCommerce::instance()
Main WooCommerce Instance.
Ensures only one instance of WooCommerce is loaded or can be loaded.
Method of the class: WooCommerce{}
No Hooks.
Return
WooCommerce
. - Main instance.
Usage
$result = WooCommerce::instance();
Notes
- See: WC()
Changelog
Since 2.1 | Introduced. |
WooCommerce::instance() WooCommerce::instance code WC 9.2.3
public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; }