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.
Хуков нет.
Возвращает
\Automattic\WooCommerce\Container. The WooCommerce object container.
Использование
wc_get_container();
Список изменений
| С версии 4.4.0 | Введена. |
Код wc_get_container() wc get container WC 10.7.0
function wc_get_container() {
return $GLOBALS['wc_container'];
}