Error.php 579 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Quote\Model\Quote\Address\RateResult;
  7. class Error extends AbstractResult
  8. {
  9. /**
  10. * @return mixed
  11. */
  12. public function getErrorMessage()
  13. {
  14. if (!$this->getData('error_message')) {
  15. $this->setData(
  16. 'error_message',
  17. __('This shipping method is not available. To use this shipping method, please contact us.')
  18. );
  19. }
  20. return $this->getData('error_message');
  21. }
  22. }