Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Balakrishnan-flycart/4a5c5eea643ffde3880543e6e83985ce to your computer and use it in GitHub Desktop.
Save Balakrishnan-flycart/4a5c5eea643ffde3880543e6e83985ce to your computer and use it in GitHub Desktop.
Woo Discount Rules v2 - Get Price HTML Manually
if ( class_exists('\Wdr\App\Controllers\ManageDiscount')) {
if (is_a($product, 'WC_Product')) {
$manage_discount = new \Wdr\App\Controllers\ManageDiscount();
$price_html = "<div class='price'></div>";
$product_qty = 1;
$price_html = $manage_discount->getPriceHtml($price_html, $product, $product_qty, true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment