woocommerce coupon in cart page like the one in checkout

I’m trying to copy the coupon form from the checkout page to the cart page.
In the checkout page is the coupon field displayed as a hidden element, that it’s shown after a click on a url.

I’ve managed to move field with,

add_action( 'woocommerce_before_cart_contents', 'woocommerce_checkout_coupon_form' );

but I’ve noticed that the javascript is missing and maybe some css. Should I just copy them in the cart page, or is there a better solution?

Thanks!

Read more here: woocommerce coupon in cart page like the one in checkout

Leave a Reply

Your email address will not be published. Required fields are marked *