Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/libresign/woocommerce-restrict-switch/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
WooCommerce restrict switch
Restrict switch to products that isn't upsell of a produdct
Configuring
WooCommerce Subscription
Go to WooCommerce subscription settings
At "Allow Switching", check "Between Subscription Variations" or "Between Grouped Subscriptions"
Click at "Save changes"
Product
Edit the product
Go to "Linked products"
Define the upsells products. Is the products that you want allow to switch to.
Check the box "restrict siwtch"