I am trying to set the shipping merthod in programatically created orders to a custom shipping method, here is a sample of my code...

// ->setFax($shipping->getFax());


what am i doing wrong ?

1 Answer 1


You should set shipping method this way:

// Collect Rates and Set Shipping & Payment Method

Check this answer for whole order creation

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.