PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.26
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.26
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
formidable / stripe / controllers / FrmTransLiteEntriesController.php

FrmTransLiteEntriesController.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.26, at stripe/controllers/FrmTransLiteEntriesController.php

50 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 class FrmTransLiteEntriesController {
7
8 /**
9 * Include payment details in the entry sidebar.
10 *
11 * @param stdClass $entry
12 *
13 * @return void
14 */
15 public static function sidebar_list( $entry ) {
16 if ( FrmTransLiteAppHelper::should_fallback_to_paypal() ) {
17 return;
18 }
19
20 // This line removes PayPal actions from the entries sidebar.
21 remove_action( 'frm_show_entry_sidebar', 'FrmPaymentsController::sidebar_list' );
22 add_action( 'frm_entry_shared_sidebar_middle', self::class . '::show_sidebar_list' );
23 }
24
25 /**
26 * Show the payment details in the entry sidebar.
27 *
28 * @param stdClass $entry
29 *
30 * @return void
31 */
32 public static function show_sidebar_list( $entry ) {
33 $frm_payment = new FrmTransLitePayment();
34 $payments = $frm_payment->get_all_for_entry( $entry->id );
35
36 if ( ! $payments ) {
37 return;
38 }
39
40 $frm_sub = new FrmTransLiteSubscription();
41 $subscriptions = $frm_sub->get_all_for_entry( $entry->id );
42 $entry_total = 0;
43 $date_format = get_option( 'date_format' );
44
45 FrmTransLiteActionsController::actions_js();
46
47 include FrmTransLiteAppHelper::plugin_path() . '/views/payments/sidebar_list.php';
48 }
49 }
50