Defining a Shipping Method Cost #1011
-
Hi I've just created a shipping method which created a php file. Where and how can I define the cost of this shipping method? |
Beta Was this translation helpful? Give feedback.
Answered by
duncanmcclean
Feb 13, 2024
Replies: 1 comment 1 reply
-
You can do it in the public function calculateCost(Order $order): int
{
return 500;
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
joybcode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do it in the
calculateCost
method, as per the docs. For example, for a £5 shipping cost, you'd do this (you need to return the amount in pence/cents).