Method Description is displayed twice.
-
Hello,
In Checkout Blocks, the text entered in Method Description is displayed twice.
Version 6.8.0 WordPress7.0 Woocommerce 10.8.1
-
Hello @mamekichi,
Thank you for reporting this issue. Unfortunately, I’m unable to reproduce it on my end, please see: https://picpick.net/i/803bcd4931, https://picpick.net/i/847edc9e5b
Could you please test it in an isolated environment – with only our plugin and WooCommerce active -and switch to the default WooCommerce theme, Storefront? This will help us determine whether the issue is caused by your current theme.
If the problem persists with Storefront, please re-enable your plugins one by one and check whether any of them is the cause.
Looking forward to your findings!
Best regards,
Marta BorówkaHello @martapaw,
Thanks for your reply. I tried enabling only Woocomerce and Flexible shipping. The theme is Storefront. The result was the same.The result was also the same when I changed the theme to Twenty Twenty-Four or Twenty Twenty-FiveView post on imgur.com
View post on imgur.com
View post on imgur.com
I investigated the conditions under which the problem occurs.
With WC 10.8.1 and 6.5.0 or 6.5.8 combinations, duplicate display does not occur.
With 6.6.0, 6.7.0, or 6.8.0 combinations, duplicate display occurs.
I have not tested other combinations.
I had AI investigate.
After investigating, I found that the shipping rate returned by the Store API already contains:
"description": "ABCDEF"WooCommerce Blocks displays this description natively, while Flexible Shipping also renders the same description through its own JavaScript in
assets/js/shipping-method-block-checkout.js.Relevant code:
const description = getRateDescription( rate ); if ( description ) { if ( existingDescription ) { ... } else if ( insertionAnchor ) { insertionAnchor.insertAdjacentElement( 'afterend', createDescriptionNode( description ) ); } }As a result, both of the following elements are rendered:
WooCommerce Blocks native output:
<div class="read-more-content"> <div>ABCDEF</div> </div>Flexible Shipping custom output:
<div class="shipping-method-description flexible-shipping-method-description-block"> ABCDEF </div>This causes the Method Description to appear twice whenever the Flexible Shipping method is selected.
Since the Store API already provides the description and WooCommerce Blocks displays it natively, the additional description rendering in
shipping-method-block-checkout.jsappears to be redundant in current WooCommerce Blocks versions.Hi @mamekichi,
Thank you for your investigation!
We’ve recreated your issue, and we’ll be working on that. I will let you know when the new version is live.
Best regards,
Marta BorówkaHello @mamekichi,
Thank you for your patience.
We’ve released a new version of the plugin that resolves this issue. Please update to the latest version and let us know if you still experience the problem.
Best regards,
Marta BorówkaHello @martapaw,
The issue has been resolved. Thank you very much!Thank you for the confirmation @mamekichi!
You must be logged in to reply to this topic.