snave07

payment.php

Oct 13th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  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 ( ! is_ajax() ) {
  21. do_action( 'woocommerce_review_order_before_payment' );
  22. }
  23. ?>
  24. <div id="payment" class="woocommerce-checkout-payment">
  25. <?php if ( 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 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
  34. }
  35. ?>
  36. </ul>
  37. <?php endif; ?>
  38. <div class="form-row place-order">
  39. <noscript>
  40. <?php
  41. /* translators: $1 and $2 opening and closing emphasis tags respectively */
  42. 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>' );
  43. ?>
  44. <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>
  45. </noscript>
  46.  
  47. <?php wc_get_template( 'checkout/terms.php' ); ?>
  48.  
  49. <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
  50.  
  51.  
  52. <div class="checkout-navigation-buttons clearfix">
  53. <?php
  54. thegem_button(array(
  55. 'tag' => 'button',
  56. 'text' => esc_html__( 'Previous step', 'thegem' ),
  57. 'style' => 'outline',
  58. 'size' => 'medium',
  59. 'extra_class' => 'checkout-prev-step',
  60. 'attributes' => array(
  61. 'value' => esc_attr__( 'Previous step', 'thegem' ),
  62. 'type' => 'button',
  63. )
  64. ), true);
  65. ?>
  66. <?php
  67. thegem_button(array(
  68. 'tag' => 'button',
  69. 'text' => esc_attr( $order_button_text ),
  70. 'style' => 'flat',
  71. 'size' => 'medium',
  72. 'extra_class' => 'checkout-place-order',
  73. 'attributes' => array(
  74. 'id' => 'place_order',
  75. 'name' => 'woocommerce_checkout_place_order',
  76. 'value' => esc_attr( $order_button_text ),
  77. 'type' => 'submit',
  78. 'data-value' => esc_attr( $order_button_text )
  79. )
  80. ), true);
  81. ?>
  82. </div>
  83.  
  84. <?php do_action( 'woocommerce_review_order_after_submit' ); ?>
  85.  
  86. <?php wp_nonce_field( 'woocommerce-process_checkout', 'woocommerce-process-checkout-nonce' ); ?>
  87. </div>
  88. </div>
  89. <?php
  90. if ( ! is_ajax() ) {
  91. do_action( 'woocommerce_review_order_after_payment' );
  92. }
Advertisement
Add Comment
Please, Sign In to add comment