Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sarancartrabbit/4bef9439c0b404b507d156890947185b to your computer and use it in GitHub Desktop.
Save sarancartrabbit/4bef9439c0b404b507d156890947185b to your computer and use it in GitHub Desktop.
Omnibus : To show the omnibus price based on discount apllied product only
add_filter('wdr_omnibus_directive_separate_get_price_html_message', function ($message, $min_price, $lowest_price_date) {
global $product;
if (is_object($product)){
$sale_price = $product->get_price();
$discount = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $sale_price, $product, 1, 0, 'discounted_price', true, false);
if($discount === false) {
return '';
}
}
return $message;
}, 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment