Skip to content

Fee education utm updates#2733

Merged
Crabcyborg merged 2 commits into
masterfrom
fee_education_utm_updates
Jan 7, 2026
Merged

Fee education utm updates#2733
Crabcyborg merged 2 commits into
masterfrom
fee_education_utm_updates

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

@Crabcyborg Crabcyborg commented Jan 7, 2026

The logic for campaign vs content was backwards after I tried to make the parameters more unique.

@Crabcyborg Crabcyborg added this to the 6.27 milestone Jan 7, 2026
@Crabcyborg Crabcyborg merged commit d436d36 into master Jan 7, 2026
35 of 36 checks passed
@Crabcyborg Crabcyborg deleted the fee_education_utm_updates branch January 7, 2026 19:04
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 7, 2026

Walkthrough

The pull request updates tip link attribution across three helper files. Changes rename a parameter from $medium to $content in gateway helpers and update link data structure to use 'campaign' and 'content' keys instead of 'medium'-based attribution. The core tip helper defaults link campaign to 'tip' when neither medium nor campaign is set.

Changes

Cohort / File(s) Summary
Core tip link handling
classes/helpers/FrmTipsHelper.php
Modified show_tip() to assign 'campaign' => 'tip' when a link exists but neither medium nor campaign is set, changing the default attribution model.
Gateway fee education links
square/helpers/FrmSquareLiteAppHelper.php, stripe/helpers/FrmStrpLiteAppHelper.php
Renamed fee_education() parameter from $medium to $content with updated docblocks. Updated internal link construction to use 'campaign' (set to gateway-specific value) and 'content' (populated by parameter) instead of previous structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The pull request has no description provided by the author, making it impossible to assess the intent or rationale for the changes. Add a detailed pull request description explaining the purpose of the fee education UTM updates, the rationale for changing from 'medium' to 'campaign' naming conventions, and any relevant context about the changes across multiple payment gateway helpers.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fee education utm updates' accurately describes the main change across the pull request—updating UTM parameters (campaign and content) in fee education links across multiple helpers.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

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
Copy Markdown
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: 1

🤖 Fix all issues with AI agents
In @square/helpers/FrmSquareLiteAppHelper.php:
- Line 55: The docblock in the FrmSquareLiteAppHelper class incorrectly
references "Stripe fees"; update the comment to say "Square fees" instead so the
documentation matches the payment gateway here (look for the docblock above the
FrmSquareLiteAppHelper class or the method that contains the line "Add education
about Stripe fees" and change "Stripe" to "Square").
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c22148 and ea4468d.

📒 Files selected for processing (3)
  • classes/helpers/FrmTipsHelper.php
  • square/helpers/FrmSquareLiteAppHelper.php
  • stripe/helpers/FrmStrpLiteAppHelper.php
🧰 Additional context used
🧬 Code graph analysis (2)
stripe/helpers/FrmStrpLiteAppHelper.php (1)
square/helpers/FrmSquareLiteAppHelper.php (1)
  • fee_education (62-87)
square/helpers/FrmSquareLiteAppHelper.php (1)
stripe/helpers/FrmStrpLiteAppHelper.php (1)
  • fee_education (106-131)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Cypress
  • GitHub Check: PHP 7.4 tests in WP 6.9
  • GitHub Check: PHP 8 tests in WP 6.9
  • GitHub Check: Cypress
  • GitHub Check: PHP 7.4 tests in WP 6.9
  • GitHub Check: PHP 8 tests in WP 6.9
🔇 Additional comments (5)
classes/helpers/FrmTipsHelper.php (1)

51-52: LGTM! Clean migration to campaign-based attribution.

The change correctly maintains backward compatibility by checking for both medium and campaign keys before defaulting to campaign = 'tip'. This ensures existing code using 'medium' continues to work while new code adopts the 'campaign' convention.

stripe/helpers/FrmStrpLiteAppHelper.php (2)

122-123: LGTM! Link structure correctly implements new UTM convention.

The restructured link data with 'campaign' => 'stripe-fee' and 'content' => $content properly aligns with the UTM parameter migration and standard naming conventions.


101-106: Parameter rename is safe—no named arguments used in any call site.

All calls to fee_education() use positional arguments only:

  • FrmStrpLiteAppHelper::fee_education( 'stripe-action-tip', $gateway )
  • FrmStrpLiteAppHelper::fee_education( 'stripe-global-settings-tip' )
  • FrmSquareLiteAppHelper::fee_education( 'square-action-tip', $gateway )
  • FrmSquareLiteAppHelper::fee_education( 'square-global-settings-tip' )

The parameter rename from $medium to $content and updated documentation correctly reflect the restructured UTM attribution model with no breaking changes.

square/helpers/FrmSquareLiteAppHelper.php (2)

57-62: LGTM! Parameter rename consistent with Stripe helper.

The parameter rename from $medium to $content with updated documentation mirrors the changes in the Stripe helper and correctly reflects the new UTM structure.


78-79: LGTM! Link structure correctly updated.

The link data structure with 'campaign' => 'square-fee' and 'content' => $content is consistent with the Stripe helper changes and properly implements the new UTM parameter convention.

@@ -54,12 +54,12 @@ public static function active_mode() {
/**
* Add education about Stripe fees.
Copy link
Copy Markdown
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 docblock: references wrong payment gateway.

The docblock comment mentions "Stripe fees" but this is the Square helper class and should reference "Square fees" instead.

📝 Proposed fix
-	 * Add education about Stripe fees.
+	 * Add education about Square fees.
📝 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
* Add education about Stripe fees.
* Add education about Square fees.
🤖 Prompt for AI Agents
In @square/helpers/FrmSquareLiteAppHelper.php at line 55, The docblock in the
FrmSquareLiteAppHelper class incorrectly references "Stripe fees"; update the
comment to say "Square fees" instead so the documentation matches the payment
gateway here (look for the docblock above the FrmSquareLiteAppHelper class or
the method that contains the line "Add education about Stripe fees" and change
"Stripe" to "Square").

stephywells pushed a commit that referenced this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant