Add "NEW" to payment field#2075
Conversation
|
@srwells What do you think about this update? We were talking the other day about ways to help convert more people to Stripe. We have the "NEW" item in the sub-menu, but what do you think about showing it here in the field as well? Thank you! |
WalkthroughThe pull request introduces changes to two files: Changes
Possibly related PRs
Suggested labels
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- classes/views/frm-forms/add_field_links.php (1 hunks)
- css/frm_admin.css (1 hunks)
🔇 Additional comments (1)
classes/views/frm-forms/add_field_links.php (1)
45-49: LGTM! Verify helper methods availability.The implementation aligns well with the PR objectives, adding the "NEW" label conditionally for the credit card field. The code is clean and follows the existing patterns.
Let's verify the availability of the required helper methods:
✅ Verification successful
Both helper methods exist and are properly used ✅
The verification confirms:
FrmTransLiteAppHelper::payments_table_exists()is defined instripe/helpers/FrmTransLiteAppHelper.phpand used across multiple filesFrmAppHelper::show_pill_text()is defined inclasses/helpers/FrmAppHelper.phpand used in several places including other pill text displaysThe implementation follows existing patterns in the codebase for displaying pill text labels and checking payment table existence.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of required helper methods # Test 1: Check for FrmTransLiteAppHelper::payments_table_exists() ast-grep --pattern 'class FrmTransLiteAppHelper { $$$ payments_table_exists($$$) { $$$ } $$$ }' # Test 2: Check for FrmAppHelper::show_pill_text() ast-grep --pattern 'class FrmAppHelper { $$$ show_pill_text($$$) { $$$ } $$$ }'Length of output: 203
Script:
#!/bin/bash # Let's try a different approach using ripgrep to find these methods # Search for FrmTransLiteAppHelper class and payments_table_exists method echo "=== Searching for FrmTransLiteAppHelper::payments_table_exists ===" rg -A 5 "class FrmTransLiteAppHelper" rg "payments_table_exists" echo -e "\n=== Searching for FrmAppHelper::show_pill_text ===" rg -A 5 "class FrmAppHelper" rg "show_pill_text"Length of output: 2115
|
I like it! Yeah, the more we can draw attention to the payment tools, the better. |
|
Thanks Steve! I'll go ahead and merge this then. 🚀 |
We have this "NEW" text in our payments submenu.
But I was think we might draw more attention to payments as well if we put a "NEW" flag directly beside the Payment field as well.

I put this behind a check so it doesn't appear if you have a payments table already installed. This would apply to anyone using the PayPal add-on, Authorize.Net, or anyone who has used Stripe already.