WordPress at Your Fingertips
function is not described

WC_Shipping::instance() public WC 2.1

Main WC_Shipping Instance.

Ensures only one instance of WC_Shipping is loaded or can be loaded.

{} It's a method of the class: WC_Shipping{}

No Hooks.

Return

WC_Shipping. Main instance

Usage

$result = WC_Shipping::instance();

Changelog

Since 2.1 Introduced.

Code of WC_Shipping::instance() WC 5.9.0

public static function instance() {
	if ( is_null( self::$_instance ) ) {
		self::$_instance = new self();
	}
	return self::$_instance;
}