Skip to content

Defining a Shipping Method Cost #1011

Closed Answered by duncanmcclean
joybcode asked this question in Help
Discussion options

You must be logged in to vote

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).

public function calculateCost(Order $order): int
{
    return 500;
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@joybcode
Comment options

Answer selected by joybcode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants