Skip to content

[5.x]: Stock does not save the first time after creating new product variant #15687

@WHITE-developer

Description

@WHITE-developer

What happened?

Description

When creating a new product variant and directly adding stock to it. It does not save the stock the first time.

Steps to reproduce

  1. Go to a product
  2. Click on 'New Product variant'
  3. Turn on the 'Inventory' switch and directly set the stock to 1
  4. Click on 'Create product variant'
  5. There are now changes made in the product entry, so click on 'Save and continue editing'
  6. After the reload, the stock of the newly created variant is back to 0 again.

Expected behavior

The stock in the newly created variant is saved correctly

Actual behavior

Craft CMS version

5.3.4

PHP version

8.3.8

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions