daily pastebin goal
68%
SHARE
TWEET

WooCommerce - Hide coupon field on checkout

lorro Feb 2nd, 2017 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // WooCommerce hide coupon field on checkout
  3.   // code goes in functions.php for your child theme
  4.   add_filter( ‘woocommerce_coupons_enabled’, ‘hide_coupon_field_on_checkout’ );
  5.   function hide_coupon_field_on_checkout( $enabled ) {
  6.     if ( is_checkout() ) {
  7.       $enabled = false;
  8.     }
  9.     return $enabled;
  10.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top