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
form-coupon.php
52 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://woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates |
| 15 | * @version 9.8.0 |
| 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 |
| 27 | /** |
| 28 | * Filter checkout coupon message. |
| 29 | * |
| 30 | * @param string $message coupon message. |
| 31 | * @return string Filtered message. |
| 32 | * |
| 33 | * @since 1.0.0 |
| 34 | */ |
| 35 | wc_print_notice( apply_filters( 'woocommerce_checkout_coupon_message', esc_html__( 'Have a coupon?', 'woocommerce' ) . ' <a href="#" role="button" aria-label="' . esc_attr__( 'Enter your coupon code', 'woocommerce' ) . '" aria-controls="woocommerce-checkout-form-coupon" aria-expanded="false" class="showcoupon">' . esc_html__( 'Click here to enter your code', 'woocommerce' ) . '</a>' ), 'notice' ); |
| 36 | ?> |
| 37 | </div> |
| 38 | |
| 39 | <form class="checkout_coupon woocommerce-form-coupon" method="post" style="display:none" id="woocommerce-checkout-form-coupon"> |
| 40 | |
| 41 | <p class="form-row form-row-first"> |
| 42 | <label for="coupon_code" class="screen-reader-text"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> |
| 43 | <input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" /> |
| 44 | </p> |
| 45 | |
| 46 | <p class="form-row form-row-last"> |
| 47 | <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> |
| 48 | </p> |
| 49 | |
| 50 | <div class="clear"></div> |
| 51 | </form> |
| 52 |