Skip to content

Comments

rename the text in images#272

Closed
superdav42 wants to merge 4 commits intoUltimate-Multisite:mainfrom
Boofola:v3-Beta
Closed

rename the text in images#272
superdav42 wants to merge 4 commits intoUltimate-Multisite:mainfrom
Boofola:v3-Beta

Conversation

@superdav42
Copy link
Collaborator

@superdav42 superdav42 commented Nov 21, 2025

Summary by CodeRabbit

  • New Features

    • Added automatic email verification for new customer registrations.
  • Chores

    • Updated plugin version to 3.0.2.
    • Updated plugin header metadata and author information.
    • Added editor configuration standards for code consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

This is an update and collaboration to Ultimate Multisite, based on WP Ultimo, which was based on Pro Sites.
Changed all base images to reflect the new Ultimate Multisite name.
Simply added a white version of the logo to display on dark backgrounds. This was done quickly and needs to be re-done later.
Removed some embedded code for better and quicker integration. Also, preparing to add a few enhancements.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 21, 2025

Walkthrough

This PR updates the plugin to version 3.0.2, adding editor configuration, renaming the translation domain and MCP category from "multisite-ultimate" to "ultimate-multisite", introducing customer email verification on creation, and updating documentation and metadata.

Changes

Cohort / File(s) Summary
Configuration & Metadata
.editorconfig, ultimate-multisite.php
New .editorconfig with UTF-8 charset, LF line endings, and tab-based indentation (4-space) for general files, 2-space indentation for JSON/YAML. Plugin header updated with version 3.0.2, expanded author list, package name changed to Ultimate_Multisite.
Translation & Category Renamings
inc/admin-pages/class-setup-wizard-admin-page.php, inc/apis/trait-mcp-abilities.php
Translation domain renamed from "multisite-ultimate" to "ultimate-multisite" in setup wizard alert. MCP abilities category consistently renamed from "multisite-ultimate" to "ultimate-multisite" across all registered abilities (get-item, get-items, create-item, update-item, delete-item).
Feature Implementation
inc/managers/class-customer-manager.php
New event handler wired to Wu_Event_Customer_Created that triggers customer_created_email_verification() method. Method checks payload for pending email verification status, retrieves customer, and sends verification email if found.
Documentation
README.md, readme.txt
README logo URL changed from raw GitHub URL to blob URL. Changelog entry added for version 2.4.8 documenting MCP server integration, multi-network support, magic login links, cookie domain notice, and various bug fixes and improvements.

Sequence Diagram(s)

sequenceDiagram
    participant System as System/Event
    participant CM as Customer_Manager
    participant DB as Customer DB
    participant Email as Email Service
    
    System->>CM: Wu_Event_Customer_Created<br/>(payload)
    activate CM
    CM->>CM: Check payload['customer_email_verification']
    alt verification = 'pending'
        CM->>DB: wu_get_customer(customer_id)
        activate DB
        DB-->>CM: Customer object
        deactivate DB
        alt Customer found
            CM->>Email: send_verification_email()
            activate Email
            Email-->>CM: Email sent
            deactivate Email
        end
    end
    deactivate CM
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • The email verification feature is straightforward event-driven logic with minimal complexity
  • Category and translation domain renamings are repetitive, consistent changes
  • Metadata and configuration updates are cosmetic
  • Special attention to the customer email verification event payload structure and its integration with the customer object's send_verification_email() method
  • Verify that the MCP category rename doesn't break existing ability registrations or references elsewhere in the codebase

Possibly related PRs

  • PR #251: Modifies the same inc/admin-pages/class-setup-wizard-admin-page.php file in the SUNRISE missing message alert — may have overlapping or conflicting changes to the same code section.
  • PR #266: Updates the identical files with the same "multisite-ultimate" to "ultimate-multisite" domain and category renamings — likely a duplicate or precursor effort.

Poem

🐰 A version bump, domain names all aligned,
Email verification kindly intertwined,
Config files and categories neatly refined,
Ultimate Multisite, your future redesigned! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'rename the text in images' does not accurately reflect the actual changes made. The PR contains version bumps, translation domain rebranding, plugin header updates, changelog entries, and new functionality—none of which involve renaming text in images. Update the title to accurately describe the main changes, such as 'Rebrand from multisite-ultimate to ultimate-multisite and release version 3.0.2' or focus on the primary change in the changeset.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
README.md (1)

4-4: README logo URL change is fine

New GitHub blob URL for the logo should render correctly on GitHub; if you later need embeds outside GitHub, you may want a raw URL or locally served asset instead.

inc/apis/trait-mcp-abilities.php (1)

47-50: MCP ability prefix is functionally consistent; branding alignment or BC documentation recommended

  • The 'multisite-ultimate/' prefix in get_mcp_ability_prefix() aligns with the adapter check at inc/class-mcp-adapter.php:276, which filters abilities by str_starts_with($ability_id, 'multisite-ultimate/'), so the code works as-is.
  • The old category slug 'multisite-ultimate' is not used elsewhere in functional code—only in infrastructure files.
  • However, branding is mixed: the category is now 'ultimate-multisite' and the label says "Multisite Ultimate", but the ability ID prefix remains 'multisite-ultimate/'. Consider either:
    • Aligning everything to 'ultimate-multisite/' (which would also require updating the adapter check), or
    • Adding a comment in get_mcp_ability_prefix() documenting that the older prefix is retained for backward compatibility.

Also applies to: 87-95, 176-214, 225-271, 281-307, 318-357, 368-401

inc/managers/class-customer-manager.php (1)

182-201: Consider consolidating duplicate verification logic.

The logic in this method is nearly identical to transition_customer_email_verification (lines 168-179). Both methods check for pending status and send verification emails.

Consider extracting the shared logic:

/**
 * Send verification email if customer status is pending.
 *
 * @since 2.4.8
 * @param int $customer_id Customer ID.
 * @return void
 */
private function send_verification_email_if_pending($customer_id): void {
	$customer = wu_get_customer($customer_id);

	if ($customer) {
		$customer->send_verification_email();
	}
}

Then simplify both methods:

 public function transition_customer_email_verification($old_status, $new_status, $customer_id): void {
 
 	if ('pending' !== $new_status) {
 		return;
 	}

-	$customer = wu_get_customer($customer_id);
-
-	if ($customer) {
-		$customer->send_verification_email();
-	}
+	$this->send_verification_email_if_pending($customer_id);
 }

 public function customer_created_email_verification($payload): void {

 	if (!isset($payload['customer_email_verification'], $payload['customer_id'])) {
 		return;
 	}

 	if ('pending' !== $payload['customer_email_verification']) {
 		return;
 	}

-	$customer = wu_get_customer($payload['customer_id']);
-
-	if ($customer) {
-		$customer->send_verification_email();
-	}
+	$this->send_verification_email_if_pending($payload['customer_id']);
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 994d08b and e666bad.

⛔ Files ignored due to path filters (2)
  • assets/img/logo-white.png is excluded by !**/*.png
  • assets/img/logo-wide.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • .editorconfig (1 hunks)
  • README.md (1 hunks)
  • inc/admin-pages/class-setup-wizard-admin-page.php (1 hunks)
  • inc/apis/trait-mcp-abilities.php (6 hunks)
  • inc/managers/class-customer-manager.php (2 hunks)
  • readme.txt (1 hunks)
  • ultimate-multisite.php (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
inc/managers/class-customer-manager.php (2)
inc/functions/customer.php (1)
  • wu_get_customer (22-25)
inc/models/class-customer.php (1)
  • send_verification_email (853-863)
🪛 LanguageTool
readme.txt

[grammar] ~234-~234: Use a hyphen to join words.
Context: ...ded magic login links for SSO when third party cookies are disabled. - New: Added...

(QB_NEW_EN_HYPHEN)

🔇 Additional comments (3)
.editorconfig (1)

1-13: EditorConfig looks consistent and safe

Settings align with typical WP/PHP style (tabs for code, 2-space JSON/YAML) and should help normalize formatting across editors.

inc/admin-pages/class-setup-wizard-admin-page.php (1)

771-776: SUNRISE notice text domain change is correct

Switching this notice to use the ultimate-multisite text domain makes it consistent with the rest of the file and ensures the string is picked up by the main translation domain.

inc/managers/class-customer-manager.php (1)

79-79: LGTM!

The event hook registration follows the existing pattern and correctly wires the new customer creation event to the email verification handler.

Comment on lines +192 to +196
if ('pending' !== $payload['customer_email_verification']) {
return;
}

$customer = wu_get_customer($payload['customer_id']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add payload validation to prevent potential errors.

The method accesses $payload['customer_email_verification'] and $payload['customer_id'] without validating that these keys exist, which could trigger PHP warnings if the event payload is incomplete or malformed.

Apply this diff to add proper validation:

 public function customer_created_email_verification($payload): void {

+	if (!isset($payload['customer_email_verification'], $payload['customer_id'])) {
+		return;
+	}
+
 	if ('pending' !== $payload['customer_email_verification']) {
 		return;
 	}

 	$customer = wu_get_customer($payload['customer_id']);

 	if ($customer) {
 		$customer->send_verification_email();
 	}
 }
🤖 Prompt for AI Agents
In inc/managers/class-customer-manager.php around lines 192 to 196, the code
reads $payload['customer_email_verification'] and $payload['customer_id']
without verifying those keys exist; add explicit payload validation by checking
that 'customer_email_verification' and 'customer_id' are present (use isset or
array_key_exists) before accessing them, return early if either is missing or
not a string/expected type, and only then call
wu_get_customer($payload['customer_id']); this prevents PHP warnings from
malformed or incomplete event payloads.

Comment on lines +231 to +241
Version [2.4.8] - Released on 2025-XX-XX
- New: Added MCP (Model Context Protocol) Server integration.
- New: Added support for multi-network installations with network-specific customers, memberships, and products.
- New: Added magic login links for SSO when third party cookies are disabled.
- New: Added admin notice when invalid COOKIE_DOMAIN constant is detected.
- Fixed: WooCommerce subscriptions incorrectly set to staging mode when site is duplicated.
- Fixed: Single-Sign-On (SSO) authentication issues with custom domains.
- Fixed: Template switching functionality and improved singleton pattern usage across codebase.
- Improved: Enhanced domain mapping element and login form handling.
- Improved: Better redirect handling for sites within the network.
- Improved: Faster site creation after checkout.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix hyphenation in "third-party cookies".

The compound adjective "third party" should be hyphenated when used before a noun.

Apply this diff:

-- New: Added magic login links for SSO when third party cookies are disabled.
+- New: Added magic login links for SSO when third-party cookies are disabled.

Based on static analysis.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Version [2.4.8] - Released on 2025-XX-XX
- New: Added MCP (Model Context Protocol) Server integration.
- New: Added support for multi-network installations with network-specific customers, memberships, and products.
- New: Added magic login links for SSO when third party cookies are disabled.
- New: Added admin notice when invalid COOKIE_DOMAIN constant is detected.
- Fixed: WooCommerce subscriptions incorrectly set to staging mode when site is duplicated.
- Fixed: Single-Sign-On (SSO) authentication issues with custom domains.
- Fixed: Template switching functionality and improved singleton pattern usage across codebase.
- Improved: Enhanced domain mapping element and login form handling.
- Improved: Better redirect handling for sites within the network.
- Improved: Faster site creation after checkout.
Version [2.4.8] - Released on 2025-XX-XX
- New: Added MCP (Model Context Protocol) Server integration.
- New: Added support for multi-network installations with network-specific customers, memberships, and products.
- New: Added magic login links for SSO when third-party cookies are disabled.
- New: Added admin notice when invalid COOKIE_DOMAIN constant is detected.
- Fixed: WooCommerce subscriptions incorrectly set to staging mode when site is duplicated.
- Fixed: Single-Sign-On (SSO) authentication issues with custom domains.
- Fixed: Template switching functionality and improved singleton pattern usage across codebase.
- Improved: Enhanced domain mapping element and login form handling.
- Improved: Better redirect handling for sites within the network.
- Improved: Faster site creation after checkout.
🧰 Tools
🪛 LanguageTool

[grammar] ~234-~234: Use a hyphen to join words.
Context: ...ded magic login links for SSO when third party cookies are disabled. - New: Added...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In readme.txt around lines 231 to 241, the phrase "third party cookies" is
missing the hyphen when used as a compound adjective; update it to "third-party
cookies" in the listed changelog line so the compound modifier is correctly
hyphenated before the noun.

* Plugin URI: https://ultimatemultisite.com
* Text Domain: ultimate-multisite
* Version: 2.4.7
* Version: 3.0.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Plugin metadata bump looks fine; verify version alignment across files

The header/docblock updates to version 3.0.2 and the new @package look good. To avoid release confusion (especially for wp.org), double‑check that readme.txt’s stable tag and changelog also reflect 3.0.2 (or the intended release version).

You can sanity‑check this with:

Also applies to: 30-34, 130-130


🏁 Script executed:

#!/bin/bash
rg -n "Stable tag" readme.txt || true
rg -n "Version:" ultimate-multisite.php
rg -n "3\.0\.2" readme.txt ultimate-multisite.php || true

Length of output: 126


Version mismatch: readme.txt and plugin header are out of sync

The plugin header declares Version: 3.0.2, but readme.txt still lists Stable tag: 2.4.7. This must be aligned before release—update readme.txt's stable tag to 3.0.2 to match the plugin header and changelog entries (lines 30–34).

🤖 Prompt for AI Agents
In ultimate-multisite.php around line 7 the plugin header declares Version:
3.0.2 but the readme.txt stable tag is still 2.4.7; update readme.txt (lines
~30–34 where the Stable tag and changelog live) to set "Stable tag: 3.0.2" so it
matches the plugin header and changelog entries, then save and verify both files
show 3.0.2 before releasing.

@superdav42
Copy link
Collaborator Author

close is favor of #273

@superdav42 superdav42 closed this Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants