Home Forums WoodMart support forum Test Server Support Reply To: Test Server Support

#259496

Olivia
Participant

here is my code in function.php, but how to have it directly without having to click on do you have cod, like having a text field to enter coupon code then the button

remove_action( ‘woocommerce_before_checkout_form’, ‘woocommerce_checkout_coupon_form’, 10 );

add_action( ‘woocommerce_review_order_after_cart_contents’, ‘woocommerce_checkout_coupon_form_custom’ );
function woocommerce_checkout_coupon_form_custom() {
echo ‘<tr class=”coupon-form”><td colspan=”2″>’;

wc_get_template(
‘checkout/form-coupon.php’,
array(
‘checkout’ => WC()->checkout(),
)
);
echo ‘</tr></td>’;
}

I added that in styles.css but not working
.woocommerce-checkout .checkout_coupon.woocommerce-form-coupon {
display: block !important;
}