Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save xlplugins/6c14796ba822488f00bca97b2325c906 to your computer and use it in GitHub Desktop.

Select an option

Save xlplugins/6c14796ba822488f00bca97b2325c906 to your computer and use it in GitHub Desktop.
Show strike-through price for subscription product in fkcart
/**
* Snippet: Show strike-through price and "Save X%" for subscription products in Cart for WooCommerce
* Add to theme functions.php or Code Snippets.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_filter( 'fkcart_disable_strike_price_product_type', function ( $excluded_types ) {
return array_diff( $excluded_types, [ 'subscription', 'variable-subscription', 'subscription_variation' ] );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment