how to change coupn position on cart page

Solutions on MaxInterview for how to change coupn position on cart page by the best coders in the world

showing results for - "how to change coupn position on cart page"
Mateo
20 Mar 2017
1add_action( 'woocommerce_proceed_to_checkout', 'display_coupon_form_below_proceed_checkout', 25 );
2 
3function display_coupon_form_below_proceed_checkout() {
4   ?> 
5      <form class="woocommerce-coupon-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
6         <?php if ( wc_coupons_enabled() ) { ?>
7            <div class="coupon under-proceed">
8               <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" style="width: 100%" /> 
9               <button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>" style="width: 100%"><?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?></button>
10            </div>
11         <?php } ?>
12      </form>
13   <?php
14}
15
16the use this in your CSS
17
18div.coupon:not(.under-proceed) { 
19display: none !important; 
20}