Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add_extra_discount( $cart ) {
- $discount = $cart->subtotal * 0.3;
- $cart->add_fee( __( 'Extra Discount', 'twentyseventeen' ) , -$discount );
- }
- add_action( 'woocommerce_cart_calculate_fees', 'add_extra_discount' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement