Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions classes/helpers/FrmTipsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public static function show_tip( $tip, $html = '' ) {
);
$tip = array_merge( $defaults, $tip );

if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
$tip['link']['medium'] = 'tip';
if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) && ! isset( $tip['link']['campaign'] ) ) {
$tip['link']['campaign'] = 'tip';
}

if ( 'p' === $html ) {
Expand Down
8 changes: 4 additions & 4 deletions square/helpers/FrmSquareLiteAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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").

*
* @param string $medium Medium identifier for the tip (for example 'tip').
* @param string $content UTM Content for the admin upgrade link.
* @param array|false|string $gateway Gateway or list of gateways this applies to.
*
* @return void
*/
public static function fee_education( $medium = 'tip', $gateway = false ) {
public static function fee_education( $content = 'tip', $gateway = false ) {
$license_type = FrmAddonsController::license_type();

if ( in_array( $license_type, array( 'elite', 'business' ), true ) ) {
Expand All @@ -75,8 +75,8 @@ public static function fee_education( $medium = 'tip', $gateway = false ) {
FrmTipsHelper::show_tip(
array(
'link' => array(
'content' => 'square-fee',
'medium' => $medium,
'campaign' => 'square-fee',
'content' => $content,
),
'tip' => 'Pay as you go pricing: 3% fee per-transaction + Square fees.',
'call' => __( 'Upgrade to save on fees.', 'formidable' ),
Expand Down
8 changes: 4 additions & 4 deletions stripe/helpers/FrmStrpLiteAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ public static function active_mode() {
/**
* Add education about Stripe fees.
*
* @param string $medium Medium identifier for the tip (for example 'tip').
* @param string $content UTM Content for the admin upgrade link.
* @param array|false|string $gateway Gateway or list of gateways this applies to.
*
* @return void
*/
public static function fee_education( $medium = 'tip', $gateway = false ) {
public static function fee_education( $content = 'tip', $gateway = false ) {
$license_type = FrmAddonsController::license_type();

if ( in_array( $license_type, array( 'elite', 'business' ), true ) ) {
Expand All @@ -119,8 +119,8 @@ public static function fee_education( $medium = 'tip', $gateway = false ) {
FrmTipsHelper::show_tip(
array(
'link' => array(
'content' => 'stripe-fee',
'medium' => $medium,
'campaign' => 'stripe-fee',
'content' => $content,
),
'tip' => 'Pay as you go pricing: 3% fee per-transaction + Stripe fees.',
'call' => __( 'Upgrade to save on fees.', 'formidable' ),
Expand Down