DeprecatedVariables

Type
Trait
Namespace
craft\commerce\plugin
Implemented by
craft\commerce\Plugin
Since
2.0

Trait Deprecated Variables

View source (opens new window)

# Public Methods

Method Description
getAvailableShippingMethods() Returns all available shipping methods for the current cart.
getCart() Returns the current Cart.
getCountriesList() Return an array of country names, indexed by ID.
getCustomer() Returns the current customer.
getDiscountByCode() Returns a discount by its code.
getPrimaryPaymentCurrency() Returns the primary payment currency.
getStatesArray() Returns a 2D array of state names indexed by state ids, grouped by country ids.

# getAvailableShippingMethods()

DEPRECATED

Deprecated as of 2.0

Returns all available shipping methods for the current cart.

View source (opens new window)

Returns

array (opens new window)

# getCart()

DEPRECATED

Deprecated as of 2.0

Returns the current Cart.

View source (opens new window)

Returns

craft\commerce\elements\Order

# getCountriesList()

DEPRECATED

Deprecated as of 2.0

Return an array of country names, indexed by ID.

View source (opens new window)

Returns

array (opens new window) – [id => name]

# getCustomer()

DEPRECATED

Deprecated as of 2.0

Returns the current customer.

View source (opens new window)

Returns

craft\commerce\models\Customer

# getDiscountByCode()

DEPRECATED

Deprecated as of 2.0

Returns a discount by its code.

View source (opens new window)

Arguments

Returns

craft\commerce\models\Discount, null (opens new window)

# getPrimaryPaymentCurrency()

DEPRECATED

Deprecated as of 2.0

Returns the primary payment currency.

View source (opens new window)

Returns

craft\commerce\models\PaymentCurrency, null (opens new window)

# getStatesArray()

DEPRECATED

Deprecated as of 2.0

Returns a 2D array of state names indexed by state ids, grouped by country ids.

View source (opens new window)

Returns

array (opens new window) – [countryId => [id => name]]