- Lunar version: 1.2.1
- Laravel Version: 12.42.0
- PHP Version: 8.3.28
- Database Driver & Version: MySQL 8.0.37
Expected Behaviour:
When creating a product and its related variants, the weight_unit field should default to a valid weight measurement unit, such as kg, g, or lbs.
Actual Behaviour:
When a product variant is created, the weight_unit field is automatically set to mm by default in the database.
mm is a length unit, not a weight unit, which leads to incorrect or inconsistent behavior when weight-based logic (e.g. shipping rates, weight calculations) is applied.
Steps To Reproduce:
- Create a new product in the Lunar admin panel..
- Check the database record for the created product variant.
- Observe that
weight_unit is set to mm by default.