Last active
December 16, 2016 03:10
-
-
Save mikeyarce/8a07f87c2590bf2bc78aa03727e56adb to your computer and use it in GitHub Desktop.
Remove Sale price from products when using Dynamic Pricing
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
| <?php | |
| // Remove the <?php tag above if your file already includes it | |
| // Remove Sale price from products when using Dynamic Pricing | |
| function marce_remove_sale_dynamic_pricing() { | |
| $WC_Dynamic_Pricing = WC_Dynamic_Pricing::instance(); | |
| remove_filter( 'woocommerce_product_is_on_sale', array( $WC_Dynamic_Pricing, 'on_get_product_is_on_sale'), 10, 2 ); | |
| } | |
| add_action( 'plugins_loaded', 'marce_remove_sale_dynamic_pricing'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This did not work for me. What I did was: