Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Balakrishnan-flycart/59d4c9190cbbeb105d097e6facbf00f8 to your computer and use it in GitHub Desktop.
Save Balakrishnan-flycart/59d4c9190cbbeb105d097e6facbf00f8 to your computer and use it in GitHub Desktop.
Woo Discount Rules v2 - Get cart page discounts
if ( class_exists('\Wdr\App\Controllers\ManageDiscount')) {
$manage_discount = new \Wdr\App\Controllers\ManageDiscount();
$manage_discount->calculateCartPageDiscounts();
$discount_details = \Wdr\App\Controllers\ManageDiscount::$calculated_cart_item_discount;
// $discount_details -> details of discounts array
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment