public function __construct() { $this->enabled = wc_shipping_enabled(); if ($this->enabled) { $this->init(); } }