Pull medium from link if query arg is not set#2606
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
classes/helpers/FrmAppHelper.php(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
classes/helpers/FrmAppHelper.php (1)
stubs.php (2)
FrmProAddonsController(128-163)get_readable_license_type(161-162)
⏰ 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 8 tests in WP trunk
- GitHub Check: PHP 7.4 tests in WP trunk
- GitHub Check: PHP 7.4 tests in WP trunk
- GitHub Check: Cypress
- GitHub Check: PHP 8 tests in WP trunk
🔇 Additional comments (2)
classes/helpers/FrmAppHelper.php (2)
172-188: LGTM! The enhanced logic correctly addresses the PR objective.The updated
maybe_add_utm_license()method now intelligently determines the UTM medium by first checking$query_argsand falling back to extracting it from the provided link. This ensures the license parameter is added correctly even when the medium is only present in the link URL. The backward compatibility is maintained through the default parameter value.
266-266: Perfect! The updated call completes the PR objective.Passing
$cta_linkas the second argument enablesmaybe_add_utm_license()to extract the medium from the link when it's not present in$query_args. This correctly addresses the issue where new upsell links withutm_mediumin the URL weren't being processed properly for license tracking.
…ry_arg_is_not_set Pull medium from link if query arg is not set
Related PR #2601
This fixes an issue with new upsells links including
utm_medium, so it's not set when we try to add a license.Causing this warning.