{"id":7232727,"date":"2016-04-02T15:29:49","date_gmt":"2016-04-02T15:29:49","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/max-amount\/"},"modified":"2016-08-31T15:22:27","modified_gmt":"2016-08-31T15:22:27","slug":"max-amount","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/max-amount\/","title":{"rendered":"Max amount"},"content":{"rendered":"<p>I need a script to set the max discount amount of coupon.   I am using this as a buy 3 get 1 free coupon.   I want it to have a max value discount. <\/p>\n<p>Coupon is set up for 25% off cart total if 4 items are added.  Works great. But I want to limit the max total discount if customer adds different products. <\/p>\n<p>Example<br \/>\nCustomer &#8220;A&#8221; Adds 4 items to the cart all same price<br \/>\nitem 1 $6<br \/>\nitem 2 $6<br \/>\nitem 3 $6<br \/>\nitem 4 $6<\/p>\n<p>Coupon gives discount of $6 PERFECT<\/p>\n<p>Example<br \/>\nCustomer &#8220;B&#8221; Adds 4 items to cart different prices<br \/>\nitem 1 $6<br \/>\nitem 2 $7<br \/>\nitem 3 $18<br \/>\nitem 4 $16<\/p>\n<p>Coupon gives discount of $11.75  NOT GOOD for a BUY 1 Get 1 FREE<br \/>\nIf I could set coupon to a max value of say $7 it would be fine.<\/p>\n<p>https:\/\/wordpress.org\/plugins\/woocommerce-auto-added-coupons\/<\/p>\n","protected":false},"template":"","class_list":["post-7232727","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7232727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7232727\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7232727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}