/**
  * Remove country request param from url
  *
  * @param \Magento\Backend\Block\Store\Switcher $subject
  * @param \Closure $proceed
  * @param string $route
  * @param array $params
  * @return string
  */
 public function aroundGetUrl(\Magento\Backend\Block\Store\Switcher $subject, \Closure $proceed, $route = '', $params = [])
 {
     if ($subject->getRequest()->getParam(\Magento\Paypal\Model\Config\StructurePlugin::REQUEST_PARAM_COUNTRY)) {
         $params[\Magento\Paypal\Model\Config\StructurePlugin::REQUEST_PARAM_COUNTRY] = null;
     }
     return $proceed($route, $params);
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function getRequest()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getRequest');
     if (!$pluginInfo) {
         return parent::getRequest();
     } else {
         return $this->___callPlugins('getRequest', func_get_args(), $pluginInfo);
     }
 }