Last active
May 19, 2022 20:20
-
-
Save reandimo/3bdb5202766a6b4cf3cbd55eaa0acca1 to your computer and use it in GitHub Desktop.
Use regular price instead of sale price for calculating subscriptions discounts - All Products for WooCommerce Subscriptions
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 | |
/** | |
* Plugin Name: All Products for WooCommerce Subscriptions - Use regular price instead of sale price for calculating subscriptions discounts | |
* Plugin URI: https://woocommerce.com/products/all-products-for-woocommerce-subscriptions/ | |
* Description: Use this snippet to hide cart item subscription options for free products. | |
* Version: 1.0 | |
* Author: Renan Diaz | |
* Author URI: https://nativo.team/ | |
* Developer: Renan Diaz | |
*/ | |
add_filter( 'wcsatt_discount_from_regular', 'theme_wcsatt_discount_from_regular_callback', 999999999999999999 ); | |
function theme_wcsatt_discount_from_regular_callback($return_value){ | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment