MR-33: Add subscription view shortcode#17
Conversation
|
Warning Review limit reached
More reviews will be available in 53 minutes and 17 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository: TheCodeCompany/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds a new helper function to generate subscriptions URLs, refactors the expiry banner to use it for renewal links, and introduces a new WordPress shortcode for embedding subscriptions links in content. ChangesSubscriptions URL and integration points
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@wordpress/wp-content/plugins/memberful-wp/src/shortcodes.php`:
- Around line 64-66: The shortcode function
memberful_wp_shortcode_subscriptions_link outputs an unescaped URL into an
anchor href; update memberful_wp_shortcode_subscriptions_link to pass the result
of memberful_subscriptions_url() through esc_url() before concatenating into the
returned string (i.e., use esc_url( memberful_subscriptions_url() ) for the
href) while preserving the existing do_shortcode($content) and role attribute.
- Line 4: Update the plugin readme to document the new shortcode and the
renew-link behavior change: add an entry describing the
memberful_subscriptions_link shortcode and its usage, mention the handler
function memberful_wp_shortcode_subscriptions_link as the implementation, and
explicitly note the changed renew-link behavior so users know how subscription
renewal links now behave; ensure the readme includes examples, expected output,
and any shortcode attributes or prerequisites introduced by this PR.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: TheCodeCompany/coderabbit/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2963c367-1388-46e7-87be-542a38ce92d8
📒 Files selected for processing (3)
wordpress/wp-content/plugins/memberful-wp/src/expiry_banner.phpwordpress/wp-content/plugins/memberful-wp/src/shortcodes.phpwordpress/wp-content/plugins/memberful-wp/src/urls.php
Summary
This PR adds a shortcode and URL helper for the subscriptions section of a member's Memberful account, and points the expiry banner's "Renew" link at it so members land directly on their subscriptions instead of the account landing page.
What's included
Test plan