0

how to get shipping method carrier code as $rate->getCarrier() from quote.

1 Answer 1

1

check this code

$shippingMethod = $quote->getShippingAddress()->getShippingMethod();

$shippingMethodArr = explode('_', $shippingMethod);

$carrierCode = $shippingMethodArr[0];
2
  • thank you working for me Commented Mar 30, 2023 at 6:55
  • You're very welcome! I'm happy to help
    – Harun
    Commented Mar 30, 2023 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.