/** * Check if widget is visible * * @return boolean */ protected function isVisible() { $result = parent::isVisible() && (Paypal\Main::isPaypalCreditEnabled() || Paypal\Main::isPaypalWPSEnabled()) && $this->isValidTarget() && $this->getPublisherId() && $this->getSetting('agreement'); if ($result) { $settingName = 'bannerOn' . ucfirst($this->getParam(static::PARAM_PAGE)); $result = $this->getParam(static::PARAM_POSITION) == $this->getSetting($settingName); } return $result; }