Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review product type change logic #814

Open
kaushikasomaiya opened this issue Mar 13, 2025 · 0 comments
Open

Review product type change logic #814

kaushikasomaiya opened this issue Mar 13, 2025 · 0 comments
Labels
type: bug The issue is a confirmed bug. woocommerce-subscriptions-core

Comments

@kaushikasomaiya
Copy link

kaushikasomaiya commented Mar 13, 2025

In 9494579-zen we noted Shipstation was sending line item from subscription renewal (treating it non-virtual) when the merchant claimed all of their variations are virtual.

Investigation revealed the at some point in time the product was a simple virtual subscription which was then switched to a variable subscription. In WC Core - editing a variable product or variable subscription always sets the virtual status of the parent to "no". This explains why the product ID grabbed from line items was treated as non virtual

But the question is why was the user allowed to switch product type from simple to variable subscription.

It seems like there might be a JS issue on merchant's site which is stopping subscriptions plugin from disabling options in the product type dropdown.

We seem to have logic for preventing type switch in the background regardless the dropdown status - but we might need to enhance that.

  1. Create a simple subscription product
  2. Buy it
  3. Edit the product and you'd see "The product type can not be changed because.." message in the type dropdown
  4. Pretend that something on your site keeps dropdown options enabled - Edit HTML and remove disabled attribute from Variable subscription option
  5. Change to Variable Subscription and start adding attributes etc, and variations
  6. Click update and you'd be allowed to switch the product type.
@kaushikasomaiya kaushikasomaiya added the type: bug The issue is a confirmed bug. label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The issue is a confirmed bug. woocommerce-subscriptions-core
Projects
None yet
Development

No branches or pull requests

2 participants