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/FrmTransLiteListHelper.php +19 -24 6.27 → trunk View file →
@@ -19,8 +19,11 @@
19 19 * @var int[]
20 20 */
21 21 private $valid_entry_ids = array();
22 22
23 + /**
24 + * @param array $args
25 + */
23 26 public function __construct( $args ) {
24 27 $this->table = FrmAppHelper::get_simple_request(
25 28 array(
26 29 'param' => 'trans_type',
@@ -87,22 +90,20 @@
87 90
88 91 $table_name = $this->table === 'subscriptions' ? 'frm_subscriptions' : 'frm_payments';
89 92 $form_id = FrmAppHelper::get_param( 'form', 0, 'get', 'absint' );
90 93
91 - if ( $form_id ) {
92 - // @codingStandardsIgnoreStart
93 - $query = $wpdb->prepare(
94 - "FROM `{$wpdb->prefix}{$table_name}` p
95 - JOIN `{$wpdb->prefix}frm_items` i ON p.item_id = i.id
96 - WHERE i.form_id = %d",
97 - $form_id
98 - );
99 - // @codingStandardsIgnoreEnd
100 - } else {
101 - $query = "FROM `{$wpdb->prefix}{$table_name}` p";
94 + if ( ! $form_id ) {
95 + return "FROM `{$wpdb->prefix}{$table_name}` p";
102 96 }
103 97
104 - return $query;
98 + // @codingStandardsIgnoreStart
99 + return $wpdb->prepare(
100 + "FROM `{$wpdb->prefix}{$table_name}` p
101 + JOIN `{$wpdb->prefix}frm_items` i ON p.item_id = i.id
102 + WHERE i.form_id = %d",
103 + $form_id
104 + );
105 + // @codingStandardsIgnoreEnd
105 106 }
106 107
107 108 /**
108 109 * @return void
@@ -107,9 +108,9 @@
107 108 /**
108 109 * @return void
109 110 */
110 111 public function no_items() {
111 - esc_html_e( 'No payments found.', 'formidable' );
112 + include FrmTransLiteAppHelper::plugin_path() . '/views/lists/no-payments.php';
112 113 }
113 114
114 115 /**
115 116 * @return array
@@ -137,13 +138,15 @@
137 138
138 139 foreach ( $statuses as $status => $name ) {
139 140 $class = $status === $type ? ' class="current"' : '';
140 141
141 - if ( $counts[ $status ] || 'published' === $status ) {
142 + if ( $counts[ $status ] || 'payments' === $status ) {
143 + // phpcs:disable Generic.WhiteSpace.ScopeIndent
142 144 $links[ $status ] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>'
143 145 // translators: %1$s: Transaction type (Payments or Subscriptions), %2$s: Span start tag, %3$s: Count, %4$s: Span close tag.
144 146 . sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[ $status ] ), '</span>' )
145 147 . '</a>';
148 + // phpcs:enable Generic.WhiteSpace.ScopeIndent
146 149 }
147 150
148 151 unset( $status, $name );
149 152 }
@@ -169,8 +172,9 @@
169 172 'receipt_id' => 'receipt_id',
170 173 'sub_id' => 'sub_id',
171 174 'begin_date' => 'begin_date',
172 175 'expire_date' => 'expire_date',
176 + 'paysys' => 'paysys',
173 177 'status' => 'status',
174 178 'next_bill_date' => 'next_bill_date',
175 179 );
176 180 }
@@ -619,15 +623,8 @@
619 623 if ( isset( $atts['gateways'][ $item->paysys ] ) ) {
620 624 return $atts['gateways'][ $item->paysys ]['label'];
621 625 }
622 626
623 - if ( 'paypal' === $item->paysys ) {
624 - // The PayPal add-on does not use a gateway.
625 - // This should be safe to remove once we release
626 - // PayPal Commerce in Lite.
627 - return 'PayPal';
628 - }
629 -
630 627 return $item->paysys;
631 628 }
632 629
633 630 /**
@@ -658,9 +655,7 @@
658 655 // Coupons are only available to people who can access global settings.
659 656 return;
660 657 }
661 658
662 - if ( FrmAppHelper::show_new_feature( 'coupons' ) ) {
663 - include FrmTransLiteAppHelper::plugin_path() . '/views/lists/tabs.php';
664 - }
659 + include FrmTransLiteAppHelper::plugin_path() . '/views/lists/tabs.php';
665 660 }
666 661 }