Check if a price is resolved for setUnitPrice() in CartAddResource::process() before inserting

Created on 1 August 2023, over 1 year ago
Updated 11 August 2023, over 1 year ago

We need to fix the following error message:
Drupal\\commerce_order\\Entity\\OrderItem::setUnitPrice(): Argument #1 ($unit_price) must be of type Drupal\\commerce_price\\Price, null given, called in /var/www/html/web/modules/contrib/commerce_api/src/Resource/CartAddResource.php on line 125
To do this we need to check if the price is resolved before we insert it.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇺🇦Ukraine marchuk.vitaliy Rivne, UA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024