remove coupon

is it possible to remove the "have a coupon" entirely from the checkout?.

  • Timothy Bowers

    Hi dfstorm

    The coupon code is located in the file:

    /wp-content/plugins/marketpress/marketpress-includes/template-functions.php

    The code you are looking for is:

    //coupon line TODO - figure out how to apply them on global checkout
    	  $coupon_code = $mp->get_coupon_code();
        if ( $coupon = $mp->coupon_value($coupon_code, $total) ) {
          $content .=  '<tr>';
          $content .=  '  <td class="mp_cart_subtotal_lbl" colspan="2">' . __('Subtotal:', 'mp') . '</td>';
          $content .=  '  <td class="mp_cart_col_subtotal">' . $mp->format_currency('', $total) . '</td>';
          $content .=  '  <td>&nbsp;</td>';
          $content .=  '</tr>';
          $content .=  '<tr>';
          $content .=  '  <td class="mp_cart_subtotal_lbl" colspan="2">' . __('Discount:', 'mp') . '</td>';
          $content .=  '  <td class="mp_cart_col_discount">' . $coupon['discount'] . '</td>';
          $content .=  '  <td class="mp_cart_remove_coupon"><a href="?remove_coupon=1">' . __('Remove Coupon &raquo;', 'mp') . '</a></td>';
          $content .=  '</tr>';
          $total = $coupon['new_total'];
        } else {
          $content .=  '<tr>';
          $content .=  '  <td class="mp_cart_subtotal_lbl" colspan="4">
         <a id="coupon-link" class="alignright" href="#coupon-code">' . __('Have a coupon code?', 'mp') . '</a>
                <div id="coupon-code" class="alignright" style="display: none;">
                  <label for="coupon_code">' . __('Enter your code:', 'mp') . '</label>
                  <input type="text" name="coupon_code" id="coupon_code" />
                  <input type="submit" name="update_cart_submit" value="' . __('Apply &raquo;', 'mp') . '" />
                </div>
            </td>';
          $content .=  '</tr>';
    
        }

    Removing that would remove the coupon option on the checkout page.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.