WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Vendor\League\Container

Container::defaultToShared() public WC 1.0

Whether the container should default to defining shared definitions.

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

No Hooks.

Return

self.

Usage

$Container = new Container();
$Container->defaultToShared( $shared ) : ContainerInterface;
$shared *(true false)*

Default: true

Code of Container::defaultToShared() WC 5.7.1

public function defaultToShared(bool $shared = true) : ContainerInterface
{
    $this->defaultToShared = $shared;

    return $this;
}