Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reandimo/3bdb5202766a6b4cf3cbd55eaa0acca1 to your computer and use it in GitHub Desktop.
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
<?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