Created
February 8, 2019 12:25
-
-
Save AshlinRejo/c4557c9517f94ef7db4e9ccc2b88b963 to your computer and use it in GitHub Desktop.
Woo Discount: Compatible for WC Role Based Price By Varun Sridharan
This file contains 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
function wc_rbp_product_get_price_for_woo_discount_compatible($wcrbp_price, $product, $role_based_pricing_object){ | |
$changes = $product->get_changes(); | |
if(!empty($changes)){ | |
if(isset($changes['price'])){ | |
$wcrbp_price = $changes['price']; | |
} | |
} | |
return $wcrbp_price; | |
} | |
add_filter('wc_rbp_product_get_price', 'wc_rbp_product_get_price_for_woo_discount_compatible', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment