Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/rss vs wc memberships #3146

Merged
merged 3 commits into from
Jun 4, 2024
Merged

Feat/rss vs wc memberships #3146

merged 3 commits into from
Jun 4, 2024

Conversation

adekbadek
Copy link
Member

@adekbadek adekbadek commented May 28, 2024

All Submissions:

Changes proposed in this Pull Request:

Adds an option to skip WC Memberships' content restrictions in RSS feeds. This is needed for publication which want to restrict content on the website, but still distribute it in news aggregation services.

Also, removes the WC Memberships meta box while editing an RSS feed, to avoid confusion.

How to test the changes in this Pull Request:

  1. Set up a WC Memberships plan with content restriction*
  2. Visit the /feed, observe that not whole post content is sent in the payload
  3. Go to WooCommerce -> Settings -> Memberships and enable the "Skip content restriction in RSS feeds" setting
  4. Refresh the feed, observe the full post content is available
  5. Enable the RSS module by running wp eval "\Newspack\Settings::activate_optional_module('rss');"
  6. Create or edit an RSS feed, observe there's no WP Membership meta box

* restrict all posts for ease of testing

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@adekbadek adekbadek added the [Status] Needs Review The issue or pull request needs to be reviewed label May 28, 2024
@adekbadek adekbadek requested a review from a team as a code owner May 28, 2024 19:52
Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving since this mostly works, but I was having some trouble that I'm not sure is due to my test site setup or something else:

  • On my local dev site, I had trouble getting my feeds to display full content instead of excerpts no matter which settings I enabled in WooCommerce Memberships settings or general WP > Reading settings.
  • On another test site, updates seem to take a few minutes to take effect. Probably expected since RSS feeds are only regenerated on an interval, right?

includes/plugins/wc-memberships/class-memberships.php Outdated Show resolved Hide resolved
@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels May 30, 2024
Co-authored-by: Derrick Koo <dkoo@users.noreply.github.com>
@adekbadek
Copy link
Member Author

On my local dev site, I had trouble getting my feeds to display full content instead of excerpts no matter which settings I enabled in WooCommerce Memberships settings or general WP > Reading settings.

To clarify, this only happened on a local dev site, but did not when testing on another test site?

updates seem to take a few minutes to take effect. Probably expected since RSS feeds are only regenerated on an interval, right?

In my testing the updates were not delayed. Perhaps some caching was in place on the site you've tested with?

@adekbadek adekbadek requested a review from dkoo June 3, 2024 06:59
@dkoo
Copy link
Contributor

dkoo commented Jun 3, 2024

To clarify, this only happened on a local dev site, but did not when testing on another test site?

That's right—since I didn't see it on a fresh test site, I think it's a peculiarity of my dev environment, but wanted to mention just in case we see it happen elsewhere after rollout.

@adekbadek adekbadek merged commit e649199 into trunk Jun 4, 2024
8 checks passed
@adekbadek adekbadek deleted the feat/rss-vs-wc-memberships branch June 4, 2024 07:09
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.2.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.2.0-epic-ia.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

dkoo pushed a commit that referenced this pull request Jun 11, 2024
* feat(rss): hide WC Memberships meta box when editing a feed
* feat(wc-memberships): allow to skip content restrictions in RSS feeds
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.4.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Jun 24, 2024
# [4.4.0-alpha.1](v4.3.3...v4.4.0-alpha.1) (2024-06-24)

### Bug Fixes

* add modified check before updating donation product ([#3183](#3183)) ([208c55e](208c55e))
* allow `exact` prop on Wizard Route ([9da6da9](9da6da9))
* ci / eslint ([1d6adcd](1d6adcd))
* ci / eslint ([b95580a](b95580a))
* ci / eslint ([beadc45](beadc45))
* ci / typescript ([2c1e092](2c1e092))
* circle ci / eslint ([ab74e90](ab74e90))
* circle ci / eslint ([4d383da](4d383da))
* circle ci / eslint ([6389972](6389972))
* load optional modules after settings ([#3165](#3165)) ([69cc5ac](69cc5ac))
* merge conflicts and various minor refactoring ([ca4fea8](ca4fea8))
* **pwa:** disable post request interception ([1587232](1587232))
* **reader-revenue-wizard:** separate billing fields section ([#3140](#3140)) ([41fb347](41fb347))
* remove icons import ([136a19a](136a19a))
* small tweaks to migrate-co-authors-guest-authors command ([2baa524](2baa524))
* text overflow ellipse ([d35df0b](d35df0b))

### Features

* add BoxContrast to components-demo ([23a8e5f](23a8e5f))
* add spinner to registration block submit button ([#3180](#3180)) ([ff1278f](ff1278f))
* added `<hr/>` between site status and quick action components ([982f67b](982f67b))
* added correct icon type to window.newspack_dashboard ([b5a5130](b5a5130))
* added dash card section components ([f9f3992](f9f3992))
* added quick actions component ([d37e3f3](d37e3f3))
* adding brand header and box-contrast component ([afb2e08](afb2e08))
* adding site status component ([ee01d09](ee01d09))
* applied PR feedback, error configuration ([7ef613e](7ef613e))
* boilerplate stylesheet for settings ([5f3f640](5f3f640))
* centralized wizards script initial ([6faf3d2](6faf3d2))
* dashboard & section initial ([eb3d1e6](eb3d1e6))
* dynamic component root loader ([389646a](389646a))
* icons ([5f3c740](5f3c740))
* initial app boilerplate ([9a3740c](9a3740c))
* initial settings and refactor ([d7d7da8](d7d7da8))
* **pwa:** pr feedback. moved anonymous function to static method ([1143a11](1143a11))
* RSS & WC Memberships ([#3146](#3146)) ([e649199](e649199))
* settings php initial ([e039c4b](e039c4b))
* **wizards:** new dashboard config and localize script ([2938b32](2938b32))

### Reverts

* **ia:** back to `trunk` ([69b2ba0](69b2ba0))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.4.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Jul 1, 2024
# [4.4.0](v4.3.4...v4.4.0) (2024-07-01)

### Bug Fixes

* add modified check before updating donation product ([#3183](#3183)) ([208c55e](208c55e))
* allow `exact` prop on Wizard Route ([9da6da9](9da6da9))
* ci / eslint ([1d6adcd](1d6adcd))
* ci / eslint ([b95580a](b95580a))
* ci / eslint ([beadc45](beadc45))
* ci / typescript ([2c1e092](2c1e092))
* circle ci / eslint ([ab74e90](ab74e90))
* circle ci / eslint ([4d383da](4d383da))
* circle ci / eslint ([6389972](6389972))
* **cli/migrate-co-authors-guest-authors:** handle existing email address ([#3172](#3172)) ([1946bd0](1946bd0))
* **js:** skip regenerator-runtime fix for some files ([#3205](#3205)) ([1ecfd11](1ecfd11))
* load optional modules after settings ([#3165](#3165)) ([69cc5ac](69cc5ac))
* merge conflicts and various minor refactoring ([ca4fea8](ca4fea8))
* **pwa:** disable post request interception ([1587232](1587232))
* **reader-revenue-wizard:** separate billing fields section ([#3140](#3140)) ([41fb347](41fb347))
* remove icons import ([136a19a](136a19a))
* small tweaks to migrate-co-authors-guest-authors command ([2baa524](2baa524))
* text overflow ellipse ([d35df0b](d35df0b))
* udpate package-lock.json ([0054142](0054142))
* update newspack-scripts to v5.5.1 ([be81e62](be81e62))
* update newspack-scripts to v5.5.1 ([896caab](896caab))

### Features

* add BoxContrast to components-demo ([23a8e5f](23a8e5f))
* add spinner to registration block submit button ([#3180](#3180)) ([ff1278f](ff1278f))
* added `<hr/>` between site status and quick action components ([982f67b](982f67b))
* added correct icon type to window.newspack_dashboard ([b5a5130](b5a5130))
* added dash card section components ([f9f3992](f9f3992))
* added quick actions component ([d37e3f3](d37e3f3))
* adding brand header and box-contrast component ([afb2e08](afb2e08))
* adding site status component ([ee01d09](ee01d09))
* applied PR feedback, error configuration ([7ef613e](7ef613e))
* boilerplate stylesheet for settings ([5f3f640](5f3f640))
* centralized wizards script initial ([6faf3d2](6faf3d2))
* dashboard & section initial ([eb3d1e6](eb3d1e6))
* dynamic component root loader ([389646a](389646a))
* ensure regenerator-runtime is available (for WP 6.6) ([#3196](#3196)) ([9693e37](9693e37))
* **everlit:** added Everlit to plugins + refactor plugins in connections wizard ([#3188](#3188)) ([88124f8](88124f8))
* icons ([5f3c740](5f3c740))
* initial app boilerplate ([9a3740c](9a3740c))
* initial settings and refactor ([d7d7da8](d7d7da8))
* **pwa:** pr feedback. moved anonymous function to static method ([1143a11](1143a11))
* RSS & WC Memberships ([#3146](#3146)) ([e649199](e649199))
* settings php initial ([e039c4b](e039c4b))
* **wizards:** new dashboard config and localize script ([2938b32](2938b32))

### Reverts

* **ia:** back to `trunk` ([69b2ba0](69b2ba0))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants