← All changes
|
stripe/controllers/FrmTransLiteEntriesController.php
+5
-4
6.33
→
6.16.1
View file →
| @@ -8,15 +8,18 @@ | ||
| 8 | 8 | /** |
| 9 | 9 | * Include payment details in the entry sidebar. |
| 10 | 10 | * |
| 11 | 11 | * @param stdClass $entry |
| 12 | - * | |
| 13 | 12 | * @return void |
| 14 | 13 | */ |
| 15 | 14 | public static function sidebar_list( $entry ) { |
| 15 | + if ( FrmTransLiteAppHelper::should_fallback_to_paypal() ) { | |
| 16 | + return; | |
| 17 | + } | |
| 18 | + | |
| 16 | 19 | // This line removes PayPal actions from the entries sidebar. |
| 17 | 20 | remove_action( 'frm_show_entry_sidebar', 'FrmPaymentsController::sidebar_list' ); |
| 18 | - add_action( 'frm_entry_shared_sidebar_middle', self::class . '::show_sidebar_list' ); | |
| 21 | + add_action( 'frm_entry_shared_sidebar_middle', __CLASS__ . '::show_sidebar_list' ); | |
| 19 | 22 | } |
| 20 | 23 | |
| 21 | 24 | /** |
| 22 | 25 | * Show the payment details in the entry sidebar. |
| @@ -21,15 +24,13 @@ | ||
| 21 | 24 | /** |
| 22 | 25 | * Show the payment details in the entry sidebar. |
| 23 | 26 | * |
| 24 | 27 | * @param stdClass $entry |
| 25 | - * | |
| 26 | 28 | * @return void |
| 27 | 29 | */ |
| 28 | 30 | public static function show_sidebar_list( $entry ) { |
| 29 | 31 | $frm_payment = new FrmTransLitePayment(); |
| 30 | 32 | $payments = $frm_payment->get_all_for_entry( $entry->id ); |
| 31 | - | |
| 32 | 33 | if ( ! $payments ) { |
| 33 | 34 | return; |
| 34 | 35 | } |
| 35 | 36 | |