fix(products): plan editor pins Customer Role to resolved default, overriding global Default Role
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #2082 của @superdav42 — đã merge
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Read inc/admin-pages/class-product-edit-admin-page.php around line 757 and inc/limitations/class-limit-customer-user-role.php around line 74 to understand how the plan editor gets the customer role. The issue describes the fix: show the stored value, falling back to default; check that saving an untouched plan preserves default and that existing explicit roles remain visible. Pull request #2082 is already open against this issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Customer reports that with Settings → Login & Registration → Default Role set to a custom role ("CRM Admin"), new customers are still added to their site as Administrator.
Root cause
The plan editor's Customer Role select (inc/admin-pages/class-product-edit-admin-page.php:757) uses Product::get_customer_role(), which resolves an unset/default limit to the current global default_role (inc/limitations/class-limit-customer-user-role.php:74). So "Use Ultimate Multisite default" is never shown as selected; the select shows the resolved role (administrator out of the box). Saving the plan then stores that role explicitly, and Site::save() (inc/models/class-site.php:2238-2241) prefers the plan's role over the global setting from then on. Changing Default Role later has no effect on that plan.
Fix
Show the stored value in the editor, falling back to default, so saving a plan without touching the field keeps following the global setting.
Verification
Dev network, global Default Role later switched to WooCommerce shop_manager, site cloned from template via pending-site publish:
- Plan saved with the old editor value → stored
administrator→ customer getsadministrator. - Plan saved with the patched editor value → stored
default→ customer getsshop_manager.
Existing plans that already have an explicit role keep it; the editor now displays it so admins can switch to "Use Ultimate Multisite default".
- Ngôn ngữ chính
- PHP
- Star
- 218
- Fork
- 88
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 94
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
-
Track interactive PR #2086Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởorigin:worker source:conflict-feedback status:available
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 1/100
Ultimate-Multisite/ultimate-multisite#2090 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Track interactive PR #2087Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởorigin:worker source:conflict-feedback status:available
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 1/100
Ultimate-Multisite/ultimate-multisite#2089 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
no-auto-dispatch operator:superdav42 origin:worker priority:high status:available
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Ultimate-Multisite/ultimate-multisite#2083 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Domain mapping: apply primary mapped domain to home_url/site_url for other sites, not only the current request hostCó thể đã có người làm @superdav42 đã nhận 3 ngày trước. Đang mởbug origin:interactive status:in-review
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Ultimate-Multisite/ultimate-multisite#2080 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Clearer default custom-domain DNS instructions and configurable DNS targetCó thể đã có người làm @superdav42 đã nhận 6 ngày trước. Đang mởenhancement origin:worker source:ci-feedback status:in-review
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Ultimate-Multisite/ultimate-multisite#2067 · 14 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ự
-
enhancement priority Sales
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
novalo-dev/Prestashop-MCP-Server#201 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
web-token/jwt-framework#757 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Include flows spanning the full report time windowCó thể đã có người làm @somethingwithproof đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Cacti/plugin_flowview#306 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug origin: upstream priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mattytap/Mattytap-Sermons#105 ·