Closed opr closed 1 month ago
@mattallan thanks a lot for your review and suggestions.
I just pushed up a small commit to make sure the string is translatable
🤦🏼 Yeah that's my bad, thanks for catching that.
should we include the CSS in subscriptions as well instead of relying on Woo
Great idea, actually, ~I'll take care of that.~ On second thought, how do you feel about the fact that in versions <9.0 "$0.00" will be shown in the main order summary, but FREE would be shown in WC Subscriptions? Seems like a lot of work to solve for something so minor (We'd need to port this version checking function over to WC Subscriptions, unless similar exists already?) but would love to hear your thoughts on ensuring the consistency between core and WC Subscriptions.
how do you feel about the fact that in versions <9.0 "$0.00" will be shown in the main order summary, but FREE would be shown in WC Subscriptions?
I feel like someone will notice the inconsistency so I;v just pushed up https://github.com/Automattic/woocommerce-subscriptions-core/pull/623/commits/9124f653af5f9eb666c53756f27b4aa03ec4752b which uses isWcVersion()
to only show the "free" label when the store has 9.0+
@opr let me know if there will be problems with this. Subscriptions requires a minimum of WC 7.9 and I've confirmed there's no issues on that version.
Thanks @mattallan this is great! I appreciate you using isWcVersion
, I didn't realise that was exported!
I think this is ready to go then. Should we hold off on merging this until https://github.com/woocommerce/woocommerce/pull/47553 is merged? Just in case that doesn't make it into the 9.0 release for any reason?
Great, thanks @opr! I see your PR into WooCommerce core was merged and tagged for the 9.0 milestone so we'll get this merged here as well.
PS. I added a small clarification in the changelog entry to include the WC version.
Description
This PR will show the text 'FREE' in bold and capital letters in the recurring totals area of the order summary on the Cart and Checkout blocks.
How to test this PR
Have at least two shipping options set up, one should be free shipping.
Go to WooCommerce -> Settings -> Shipping -> Shipping Settings and ensure
Enable the shipping calculator on the cart page
is checked.Add a subscription item to your cart and go to the Cart block.
In the order summary, find the recurring totals section and the recurring packages section.
In the recurring packages section select the free shipping rate. The shipping price in the recurring totals area should now say 'FREE'.
Change the recurring package's shipping method to flat rate and ensure the correct price shows in the recurring totals section. It should not say 'FREE'.
Go to the Checkout block and do the same, ensure the correct value shows for free and paid shipping.
Product impact