cart-errors.php
5 years ago
form-billing.php
5 years ago
form-checkout.php
5 years ago
form-coupon.php
3 years ago
form-login.php
5 years ago
form-pay.php
2 years ago
form-shipping.php
5 years ago
form-verify-email.php
2 years ago
order-receipt.php
5 years ago
order-received.php
2 years ago
payment-method.php
5 years ago
payment.php
2 years ago
review-order.php
5 years ago
terms.php
4 years ago
thankyou.php
2 years ago
form-coupon.php
44 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Checkout coupon form |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-coupon.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 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine. |
| 21 | return; |
| 22 | } |
| 23 | |
| 24 | ?> |
| 25 | <div class="woocommerce-form-coupon-toggle"> |
| 26 | <?php wc_print_notice( apply_filters( 'woocommerce_checkout_coupon_message', esc_html__( 'Have a coupon?', 'woocommerce' ) . ' <a href="#" class="showcoupon">' . esc_html__( 'Click here to enter your code', 'woocommerce' ) . '</a>' ), 'notice' ); ?> |
| 27 | </div> |
| 28 | |
| 29 | <form class="checkout_coupon woocommerce-form-coupon" method="post" style="display:none"> |
| 30 | |
| 31 | <p><?php esc_html_e( 'If you have a coupon code, please apply it below.', 'woocommerce' ); ?></p> |
| 32 | |
| 33 | <p class="form-row form-row-first"> |
| 34 | <label for="coupon_code" class="screen-reader-text"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> |
| 35 | <input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" /> |
| 36 | </p> |
| 37 | |
| 38 | <p class="form-row form-row-last"> |
| 39 | <button type="submit" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button> |
| 40 | </p> |
| 41 | |
| 42 | <div class="clear"></div> |
| 43 | </form> |
| 44 |