cart-errors.php
2 years ago
form-billing.php
2 years ago
form-checkout.php
1 year ago
form-coupon.php
1 year ago
form-login.php
11 months ago
form-pay.php
2 years ago
form-shipping.php
2 years ago
form-verify-email.php
1 year ago
order-receipt.php
2 years ago
order-received.php
2 years ago
payment-method.php
2 years ago
payment.php
1 year ago
review-order.php
2 years ago
terms.php
4 years ago
thankyou.php
2 years ago
payment.php
64 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://woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates |
| 15 | * @version 9.8.0 |
| 16 | */ |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | if ( ! wp_doing_ajax() ) { |
| 21 | do_action( 'woocommerce_review_order_before_payment' ); |
| 22 | } |
| 23 | ?> |
| 24 | <div id="payment" class="woocommerce-checkout-payment"> |
| 25 | <?php if ( WC()->cart && WC()->cart->needs_payment() ) : ?> |
| 26 | <ul class="wc_payment_methods payment_methods methods"> |
| 27 | <?php |
| 28 | if ( ! empty( $available_gateways ) ) { |
| 29 | foreach ( $available_gateways as $gateway ) { |
| 30 | wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) ); |
| 31 | } |
| 32 | } else { |
| 33 | echo '<li>'; |
| 34 | wc_print_notice( 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. 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' ) ), 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment |
| 35 | echo '</li>'; |
| 36 | } |
| 37 | ?> |
| 38 | </ul> |
| 39 | <?php endif; ?> |
| 40 | <div class="form-row place-order"> |
| 41 | <noscript> |
| 42 | <?php |
| 43 | /* translators: $1 and $2 opening and closing emphasis tags respectively */ |
| 44 | 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>' ); |
| 45 | ?> |
| 46 | <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' ); ?>"><?php esc_html_e( 'Update totals', 'woocommerce' ); ?></button> |
| 47 | </noscript> |
| 48 | |
| 49 | <?php wc_get_template( 'checkout/terms.php' ); ?> |
| 50 | |
| 51 | <?php do_action( 'woocommerce_review_order_before_submit' ); ?> |
| 52 | |
| 53 | <?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 ?> |
| 54 | |
| 55 | <?php do_action( 'woocommerce_review_order_after_submit' ); ?> |
| 56 | |
| 57 | <?php wp_nonce_field( 'woocommerce-process_checkout', 'woocommerce-process-checkout-nonce' ); ?> |
| 58 | </div> |
| 59 | </div> |
| 60 | <?php |
| 61 | if ( ! wp_doing_ajax() ) { |
| 62 | do_action( 'woocommerce_review_order_after_payment' ); |
| 63 | } |
| 64 |