fix(products): plan editor pins Customer Role to resolved default, overriding global Default Role
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #2082 @superdav42 による — マージ済み
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 25/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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".
- 主要言語
- PHP
- スター
- 218
- フォーク
- 88
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 94
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Ultimate-Multisite/ultimate-multisite のほかの issue
-
Track interactive PR #2086再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンorigin:worker source:conflict-feedback status:available
難易度 4/5 3〜5日 初心者へのやさしさ 1/100
Ultimate-Multisite/ultimate-multisite#2090 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Track interactive PR #2087再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンorigin:worker source:conflict-feedback status:available
難易度 4/5 3〜5日 初心者へのやさしさ 1/100
Ultimate-Multisite/ultimate-multisite#2089 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
no-auto-dispatch operator:superdav42 origin:worker priority:high status:available
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
Ultimate-Multisite/ultimate-multisite#2083 ·
メンテナーはふだん 1 日以内に返信
-
Domain mapping: apply primary mapped domain to home_url/site_url for other sites, not only the current request host対応中かも @superdav42 が 3 日前に担当しました。 オープンbug origin:interactive status:in-review
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
Ultimate-Multisite/ultimate-multisite#2080 · コメント 5 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Clearer default custom-domain DNS instructions and configurable DNS target対応中かも @superdav42 が 6 日前に担当しました。 オープンenhancement origin:worker source:ci-feedback status:in-review
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Ultimate-Multisite/ultimate-multisite#2067 · コメント 14 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Ultimate-Multisite/ultimate-multisite の issue をすべて見る
似ている issue
-
enhancement priority Sales
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
novalo-dev/Prestashop-MCP-Server#201 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
web-token/jwt-framework#757 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Include flows spanning the full report time window対応中かも @somethingwithproof が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Cacti/plugin_flowview#306 ·
メンテナーはふだん 1 日以内に返信
-
bug origin: upstream priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mattytap/Mattytap-Sermons#105 ·