• Hi there,

    Is there a fix for radio buttons to work with the Woocommerce Variable Subscriptions plugin yet? I know this has been discussed before but I couldn’t get my head around it. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author mantish

    (@mantish)

    Not yet, sorry

    Hi there,

    I’ve managed to get the following hacked together, but when adding to cart it only ever adds the first variation.

    Subscription variations

    Excluding a good chunk of the template that’s printed out by…

    foreach ( $options as $option ) {
                                            
                                            if (sanitize_title($name) == 'print-options') {
                                                $variation_type = '<span class="price">'. apply_filters( 'woocommerce_variation_option_name', $option ) .'</span> -';
                                            } else {
                                                $variation_type = null;
                                            }
    
    										echo '<label itemprop="price" class="vari_price" for="attribute_'. sanitize_title($name).'-'. esc_attr( $post->ID ) .'-'.$tick.'">
                                            <input type="radio" value="' . apply_filters( 'woocommerce_variation_option_name', $option ) . '" ' . checked( sanitize_title( $checked_value ), sanitize_title( $option ), false ) . ' id="attribute_'. sanitize_title($name).'-'. esc_attr( $post->ID ) .'-'.$tick.'" name="attribute_'. sanitize_title($name).'">'. $variation_type .' ' . $price{$tick} . '</label>';
    
                                            $tick++;
    									}

    I guess the issue lays with add-to-cart-variation.js, as it’s essentially working only the wrong variation is being added to the cart. Do you have any idea on what code is responsible for adding what variation to the cart??

    Failing that, is this bug a priority bug or something that’s not likely to be looked at for a while as I really need a solution?

    Thanks for all your hard work!

    I really need this!!!!!!!!!!!!

    Plugin Author mantish

    (@mantish)

    Hi Ojay,
    I’d like to come with a solution for this one, but there’s no budget at the moment :/

    Pretty much all the work is done by the add-to-cart-variation.js file, so I guess a solution would need to be implemented in that file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is there a fix for Variable Subscriptions yet?’ is closed to new replies.