PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | stripe/helpers/FrmStrpLiteAppHelper.php +26 -13 6.26 → trunk View file →
@@ -71,8 +71,9 @@
71 71
72 72 if ( 'test' === self::active_mode() ) {
73 73 $meta_name .= '_test';
74 74 }
75 +
75 76 return $meta_name;
76 77 }
77 78
78 79 /**
@@ -90,24 +91,21 @@
90 91 *
91 92 * @psalm-return 'live'|'test'
92 93 */
93 94 public static function active_mode() {
94 - $settings = self::get_settings();
95 - return $settings->settings->test_mode ? 'test' : 'live';
95 + return self::get_settings()->settings->test_mode ? 'test' : 'live';
96 96 }
97 97
98 98 /**
99 99 * Add education about Stripe fees.
100 100 *
101 - * @param string $medium Medium identifier for the tip (for example 'tip').
101 + * @param string $content UTM Content for the admin upgrade link.
102 102 * @param array|false|string $gateway Gateway or list of gateways this applies to.
103 103 *
104 104 * @return void
105 105 */
106 - public static function fee_education( $medium = 'tip', $gateway = false ) {
107 - $license_type = FrmAddonsController::license_type();
108 -
109 - if ( in_array( $license_type, array( 'elite', 'business' ), true ) ) {
106 + public static function fee_education( $content = 'tip', $gateway = false ) {
107 + if ( ! FrmAddonsController::payment_fees_apply( 'stripe' ) ) {
110 108 return;
111 109 }
112 110
113 111 $classes = 'frm-light-tip show_stripe';
@@ -118,10 +116,10 @@
118 116
119 117 FrmTipsHelper::show_tip(
120 118 array(
121 119 'link' => array(
122 - 'content' => 'stripe-fee',
123 - 'medium' => $medium,
120 + 'campaign' => 'stripe-fee',
121 + 'content' => $content,
124 122 ),
125 123 'tip' => 'Pay as you go pricing: 3% fee per-transaction + Stripe fees.',
126 124 'call' => __( 'Upgrade to save on fees.', 'formidable' ),
127 125 'class' => $classes,
@@ -135,19 +133,34 @@
135 133 *
136 134 * @return void
137 135 */
138 136 public static function not_connected_warning() {
137 + // phpcs:disable Generic.WhiteSpace.ScopeIndent
139 138 ?>
140 - <div class="frm_warning_style frm-with-icon">
141 - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_alert_icon', array( 'style' => 'width:24px' ) ); ?>
139 + <div class="frm_warning_style">
142 140 <span>
143 141 <?php
144 - /* translators: %1$s: Link HTML, %2$s: End link */
145 - printf( esc_html__( 'Credit Cards will not work without %1$sconnecting Stripe%2$s or %3$sconnecting Square%4$s first.', 'formidable' ), '<a href="?page=formidable-settings&t=stripe_settings" target="_blank">', '</a>', '<a href="?page=formidable-settings&t=square_settings" target="_blank">', '</a>' );
142 + printf(
143 + /* translators: %1$s: Link HTML, %2$s: End link */
144 + esc_html__( 'Credit Cards will not work without connecting %1$sStripe%2$s, %3$sSquare%4$s, or %5$sPayPal%6$s first.', 'formidable' ),
145 + // %1$s
146 + '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-settings&t=stripe_settings' ) ) . '" target="_blank">',
147 + // %2$s
148 + '</a>',
149 + // %3$s
150 + '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-settings&t=square_settings' ) ) . '" target="_blank">',
151 + // %4$s
152 + '</a>',
153 + // %5$s
154 + '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-settings&t=paypal_settings' ) ) . '" target="_blank">',
155 + // %6$s
156 + '</a>'
157 + );
146 158 ?>
147 159 </span>
148 160 </div>
149 161 <?php
162 + // phpcs:enable Generic.WhiteSpace.ScopeIndent
150 163 }
151 164
152 165 /**
153 166 * @deprecated 6.22