Skip to content

Inactive product created via API should not be added to wishlist via Shop API #587

Description

@harshit-webkul

Describe the bug
After creating a product using the Admin Create Product API, the product is set to Inactive by default.
However, when attempting to add this inactive product to the customer wishlist using the Shop Wishlist API, the product is still added successfully.
Inactive products should not be eligible for wishlist actions.

To Reproduce
Steps to Reproduce:

  1. Create a product using the Admin → Create Product API.
  2. Verify that the product status is Inactive.
  3. Call the Shop → Add to Wishlist API with the created product ID.
  4. Check the API response and wishlist items.

Expected Result:

  • The Shop Wishlist API should prevent adding inactive products.
    -API should return a proper validation/error message such as:
    "Product is inactive and cannot be added to wishlist."

Actual Result:

Inactive product is added successfully to the wishlist.
API returns a success response.

Screenshots:

Image

id: 306
inactive product

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions