-
Notifications
You must be signed in to change notification settings - Fork 56
fix(metering): get current user metered views #4227
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
Conversation
dkoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected without any PHP warnings!
Approving for functionality, but I noticed a couple of minor style issues while testing that we could choose to tackle either here or in a separate PR if needed. The default inner blocks of the Countdown blocks don't collapse gracefully at smaller viewports:
If we were to enable the "Allow to wrap to multiple lines" attribute on the top-level Row block, it would collapse like this, which I think looks better at smaller viewports:
Also, the horizontal spacing around the Article Count block looks a little too much on the front-end, compared to the editor. It's especially noticeable if you add another block in front of the count like this:
|
@miguelpeixe while testing this PR I discovered a bug in the "auto-refresh" feature for content gating. Fix is here: #4230 |
|
Hey @miguelpeixe, good job getting this PR merged! 🎉 Now, the Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. Thank you! ❤️ |
# [6.22.0-alpha.1](v6.21.2...v6.22.0-alpha.1) (2025-10-17) ### Bug Fixes * **collections:** remove collection-related taxonomies from quick edit ([#4222](#4222)) ([e327230](e327230)) * **content-gate-countdown-block:** update block design ([fda287c](fda287c)) * ga4 events for gate interactions and tiered modal ([#4209](#4209)) ([162f34a](162f34a)) * keep prevent one and two col Collections block grid from being increased on smaller screens ([#4224](#4224)) ([482eef6](482eef6)) * **lite-site:** allow line breaks ([#4221](#4221)) ([ead3283](ead3283)) * **metering:** get current user metered views ([#4227](#4227)) ([ebc32b7](ebc32b7)) * **my-account:** new payment method style tweaks ([#4220](#4220)) ([88a638c](88a638c)) * **subscription-switch:** unhook direction text from checkout ([#4229](#4229)) ([69915ef](69915ef)) ### Features * **audience:** primary subscription product ([#4191](#4191)) ([1137770](1137770)) * **collections:** add archive link in settings page ([#4203](#4203)) ([8aad8ca](8aad8ca)) * **collections:** add css classes to meta elements ([#4208](#4208)) ([2a13af6](2a13af6)) * **collections:** implement design feedback for archive link ([#4219](#4219)) ([da35672](da35672)) * **InDesign:** inline image caption, horizontal rule, headings and blockquotes ([#4201](#4201)) ([c39b9f9](c39b9f9)) * **my-account:** add delete payment method modal confirmation ([#4216](#4216)) ([3220af2](3220af2)) * **my-account:** addresses ([#4206](#4206)) ([d57b1c9](d57b1c9)) * **newspack-icons:** add ai and ai-text to npm package ([#4235](#4235)) ([06789a9](06789a9)) * **newspack-icons:** add typescript support; add new icons ([#4088](#4088)) ([bb2cb82](bb2cb82)) * validate donation products ([#4163](#4163)) ([de24ff4](de24ff4)) * **woocommerce:** enable block emails ([#4218](#4218)) ([0643158](0643158))
|
🎉 This PR is included in version 6.22.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [6.22.0](v6.21.4...v6.22.0) (2025-10-30) ### Bug Fixes * add feature flag to countdown block and email enhancements ([#4262](#4262)) ([b8691d8](b8691d8)) * **collections:** remove collection-related taxonomies from quick edit ([#4222](#4222)) ([e327230](e327230)) * **content-gate-countdown-block:** update block design ([fda287c](fda287c)) * ga4 events for gate interactions and tiered modal ([#4209](#4209)) ([162f34a](162f34a)) * keep prevent one and two col Collections block grid from being increased on smaller screens ([#4224](#4224)) ([482eef6](482eef6)) * **lite-site:** allow line breaks ([#4221](#4221)) ([ead3283](ead3283)) * **metering:** get current user metered views ([#4227](#4227)) ([ebc32b7](ebc32b7)) * **my-account:** new payment method style tweaks ([#4220](#4220)) ([88a638c](88a638c)) * **subscription-switch:** unhook direction text from checkout ([#4229](#4229)) ([69915ef](69915ef)) * **subscriptions-tiers:** standardize product input name ([#4261](#4261)) ([4194267](4194267)) * tweak configuration labels for the primary subscription product ([#4260](#4260)) ([ab5a5c7](ab5a5c7)) * **upgrade-subscription-link:** remove query arg onload ([#4263](#4263)) ([87fe3d4](87fe3d4)) ### Features * **audience:** primary subscription product ([#4191](#4191)) ([1137770](1137770)) * **collections:** add archive link in settings page ([#4203](#4203)) ([8aad8ca](8aad8ca)) * **collections:** add css classes to meta elements ([#4208](#4208)) ([2a13af6](2a13af6)) * **collections:** implement design feedback for archive link ([#4219](#4219)) ([da35672](da35672)) * **InDesign:** inline image caption, horizontal rule, headings and blockquotes ([#4201](#4201)) ([c39b9f9](c39b9f9)) * **my-account:** add delete payment method modal confirmation ([#4216](#4216)) ([3220af2](3220af2)) * **my-account:** addresses ([#4206](#4206)) ([d57b1c9](d57b1c9)) * **my-account:** edit donation amount ([#4200](#4200)) ([f84d121](f84d121)) * **newspack-icons:** add ai and ai-text to npm package ([#4235](#4235)) ([06789a9](06789a9)) * **newspack-icons:** add typescript support; add new icons ([#4088](#4088)) ([bb2cb82](bb2cb82)) * validate donation products ([#4163](#4163)) ([de24ff4](de24ff4)) * **woocommerce:** enable block emails ([#4218](#4218)) ([0643158](0643158))
|
🎉 This PR is included in version 6.22.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
There's a missing
$countvariable from #4176 that slipped by me during review. This PR is meant to address that, but while at it, I also propose some changes to this public method so it's more predictable and generic.The
// For logged-in users, calculate the remaining views based on their metering data.comment is also not accurate and represents a previous approach.How to test the changes in this Pull Request:
Same as #4176
Other information: