Stripe: 'updateProduct' can't set active to false

Keeping the ‘active’ checkbox in the ‘Update Product’ stripe action doesn’t set the product to inactive.

How to reproduce:

  1. Create update product stripe action in a server action
  2. Make sure the ‘Active’ checkbox is unchecked
  3. Result is:

    (Also checked in the stripe dashboard, the product is still active)

How to fix manually in code view:

  1. When you uncheck the checkbox in the ui, there’s no “active”: “false”
  2. Fix by adding this line manually in code view:

According to the screen tip on the Create Product, Active defaults to ‘true’.

As @karh pointed out, this makes it difficult to update a product to make it inactive or archive it because the logic of it being defaulted to ‘true’ if unchecked and not being able to make it dynamic sets the value as permanently ‘true’ unless you do something like what was suggested here.

Stripe does not allow a product to be deleted if a price has been associated with it, so the only recourse is to archive it by making it inactive.

The Stripe Create Prices and Stripe Update Prices have the same issue as above as would any other Stripe component where the Active is a checkbox in the Server Connect Properties.

Additionally, the “Shippable” checkbox in the Create Product and Update Product should be dynamic as well along with the “Type”. Having these hard coded in this manner means that we need to create a new API or conditional API for every combination of products/services.

I saw the discussion at Stripe - can we dynamically enable options? but I am not clear as to why it would not be possible to make at least this one dynamic in some fasion because products, prices, and probably other aspects of Stripe will be active at times and inactive at other times.

This can be done manually using the Stripe API, but I enjoy using Wappler too much to want to have to do it myself. :slight_smile:

1 Like

Fixed in Wappler 6.4.1

This topic was automatically closed after 46 hours. New replies are no longer allowed.