Automattic / newspack-blocks

Gutenberg blocks for the Newspack project.
207 stars 43 forks source link

fix: revert check for is product purchaseable #1924

Closed laurelfulford closed 1 month ago

laurelfulford commented 1 month ago

All Submissions:

Changes proposed in this Pull Request:

This PR reverts https://github.com/Automattic/newspack-blocks/pull/1916.

That change introduced some unintended consequences, like buttons not appearing once a reader had purchased the membership product they were selling.

This needs to be reworked to focus on the lack of price (the underlying issue), and not a generic "is purchasable" check because that's not quite the same thing -- I'll work on that in the RAS-ACC branch.

How to test the changes in this Pull Request:

  1. Apply the PR and run npm run build.
  2. Confirm you can add checkout button blocks, even for products without prices.
  3. Spot check against the code changes in https://github.com/Automattic/newspack-blocks/pull/1916.

Other information:

laurelfulford commented 1 month ago

Thanks @chickenn00dle! 🙌

matticbot commented 2 weeks ago

:tada: This PR is included in version 4.3.5-alpha.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

matticbot commented 1 week ago

:tada: This PR is included in version 4.3.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: