• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Stripe Plugins

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • Terms & Conditions
    • My Downloads
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
  • Contact Us
  • Show Search
Hide Search
You are here: Home / Replies /

Reply To: Money off coupon for full amount still asks for card information

· ·

Home › Forums › Stripe Payments Plugin › Money off coupon for full amount still asks for card information › Reply To: Money off coupon for full amount still asks for card information

August 3, 2020 at 8:48 am #3143

madideas
Participant

FWIW, and I obviously don’t know my way around the code, I modified the Load_coupon method for the Item class to check the coupon value and if >= product price then transform it into a 100% off, which is then handled properly by the rest of the plugin code.

if(intval($this->coupon[‘discount’])>=$this->get_price() &&
$this->coupon[‘discount_type’]===’fixed’){
// transform this to a 100%
$this->coupon[‘discount’]=100;
$this->coupon[‘discount_type’]=’perc’;
}

Primary Sidebar

Search

Featured Addons and Extensions

  • Subscription Payments Addon
  • Additional Custom Fields
  • Secure Downloads Addon
  • Apple Pay and Google Pay

Addon Bundle

Stripe Payments Addon Bundle

Support Links

  • Support Forum
  • Forum Registration

Copyright © 2021 | Stripe Plugins | A member of the Tips and Tricks HQ family.