wc_get_container()WC 4.4.0

Returns the WooCommerce object container. Code in the includes directory should use the container to get instances of classes in the src directory.

No Hooks.

Return

\Automattic\WooCommerce\Container. The WooCommerce object container.

Usage

wc_get_container();

Changelog

Since 4.4.0 Introduced.

wc_get_container() code WC 8.7.0

function wc_get_container() {
	return $GLOBALS['wc_container'];
}