Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. function add_extra_discount( $cart ) {
  2.  
  3. $discount = $cart->subtotal * 0.3;
  4.  
  5. $cart->add_fee( __( 'Extra Discount', 'twentyseventeen' ) , -$discount );
  6.  
  7. }
  8. add_action( 'woocommerce_cart_calculate_fees', 'add_extra_discount' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement