PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.12.5
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.12.5
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / woocommerce / templates / checkout / payment.php

payment.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.12.5, at woocommerce/templates/checkout/payment.php

91 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Checkout Payment Section
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/payment.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 3.5.3
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 if ( ! wp_doing_ajax() ) {
21 do_action( 'woocommerce_review_order_before_payment' );
22 }
23
24 global $post;
25
26 if ( ! isset( $order_button_text ) || '' === $order_button_text ) {
27 $order_button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) );
28 }
29
30 $checkout_id = '';
31 if( wp_doing_ajax() ){
32 $checkout_id = \WPFunnels\Wpfnl_functions::get_checkout_id_from_post($_POST);
33 }
34
35 $checkout_id = !$checkout_id && isset($post->ID) ? $post->ID : $checkout_id;
36 $is_pre_purchase = false;
37 if( $checkout_id ){
38 $order_bumps = get_post_meta($checkout_id, 'order-bump-settings', true);
39 if ( is_array( $order_bumps ) ) {
40 foreach ($order_bumps as $item) {
41 if ( isset( $item['position'] ) && $item['position'] === 'popup' && ! empty( $item['prePurchaseUpsell'] ) && $item['prePurchaseUpsell'] === 'yes' ) {
42 $is_pre_purchase = true;
43 break;
44 }
45 }
46 }
47 }
48 ?>
49 <div id="payment" class="woocommerce-checkout-payment wpfnl-checkout-payment">
50 <?php if ( WC()->cart->needs_payment() ) : ?>
51 <ul class="wc_payment_methods payment_methods methods">
52 <?php
53 if ( ! empty( $available_gateways ) ) {
54 foreach ( $available_gateways as $gateway ) {
55 wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
56 }
57 } else {
58 echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_billing_country() ? esc_html__( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) : esc_html__( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ) . '</li>'; // @codingStandardsIgnoreLine
59 }
60 ?>
61 </ul>
62 <?php endif; ?>
63 <div class="form-row place-order">
64 <noscript>
65 <?php
66 /* translators: $1 and $2 opening and closing emphasis tags respectively */
67 printf( esc_html__( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the %1$sUpdate Totals%2$s button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ), '<em>', '</em>' );
68 ?>
69 <br/><button type="submit" class="button alt" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'woocommerce' ); ?>"><?php esc_html_e( 'Update totals', 'woocommerce' ); ?></button>
70 </noscript>
71
72 <?php wc_get_template( 'checkout/terms.php' ); ?>
73
74 <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
75 <?php if( $is_pre_purchase) { ?>
76 <div class="wpfnl-place-order-add-overlay wpfnl-place-order">
77 <?php } ?>
78 <?php echo apply_filters( 'woocommerce_order_button_html', '<button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' ); // @codingStandardsIgnoreLine ?>
79 <?php if( $is_pre_purchase) { ?>
80 </div>
81 <?php } ?>
82 <?php do_action( 'woocommerce_review_order_after_submit' ); ?>
83
84 <?php wp_nonce_field( 'woocommerce-process_checkout', 'woocommerce-process-checkout-nonce' ); ?>
85 </div>
86 </div>
87 <?php
88 if ( ! wp_doing_ajax() ) {
89 do_action( 'woocommerce_review_order_after_payment' );
90 }
91