OrderValidatorsTrait

Type
Trait
Namespace
craft\commerce\elements\traits
Implemented by
craft\commerce\elements\Order

View source (opens new window)

# Public Properties

Property Description
this craft\commerce\elements\Order

# this

Type
craft\commerce\elements\Order
Default value
null

View source (opens new window)

# Public Methods

Method Description
validateAddress() Validates addresses, and also adds prefixed validation errors to order
validateAddressCanBeUsed() Validates that an address belongs to the order‘s customer.
validateAddressReuse() Validates that shipping address isn't being set to be the same as billing address, when billing address is set to be shipping address
validateCouponCode()
validateGatewayId()
validateLineItems() Validates line items, and also adds prefixed validation errors to order
validatePaymentCurrency()
validatePaymentSourceId()

# validateAddress()

Validates addresses, and also adds prefixed validation errors to order

View source (opens new window)

Arguments

# validateAddressCanBeUsed()

Validates that an address belongs to the order‘s customer.

View source (opens new window)

Arguments

# validateAddressReuse()

Validates that shipping address isn't being set to be the same as billing address, when billing address is set to be shipping address

View source (opens new window)

Arguments

# validateCouponCode()

View source (opens new window)

Arguments

  • $attribute

# validateGatewayId()

View source (opens new window)

Arguments

# validateLineItems()

Validates line items, and also adds prefixed validation errors to order

View source (opens new window)

Arguments

# validatePaymentCurrency()

View source (opens new window)

Arguments

# validatePaymentSourceId()

View source (opens new window)

Arguments