Skip to content

fix: clarify product type choices - #1428

Merged
superdav42 merged 1 commit into
mainfrom
fix/product-type-help
Jun 16, 2026
Merged

fix: clarify product type choices#1428
superdav42 merged 1 commit into
mainfrom
fix/product-type-help

Conversation

@superdav42

@superdav42 superdav42 commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add short descriptions to each Product Type option on the product edit page.
  • Replace the generic Product Type help text with instructions for when to use Plan, Package, Service, and Demo.
  • Update the POT entries for the new admin UI strings.

Verification

  • php -l inc/admin-pages/class-product-edit-admin-page.php
  • vendor/bin/phpcs inc/admin-pages/class-product-edit-admin-page.php
  • vendor/bin/phpstan analyse inc/admin-pages/class-product-edit-admin-page.php
  • git diff --check
  • Pre-commit hook passed PHPCS and PHPStan for the staged PHP file.

Not run

  • PHPUnit, because the WordPress test suite is unavailable in this local environment.

Summary by CodeRabbit

  • New Features

    • Enhanced product type selection with clearer descriptions for each type (Plan, Package, Service, Demo), helping users choose the correct type for their use case.
  • Documentation

    • Improved help text for the Product Type field with specific guidance on which type to select for different business needs.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 131c7c53-4ae5-424a-a7ab-dcc2accd33b6

📥 Commits

Reviewing files that changed from the base of the PR and between a5db715 and c11d6bc.

📒 Files selected for processing (2)
  • inc/admin-pages/class-product-edit-admin-page.php
  • lang/ultimate-multisite.pot

📝 Walkthrough

Walkthrough

A new get_product_type_options() helper method is added to the product edit admin page, returning descriptive labels for each Product_Type constant (Plan, Package, Service, Demo). The Product Type form field is updated to use this helper's output and a revised description. The .pot file is updated with the new translatable strings.

Changes

Product Type UI Labels

Layer / File(s) Summary
Helper method, field wiring, and translations
inc/admin-pages/class-product-edit-admin-page.php, lang/ultimate-multisite.pot
get_product_type_options() returns a keyed array mapping Product_Type constants to human-readable labels (Plan, Package, Service, Demo). The Product Type form field's options source is switched from Product_Type::to_array() to this helper, and the desc text is replaced with a more specific per-type explanation. The .pot file adds the four label strings and the updated field description.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

A rabbit hopped in, labels in paw,
Plan, Package, Service, Demo — no flaw!
The dropdown now speaks with clarity bright,
Each product type shining in readable light.
🐇✨ No more guessing — the UI's just right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: clarify product type choices' directly and clearly summarizes the main change: improving the clarity of product type selection UI with descriptions and better help text.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/product-type-help

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@superdav42
superdav42 merged commit 30fbf55 into main Jun 16, 2026
11 checks passed
@superdav42

Copy link
Copy Markdown
Collaborator Author

Summary

  • Add short descriptions to each Product Type option on the product edit page.
  • Replace the generic Product Type help text with instructions for when to use Plan, Package, Service, and Demo.
  • Update the POT entries for the new admin UI strings.

Verification

  • php -l inc/admin-pages/class-product-edit-admin-page.php
  • vendor/bin/phpcs inc/admin-pages/class-product-edit-admin-page.php
  • vendor/bin/phpstan analyse inc/admin-pages/class-product-edit-admin-page.php
  • git diff --check
  • Pre-commit hook passed PHPCS and PHPStan for the staged PHP file.

Not run

  • PHPUnit, because the WordPress test suite is unavailable in this local environment.


Merged via PR #1428 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).


aidevops.sh v3.20.77 spent 13m on this as a headless bash routine.

@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant