mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
https://stackoverflow.com/questions/62893614/move-coupon-form-before-subtotal-in-woocommerce-checkout/62894898
13 lines
467 B
Text
13 lines
467 B
Text
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>';
|
|
}
|