WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] remove coupons on checkout page (WC 2.0) (6 posts)

  1. japanizer
    Member
    Posted 1 year ago #

    how to remove coupons option on checkout page but leave it on cart page?
    before there was option to change this in settings of WC, but now there is only one check box

    http://wordpress.org/extend/plugins/woocommerce/

  2. japanizer
    Member
    Posted 1 year ago #

    I did it myself,
    woocommerce/templates/checkout/form-coupon.php

    just add this line

    if ( $woocommerce->checkout)
    	return;
  3. gradgraph
    Member
    Posted 1 year ago #

    This section and others are being generated from the woocommerce-hooks.php file in the plugin directory. Another way to remove this functionality from the checkout page would be to de-register the action hook being used to generate the content.

    You would simply need to place the following code at the top of the form-checkout.php page (just under global $woocommerce to remove the coupon form call:

    remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 );

    That should do the trick!

  4. rob01
    Member
    Posted 1 year ago #

    The above post removes the login form, not the coupon form - to do this, insert the following code in your theme's functions.php file:

    remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 );

  5. Chirag Vora
    Member
    Posted 6 months ago #

    Thank you @rob01

  6. LordLiverpool
    Member
    Posted 5 months ago #

    There is an easy way to turn off Coupons from within WooCommerce

    Dashboard
    > WooCommerce
    > Settings
    > General
    > Coupons
    > Enable the use of Coupons (uncheck this)

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.