| @@ -1,44 +1,44 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Template for displaying single method payment in checkout form. | |
| 4 | - * | |
| 5 | - * This template can be overridden by copying it to yourtheme/learnpress/checkout/payment-method.php. | |
| 6 | - * | |
| 7 | - * @author ThimPress | |
| 8 | - * @package Learnpress/Templates | |
| 9 | - * @version 4.0.2 | |
| 10 | - */ | |
| 11 | - | |
| 12 | -defined( 'ABSPATH' ) || exit(); | |
| 13 | - | |
| 14 | -/** | |
| 15 | - * @var LP_Gateway_Abstract $gateway | |
| 16 | - */ | |
| 17 | -if ( ! isset( $gateway ) ) { | |
| 18 | - return; | |
| 19 | -} | |
| 20 | - | |
| 21 | -$icon = $gateway->get_icon(); | |
| 22 | -?> | |
| 23 | - | |
| 24 | -<li id="learn-press-payment-method-<?php echo esc_attr( $gateway->id ); ?>" | |
| 25 | - class="lp-payment-method lp-payment-method-<?php echo esc_attr( $gateway->id ); ?><?php echo esc_html( $gateway->is_selected ? ' selected' : '' ); ?>"> | |
| 26 | - <label for="payment_method_<?php echo esc_attr( $gateway->id ); ?>"> | |
| 27 | - <input type="radio" class="gateway-input" name="payment_method" | |
| 28 | - id="payment_method_<?php echo esc_attr( $gateway->id ); ?>" | |
| 29 | - value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->is_selected, true ); ?> | |
| 30 | - data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>"/> | |
| 31 | - <?php echo wp_kses_post( ! empty( $icon ) ? $icon : $gateway->get_title() ); ?> | |
| 32 | - </label> | |
| 33 | - | |
| 34 | - <?php | |
| 35 | - $payment_form = $gateway->get_payment_form(); | |
| 36 | - $style = $gateway->is_selected ? 'display: block' : 'display: none'; | |
| 37 | - if ( ! empty( $payment_form ) ) : | |
| 38 | - ?> | |
| 39 | - <div class="payment-method-form payment_method_<?php echo esc_attr( $gateway->id ); ?>" | |
| 40 | - style="<?php echo esc_attr( $style ); ?>"> | |
| 41 | - <?php echo $payment_form; ?> | |
| 42 | - </div> | |
| 43 | - <?php endif; ?> | |
| 44 | -</li> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Template for displaying single method payment in checkout form. | |
| 4 | + * | |
| 5 | + * This template can be overridden by copying it to yourtheme/learnpress/checkout/payment-method.php. | |
| 6 | + * | |
| 7 | + * @author ThimPress | |
| 8 | + * @package Learnpress/Templates | |
| 9 | + * @version 4.0.2 | |
| 10 | + */ | |
| 11 | + | |
| 12 | +defined( 'ABSPATH' ) || exit(); | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * @var LP_Gateway_Abstract $gateway | |
| 16 | + */ | |
| 17 | +if ( ! isset( $gateway ) ) { | |
| 18 | + return; | |
| 19 | +} | |
| 20 | + | |
| 21 | +$icon = $gateway->get_icon(); | |
| 22 | +?> | |
| 23 | + | |
| 24 | +<li id="learn-press-payment-method-<?php echo esc_attr( $gateway->id ); ?>" | |
| 25 | + class="lp-payment-method lp-payment-method-<?php echo esc_attr( $gateway->id ); ?><?php echo esc_html( $gateway->is_selected ? ' selected' : '' ); ?>"> | |
| 26 | + <label for="payment_method_<?php echo esc_attr( $gateway->id ); ?>"> | |
| 27 | + <input type="radio" class="gateway-input" name="payment_method" | |
| 28 | + id="payment_method_<?php echo esc_attr( $gateway->id ); ?>" | |
| 29 | + value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->is_selected, true ); ?> | |
| 30 | + data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>"/> | |
| 31 | + <?php echo wp_kses_post( ! empty( $icon ) ? $icon : $gateway->get_title() ); ?> | |
| 32 | + </label> | |
| 33 | + | |
| 34 | + <?php | |
| 35 | + $payment_form = $gateway->get_payment_form(); | |
| 36 | + $style = $gateway->is_selected ? 'display: block' : 'display: none'; | |
| 37 | + if ( ! empty( $payment_form ) ) : | |
| 38 | + ?> | |
| 39 | + <div class="payment-method-form payment_method_<?php echo esc_attr( $gateway->id ); ?>" | |
| 40 | + style="<?php echo esc_attr( $style ); ?>"> | |
| 41 | + <?php echo $payment_form; ?> | |
| 42 | + </div> | |
| 43 | + <?php endif; ?> | |
| 44 | +</li> | |