Your IP : 127.0.0.1


Current Path : /home/dev2.destoffenstraat.com/app/code/Swissup/FirecheckoutIntegrations/Helper/
Upload File :
Current File : /home/dev2.destoffenstraat.com/app/code/Swissup/FirecheckoutIntegrations/Helper/GiftOptions.php

<?php

namespace Swissup\FirecheckoutIntegrations\Helper;

use Magento\Framework\App\Helper\AbstractHelper;

class GiftOptions extends AbstractHelper
{
    /**
     * @return boolean
     */
    public function isDisabled()
    {
        return $this->isPerOrderDisabled() && $this->isPerItemDisabled();
    }

    /**
     * @return boolean
     */
    public function isPerOrderDisabled()
    {
        return !$this->scopeConfig->getValue(
            'sales/gift_options/allow_order',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        ) && !$this->scopeConfig->getValue(
            'sales/gift_options/wrapping_allow_order',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        );
    }

    /**
     * @return boolean
     */
    public function isPerItemDisabled()
    {
        return !$this->scopeConfig->getValue(
            'sales/gift_options/allow_items',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        ) && !$this->scopeConfig->getValue(
            'sales/gift_options/wrapping_allow_items',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        );
    }
}