Retrieve product attribute for a product.
- Full name:
get_product_attribute - Defined in:
cms/core/Shared/Helpers/product.php
Parameters
| Parameter | Type | Description |
|---|---|---|
$productId |
string | Product ID. |
$key |
string | The attribute key to retrieve. |
$default |
mixed | Optional. Whether to return a single value. Default false. |
Return Value
mixed
Attribute value.