Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Allow switching to identical product
* Plugin Name: WooCommerce Subscriptions - Allow Same Product Switch
* Plugin URI:
* Description: Allow switching to same product for WooCommerce Subscriptions
* Version: 1.0
* Author: Nick Green
* Author URI:
function allow_identical_switches( $is_identical_product, $product_id, $quantity, $variation_id, $subscription, $item ) {
return false;
add_filter( 'woocommerce_subscriptions_switch_is_identical_product', 'allow_identical_switches', 100, 6 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment