| 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 3.4.4 |
| 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 |
<input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" /> |
| 35 |
</p> |
| 36 |
|
| 37 |
<p class="form-row form-row-last"> |
| 38 |
<button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button> |
| 39 |
</p> |
| 40 |
|
| 41 |
<div class="clear"></div> |
| 42 |
</form> |
| 43 |
|