Last active
November 18, 2019 07:40
-
-
Save AshlinRejo/b57ce8d44d51c8d391f5f740430f3f71 to your computer and use it in GitHub Desktop.
Woo Discount Rules: Get discount for a product
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* To get discount amount for the specific products | |
* If there is no discount it return null value. | |
*/ | |
global $flycart_woo_discount_rules; | |
if(!empty($flycart_woo_discount_rules)){ | |
$discounted_price = $flycart_woo_discount_rules->pricingRules->getDiscountPriceOfProduct($product); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment