WooCommerce subscriptions "invalid recurring shipping method"

Viewed 3328

On my website, I use the plugin WooCommerce subscription, where I have a sign-up fee ($10 ish), and then 7 days free trial. Then we charge the customer around $55 for the next product. I use a plugin called Smartsend, which is a logistic plugin for a Danish carrier.

When I order a product from my webshop, I get an error:

"invalid recurring shipping method"

even though everything looks to be set up perfectly in the system.

With the $55 order I can print out the label to my printer, but with the $10 sign-up fee I cannot because I get this notification.

Hope you can help.

1 Answers
$recurring_shipping_package_key = WC_Subscriptions_Cart::get_recurring_shipping_package_key( $recurring_cart_key, $package_index );

if ( ! isset( $package['rates'][ $shipping_methods[ $recurring_shipping_package_key ] ] ) ) {

        if ( ! $added_invalid_notice ) {
                wc_add_notice( __( 'Invalid recurring shipping method.', 'woocommerce-subscriptions' ), 'error' );
                $added_invalid_notice = true;
        }

        $shipping_methods[ $recurring_shipping_package_key ] = '';
}

Above is the section of the code from where this message is coming with WooCommerce Subscription.

woocommerce-subscriptions/includes/class-wc-subscriptions-cart.php Line 1168

This is error is coming because of some reason the shipping rate for the specific shipping method recurring_shipping_package_key is not set.

Related