Classic Checkout is missing recurring shipping options.
Closed this issue · 6 comments
Describe the bug
The classic cart and checkout do not provide controls for users to select different shipping methods for the initial and recurring shipments. I believe this may be regression with some history to it, and a fix may be blocked.
To Reproduce
- Set up some sub products and at least 2 shipping shipping methods.
- Set up additional cart/checkout pages for shortcode checkout.
- Create a cart that qualifies for multiple shipping methods.
- Go through default checkout with the blocks and observe recurring shipment options at cart/checkout
- Go through shortcode checkout and observe missing recurring shipment options
Expected behavior
Initial and Recurring shipments to be separated and provide shipping options for each.
Actual behavior
No recurring shipment options. I presume it defaults to the first available.
Product impact
- Does this issue affect WooCommerce Subscriptions? yes/no/tbc, add issue ref
- Does this issue affect WooCommerce Payments? yes/no/tbc, add issue ref
Additional context
This issue seems to have some history to it and it may be a regression. I consider the impact to be high considering all sites using shortcode checkout are affected, but I suspect this may not be an easy fix or could be blocked given the history. As Block Checkout is unaffected by this, at least users have a potential workaround.
These issues and fixes all seem to be related:
- https://github.com/woocommerce/woocommerce-subscriptions/issues/4335 was a high-impact issue involving incorrect recurring totals. In the comments and screenshots, we see there are no recurring options. I noted in a comment it seems there were technically inputs for recurring shipping options, but they were being hidden from the user.
- We fixed the recurring total issue in #467 but this did not restore the inputs for recurring shipping methods.
- In an older issue, #409, we see recurring shipping options in the first screenshot. So, I suspect this may be a regression, and the expected behavior is for recurring shipping options to be present.
Discussion in woosupport: p1724432266964989-slack-C3NCP7ZJ6
Hey @maxlaf, thanks for opening this issue!
While I understand there are some inconsistencies in how recurring shipping methods are displayed between the block checkout and the shortcode checkout, this behavior appears to be working as expected. However, if I’m missing a bug, please let me know!
From your screenshot, it looks like the store has set a Free Shipping requirement, such as a minimum spend of $50 for Free Shipping to apply:
Because this requirement is met during the initial purchase, Free Shipping is available. However, since the subscription is only $20/month, it doesn't qualify for Free Shipping. As a result, the only available shipping option for the subscription is Flat Rate shipping, which is why you don’t see radio buttons for multiple shipping options in the cart/checkout shortcode.
Although the block checkout looks different, it’s essentially showing the same behavior.
Also worth mentioning. Our wcs_cart_totals_shipping_html()
function handles displaying recurring shipping options on the shortcode checkout and cart pages. There are two scenarios where recurring shipping options are not shown as radio buttons:
- Only one shipping option is available.
- The shipping rates for the initial purchase match the rates for the subscription.
In the second case, if the shipping rate for the initial purchase is updated, the same shipping method will automatically be applied to the subscription.
This is another difference between how we display/use shipping options on the block checkout versus shortcode checkout and could potentially be improved.
@EjayhanFernandes thanks for confirming!
On the shortcode checkout, if you switch the initial cart to use Flat rate two shipping method, does the recurring shipping method also update to flat rate two with the correct totals?
If so, this is the expected behaviour I briefly touched on at the bottom of my previous message:
Also worth mentioning. Our wcs_cart_totals_shipping_html() function handles displaying recurring shipping options on the shortcode checkout and cart pages. There are two scenarios where recurring shipping options are not shown as radio buttons:
- Only one shipping option is available.
- The shipping rates for the initial purchase match the rates for the subscription.
In the second case, if the shipping rate for the initial purchase is updated, the same shipping method will automatically be applied to the subscription.
On the shortcode checkout, if the shipping rates available on the initial purchase also match the available shipping rates for the subscription, we don't show two radio options and instead, updating the shipping methods for the initial cart will automatically update the recurring carts shipping option.
Here's a recording of what the expected behaviour for the shortcode checkout is:
Screen.Capture.on.2024-09-25.at.12-32-36.mp4
On the shortcode checkout, if you switch the initial cart to use Flat rate two shipping method, does the recurring shipping method also update to flat rate two with the correct totals?
On the shortcode checkout, if you switch the initial cart to use the "Flat rate two" shipping method, the recurring shipping method also updates to "Flat rate two" with the correct totals, as seen here:
Tyiuu3.mov
On the shortcode checkout, if the shipping rates available on the initial purchase also match the available shipping rates for the subscription, we don't show two radio options and instead, updating the shipping methods for the initial cart will automatically update the recurring carts shipping option.
Given that this is the expected behavior for the cart/checkout shortcodes, are you saying there is no bug or issue here? And that adding such a feature (separate options for initial and recurring shipping) to the classic cart/checkout shortcode might not be necessary? If so, since the cart/checkout block includes a feature to select different shipping methods for initial and recurring shipments (as shown below), merchants who want that feature would need to switch to the cart/checkout block.
sYuZA3.mp4
Thanks @EjayhanFernandes!
Given that this is the expected behavior for the cart/checkout shortcodes, are you saying there is no bug or issue here?
Yeah, so there's not necessarily a bug here, but I wanted to make sure I wasn't missing a serious issue where shipping methods weren't showing on the shortcode checkout when they're expected.
If so, since the cart/checkout block includes a feature to select different shipping methods for initial and recurring shipments (as shown below), merchants who want that feature would need to switch to the cart/checkout block.
We do have a filter that this merchant could use:
add_filter( 'wcs_cart_totals_shipping_html_price_only', '__return_false' );
This will force the recurring shipping methods to be displayed on the shortcode checkout whenever there's multiple shipping options.
I'm going to close this issue for now since there's no bug per se.
If we get more requests or confusing related to this in the future, I think we should consider implementing this as an optional feature in Subscription settings and not hidden behind custom code.
Thanks for reporting this!