source/Application/Model/Basket.php
public function removeVoucher($sVoucherId)
    {
        // removing if it exists
        if (isset($this->_aVouchers[$sVoucherId])) {
            $oVoucher = oxNew(\OxidEsales\Eshop\Application\Model\Voucher::class);
            $oVoucher->load($sVoucherId);

            $oVoucher->unMarkAsReserved();

            // unset it if exists this voucher in DB or not
            unset($this->_aVouchers[$sVoucherId]);
            $this->onUpdate();
        }
    }
public function removeVoucher($sVoucherId)
    {
        // removing if it exists
        if (isset($this->_aVouchers[$sVoucherId])) {
            $oVoucher = oxNew(\OxidEsales\Eshop\Application\Model\Voucher::class);
            $oVoucher->load($sVoucherId);

            $oVoucher->unMarkAsReserved();

            // unset it if exists this voucher in DB or not
            unset($this->_aVouchers[$sVoucherId]);
            $this->onUpdate();
        }
    }
public function removeVoucher ( $ sVoucherId ) { // removing if it exists if ( isset ( $ this -> _aVouchers [ $ sVoucherId ] ) ) { $ oVoucher = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Voucher :: class ) ; $ oVoucher -> load ( $ sVoucherId ) ; $ oVoucher -> unMarkAsReserved ( ) ; // unset it if exists this voucher in DB or not unset ( $ this -> _aVouchers [ $ sVoucherId ] ) ; $ this -> onUpdate ( ) ; } }
Removes voucher from basket and unreserved it.

@param string $sVoucherId removable voucher ID
Removes voucher from basket and unreserved it .