Hi @j0321, the theme you are using, or its additional styling, may affect such display of this message.
What theme are you using on your site?
Notice can be customized with flexible_shipping_free_shipping_notice_text filter
. We describe how it works in the documentation: https://octolize.com/docs/article/915-flexible-shipping-advanced-options-customization. Adding non-breaking space
before and after the amount left for free shipping should help.
The following PHP code could be placed in the functions.php file of your child theme:
add_filter( 'flexible_shipping_free_shipping_notice_text', 'wpdesk_flexible_shipping_free_shipping_notice_text', 10, 2 ); function wpdesk_flexible_shipping_free_shipping_notice_text( $notice_text, $amount ) { return sprintf( 'You only need %1$s more to get free shipping! %2$sContinue shopping%3$s', wc_price( $amount ), '<a target="_blank" href="' . esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ) . '">', '</a>' ); }
It is best to implement modifications to the code in a test environment to verify that the changes will work as you expect. To test it properly, please remove the products from the cart and clear the browser cache.
Best regards,
Tomek
Hi Tomek,
Thanks for the resources, gave it a go but had no luck with the codes.
I have attached the screenshots.
The theme used is Astra – Astra Child Theme.
https://ibb.co/sgR2Vqj
https://ibb.co/XXJDhfs
Thanks.
Hi @j0321, thanks for the details.
Can you change to a dedicated WooCommerce theme – Storefront and verify if you are seeing the same error on it as well?
Best regards,
Tomek
Using Storefront the error doesn’t happen.
Hi @j0321, thank you for verifying this.
If you would like us to help with the compatibility of the theme you are using, we will need to take a closer look at the issue.
Due to the restrictions of this forum, some confidential data cannot be shared here, please contact us directly at https://octolize.com/support/, we’ll try to help there.
Best regards,
Tomek
As we haven’t got any replies, I’m marking this topic as resolved for now.
If you have any additional questions, please let us know.
Best regards,
Tomek