• Resolved dev

    (@devksec)


    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

    (@coolcoders)

    Hi @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.