1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- /**
- *
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Multishipping\Controller\Checkout;
- class Plugin
- {
- /**
- * @var \Magento\Checkout\Model\Cart
- */
- protected $cart;
- /**
- * @param \Magento\Checkout\Model\Cart $cart
- */
- public function __construct(\Magento\Checkout\Model\Cart $cart)
- {
- $this->cart = $cart;
- }
- /**
- * Disable multishipping
- *
- * @param \Magento\Framework\App\Action\Action $subject
- * @return void
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- */
- public function beforeExecute(\Magento\Framework\App\Action\Action $subject)
- {
- $this->cart->getQuote()->setIsMultiShipping(0);
- }
- }
|