PluginProbe ʕ •ᴥ•ʔ
WooCommerce Square / 5.4.2
WooCommerce Square v5.4.2
5.4.2 5.4.1 5.4.0 trunk 1.0.25 1.0.26 1.0.27 1.0.28 1.0.29 1.0.30 1.0.31 1.0.32 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.38 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.7.0 2.8.0 2.9.0 2.9.1 3.0.0 3.0.1 3.0.2 3.0.3 3.1.0 3.2.0 3.3.0 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.7.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 4.0.0 4.1.0 4.2.0 4.2.1 4.2.2 4.2.3 4.3.0 4.3.1 4.3.2 4.4.0 4.4.1 4.4.2 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 4.9.8 4.9.9 5.0.0 5.0.1 5.1.0 5.1.1 5.1.2 5.2.0 5.3.0 5.3.1 5.3.2 5.3.3
woocommerce-square / includes / Gateway / Templates / payment.php
woocommerce-square / includes / Gateway / Templates Last commit date
payment.php 1 year ago
payment.php
77 lines
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 7.0.1
16 */
17
18 use WooCommerce\Square\Plugin;
19
20 defined( 'ABSPATH' ) || exit;
21
22 if ( ! wp_doing_ajax() ) {
23 // PHPCS ignored as it is a Woo core hook.
24 do_action( 'woocommerce_review_order_before_payment' ); // phpcs:ignore
25 }
26 ?>
27
28 <div id="payment" class="woocommerce-checkout-payment">
29 <?php if ( WC()->cart->needs_payment() && ( $is_error || ! $has_balance ) ) : ?>
30 <ul class="wc_payment_methods payment_methods methods">
31 <?php
32 if ( ! empty( $available_gateways ) ) {
33 $plugin_gateways = wc_square()->get_gateway_ids();
34 foreach ( $available_gateways as $gateway ) {
35 if ( ! $has_balance && ! in_array( $gateway->id, $plugin_gateways, true ) ) {
36 continue;
37 }
38 wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
39 }
40 } else {
41 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-square' ) : esc_html__( 'Please fill in your details above to see available payment methods.', 'woocommerce-square' ) ) . '</li>'; // @codingStandardsIgnoreLine
42 }
43 ?>
44 </ul>
45 <?php endif; ?>
46 <div class="form-row place-order">
47 <noscript>
48 <?php
49 /* translators: $1 and $2 opening and closing emphasis tags respectively */
50 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-square' ), '<em>', '</em>' );
51 ?>
52 <br/><button type="submit" class="button alt<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'woocommerce-square' ); ?>"><?php esc_html_e( 'Update totals', 'woocommerce-square' ); ?></button>
53 </noscript>
54
55 <?php wc_get_template( 'checkout/terms.php' ); ?>
56
57 <?php
58 // PHPCS ignored as it is a Woo core hook.
59 do_action( 'woocommerce_review_order_before_submit' ); // phpcs:ignore
60 ?>
61
62 <?php echo apply_filters( 'woocommerce_order_button_html', '<button type="submit" class="button alt' . esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ) . '" 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 ?>
63
64 <?php
65 // PHPCS ignored as it is a Woo core hook.
66 do_action( 'woocommerce_review_order_after_submit' ); // phpcs:ignore
67 ?>
68
69 <?php wp_nonce_field( 'woocommerce-process_checkout', 'woocommerce-process-checkout-nonce' ); ?>
70 </div>
71 </div>
72 <?php
73 if ( ! wp_doing_ajax() ) {
74 // PHPCS ignored as it is a Woo core hook.
75 do_action( 'woocommerce_review_order_after_payment' ); // phpcs:ignore
76 }
77