WooCommerce subscription gives the ability to upgrade or downgrade, to other subscription products if they are.
- Grouped Product
- Variable Subscription.
When using grouped subscription the single product page, uses the checkbox to show prices of all the subscriptions. This becomes very confusing since you can only select one product. I am trying to convert them to the radio button but I am unable to do so.
You can see the request for the idea raised at : https://ideas.woocommerce.com/forums/133476-woocommerce/suggestions/38542126-radio-buttons-instead-of-checkboxes-for-grouped-pr
What I have tried
@foreach ( $grouped_products as $grouped_product_child )
<input type="radio" id="@php echo $grouped_product_child->get_id() @endphp" name="grouped-product" value="@php echo $grouped_product_child->get_id() @endphp">
@endforeach
<input type="hidden" name="add-to-cart" value="@php echo esc_attr( $product->get_id() ); @endphp" />
@if($quantites_required)
<button type="submit">Subscribe Now</button>
@endif
I have deliberately left the logic which checks if the input option should be visible or not.
Every time I click on the subscribe Now menu, I get an error message asking me to Please choose a product to add to your cart…