wc_get_container()
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.
Returns
\Automattic\WooCommerce\Container. The WooCommerce object container.
Usage
wc_get_container();
Changelog
| Since 4.4.0 | Introduced. |
wc_get_container() wc get container code WC 10.6.2
function wc_get_container() {
return $GLOBALS['wc_container'];
}