Kooboo.Commerce.Shipping.ShippingMethodService.Enable C# (CSharp) Method

Enable() public method

public Enable ( ShippingMethod method ) : bool
method ShippingMethod
return bool
        public bool Enable(ShippingMethod method)
        {
            if (method.IsEnabled)
            {
                return false;
            }

            method.IsEnabled = true;
            _repository.Database.SaveChanges();

            Event.Raise(new ShippingMethodEnabled(method), _instance);

            return true;
        }