Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, it is possible to relocate the coupon form on the WooCommerce checkout page by using hooks or filters. You can add the following code snippet to your functions.php file to move the coupon form to a section before the payment area:

add_action('woocommerce_before_checkout_form', 'move_coupon_form');

function move_coupon_form() {
    remove_action('woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10);
    add_action('woocommerce_checkout_before_customer_details', 'woocommerce_checkout_coupon_form', 10);
}

This code will remove the coupon form from its default location and add it before the customer details section. You can customize the location by changing the target hook for the add_action function.