Decide: should confirming a manual payment renew an active membership?
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
Hướng nghiên cứu
Start with the confirm_membership toggle's v-if in inc/admin-pages/class-payment-edit-admin-page.php (around line 1193) and the renewal branch in handle_save() in the same file. The active renewal row of test_manual_confirmation_period shows the current behaviour. This is a maintainer decision, so the work is done only once the desired rule for active memberships is settled; any build must extend the period exactly once.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Decision needed
Should confirming a pending payment renew an active manual membership?
Source: review comment on PR #2133 by @coderabbitai. Not a defect in that PR; main behaves the same way.
Premise check
Correct. An administrator cannot renew an active manually billed membership by confirming its payment in the UI. The "Activate Membership?" toggle in the payment editor is hidden when the membership is active or trialing, so the renewal branch of handle_save() is never reached from the page for those memberships.
- Toggle visibility:
inc/admin-pages/class-payment-edit-admin-page.php, theconfirm_membershipfield'sv-if(around line 1193). - Renewal branch:
handle_save()in the same file calls$membership->renew(false, Membership_Status::ACTIVE)for a non-initial payment. - The branch works when
confirm_membershipis posted: theactive renewalrow ofPayment_Edit_Admin_Page_Test::test_manual_confirmation_periodpasses. - On
mainthe toggle is shown forpendingmemberships only, so this is not new.
Analysis
- Manual-gateway renewal payments are created by an administrator (
inc/admin-pages/class-payment-list-admin-page.php:208and:461). Nothing creates them at expiry. The only automatic creators are the Stripe and PayPal webhooks and the migrator. - Showing the toggle for active memberships would let one confirmation extend the plan's period by a billing cycle. If the administrator has also moved the expiration by hand, that extends it twice.
- A pending payment is not necessarily a renewal. An administrator can create one with custom line items for something else, and confirming it with the toggle on would still renew. The cart type that identifies add-ons and upgrades is stored only for payments created by checkout, so it cannot tell these apart.
- Add-on payments already lift a hold without extending the period (#2133), so any new rule must keep that.
Recommended path
Keep today's behaviour and document that an active manual membership is extended by editing its expiration. If maintainers want one-click renewal, show the toggle for an active membership only when the payment has a plan line item, and require the administrator to confirm the new expiration date in the same form.
Verification, if this is built
- A pending payment with a plan line item on an active membership: the toggle appears, confirming extends the expiration by one cycle exactly once, and a repeated save does not extend again.
- A pending payment with only custom line items: no toggle.
- Existing rows of
test_manual_confirmation_periodkeep passing.
aidevops.sh v3.39.189 plugin for OpenCode
- Ngôn ngữ chính
- PHP
- Star
- 219
- Fork
- 88
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 58
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Ultimate-Multisite/ultimate-multisite
-
bug origin:interactive status:available
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Ultimate-Multisite/ultimate-multisite#2131 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug hold-for-review no-auto-dispatch origin:interactive status:available
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
Ultimate-Multisite/ultimate-multisite#2140 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix: customer site lists stop at 100 sites (BerlinDB default number)Có thể đã có người làm @superdav42 đã nhận hôm nay. Đang mởauto-dispatch bug origin:interactive status:in-review tier:standard
Ultimate-Multisite/ultimate-multisite#2136 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix: My Sites, Limits and Current Membership columns above 3 collapse to one column (missing grid utilities)Có thể đã có người làm @superdav42 đã nhận hôm nay. Đang mởauto-dispatch bug origin:interactive status:in-review tier:standard
Ultimate-Multisite/ultimate-multisite#2134 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
security(sso): apply mapped-domain token policy to admin-bar magic linksCó thể đã có người làm @superdav42 đã nhận 1 ngày trước. Đang mởauto-dispatch origin:interactive status:in-review tier:standard
Ultimate-Multisite/ultimate-multisite#2125 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Ultimate-Multisite/ultimate-multisite
Issue tương tự
-
35-feedback
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quantum-php/framework#692 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
ajeetraina/awesome-docker-sbx#559 ·
-
PHP 8.6 supportĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Saisie des adressesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
pantaflex44/Tiquettes#116 · 1 bình luận ·