Title: PHP errors wc_coupons_enabled
Last modified: February 4, 2021

---

# PHP errors wc_coupons_enabled

 *  Resolved [dev](https://wordpress.org/support/users/devksec/)
 * (@devksec)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-wc_coupons_enabled/)
 * Hello,
 * We’ve trying to resolve some PHP errors, specifically:
 * PHP message: The WC_Legacy_Cart::coupons_enabled function is deprecated since
   version 2.5.0
 * `[Thu Feb 04 20:30:45.884429 2021] [proxy_fcgi:error] [pid 2056:tid 139929531037440][
   client IP.ADDRESS:60144] AH01071: Got error 'PHP message: The WC_Legacy_Cart::
   coupons_enabled function is deprecated since version 2.5.0. Replace with wc_coupons_enabled.
   PHP message: The WC_Legacy_Cart::coupons_enabled function is deprecated since
   version 2.5.0. Replace with wc_coupons_enabled.', referer:`
 * This appears to be caused by the following code:
    /custom-checkout-layouts-for-
   woocommerce/WooCommerce/cart/cart.php
 *     ```
       ?php if ( wc_coupons_enabled() ) { ?>
       						<div class="coupon">
       							<label for="coupon_code"><?php esc_html_e( 'Coupon:', 'cclw' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'cclw' ); ?>" /> <button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'cclw' ); ?>"><?php esc_attr_e( 'Apply coupon', 'cclw' ); ?></button>
       							<?php do_action( 'woocommerce_cart_coupon' ); ?>
       						</div>
       					<?php } ?>
       ```
   
 * Is there a way to confirm and resolve this ?
 * Many Thanks

Viewing 1 replies (of 1 total)

 *  Plugin Author [Rupinder Kaur](https://wordpress.org/support/users/coolcoders/)
 * (@coolcoders)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-wc_coupons_enabled/#post-14011220)
 * Hi [@devksec](https://wordpress.org/support/users/devksec/) ,
    As you are facing
   issues with cart folder i would recommend you to rename this particular file/
   folder. It won’t affect your checkout page.
 * Thanks
    Rupinder

Viewing 1 replies (of 1 total)

The topic ‘PHP errors wc_coupons_enabled’ is closed to new replies.

 * ![](https://ps.w.org/custom-checkout-layouts-for-woocommerce/assets/icon-256x256.
   jpg?rev=2079391)
 * [One page checkout and layouts for woocommerce](https://wordpress.org/plugins/custom-checkout-layouts-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-checkout-layouts-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-checkout-layouts-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-checkout-layouts-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-checkout-layouts-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Rupinder Kaur](https://wordpress.org/support/users/coolcoders/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-wc_coupons_enabled/#post-14011220)
 * Status: resolved