Created
November 14, 2018 12:56
-
-
Save AshlinRejo/2987d2fe3bb0983fc6dde6f4ab2473cd to your computer and use it in GitHub Desktop.
Woo Discount: To provide discount for individual product on Woocommerce bundled 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
if(!function_exists('woo_discount_rules_remove_event_woocommerce_before_calculate_totals_method')){ | |
function woo_discount_rules_remove_event_woocommerce_before_calculate_totals_method($remove_event){ | |
return true; | |
} | |
} | |
add_filter('woo_discount_rules_remove_event_woocommerce_before_calculate_totals', 'woo_discount_rules_remove_event_woocommerce_before_calculate_totals_method'); | |
if(!function_exists('woo_discount_rules_has_price_override_method')){ | |
function woo_discount_rules_has_price_override_method($hasPriceOverride, $product){ | |
return true; | |
} | |
} | |
add_filter('woo_discount_rules_has_price_override', 'woo_discount_rules_has_price_override_method', 10, 2); | |
if(!function_exists('woo_discount_rules_exclude_woocommerce_bundled_item_method')){ | |
function woo_discount_rules_exclude_woocommerce_bundled_item_method($exclude_bundled_item, $product){ | |
return false; | |
} | |
} | |
add_filter('woo_discount_rules_exclude_woocommerce_bundled_item', 'woo_discount_rules_exclude_woocommerce_bundled_item_method', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment