Jump to content
kevinsaptel

Need some help to Create a WooCommerce discount Cart

Recommended Posts

kevinsaptel

I have almost completed the initial steps to create a WooCommerce discount cart following several tutorials and forums including 

https://stackoverflow.com/questions/27165576/how-to-add-discount-to-cart-total

https://www.cloudways.com/blog/woocommerce-discount-cart/

 

I want to know that this code gives me a total price with discount as well ? The code is giving me error and i don't know where i am wrong. Need help to rectify this code.

 

  if ( $cw_discount > 0 ) {
        echo '<tr class="cart-discount">
    <th>. __( 'Secure', `woocommerce`) .'</th>
    <td data-title=" '. __( 'Secure', 'woocommerce' ) .' ">'
            . wc_price( $cw_discount + $woocommerce->cart->discount_cart ) .'</td>
    </tr>';

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×