Update product attribute based on product ID.

If the attribute for the product does not exist, it will be added.


  • Full name: update_product_attribute
  • Defined in: cms/core/Shared/Helpers/product.php

Parameters

Parameter Type Description
$productId string Product ID.
$key string Attribute key.
$value mixed Attribute value. Must be serializable if non-scalar.

Return Value

\App\Infrastructure\Services\Attribute\AttributeBag