diff --git a/includes/commerce_coupon.checkout_pane.inc b/includes/commerce_coupon.checkout_pane.inc index 6d61104..4c624f7 100644 --- a/includes/commerce_coupon.checkout_pane.inc +++ b/includes/commerce_coupon.checkout_pane.inc @@ -149,6 +149,12 @@ function commerce_coupon_add_coupon_callback($form, &$form_state) { $coupon_pane = $form['commerce_coupon']; $commands[] = ajax_command_replace('#commerce-checkout-coupon-ajax-wrapper', drupal_render($coupon_pane)); + // Re-render the payment details pane if we are on the payment page to accommodate free orders. + if (!empty($form['commerce_payment'])) { + $payment_pane = $form['commerce_payment']; + $commands[] = ajax_command_replace('.commerce_payment', drupal_render($payment_pane)); + } + // Allow other modules to alter the commands. drupal_alter('commerce_coupon_add_coupon_ajax', $commands, $form, $form_state);