• Resolved mister pc

    (@m1st3rpc)


    Hi WooCommercials ??

    I have customized the labels of the shipping options via the woocommerce_cart_shipping_method_full_label filter.
    This one seems to function properly, I see it thru the modifications appearing on the checkout page, except that…
    The ajax request /?wc-ajax=update_order_review is called just after full loading, it temporarly overlays the entry blocks in grey and then refreshes my shipping options by replacing them with the initial design of WooCommerce… without taking into account the previously defined filter !

    I’ve searched a solution thru forums but didn’t succeed in. The problem looks surprising, for it directly concerns the use of the hook !
    The solution must be simple, since it is not a particularly exotic request either: -S

    Any idea welcome !
    Thanks for reading ??
    Arnaud BelO.`

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Jonayed (woo-hc)

    (@jonayedhosen)

    Hey @m1st3rpc ,

    The ajax request?/?wc-ajax=update_order_review?is called just after full loading, it temporarly overlays the entry blocks in grey and then refreshes my shipping options by replacing them with the initial design of WooCommerce… without taking into account the previously defined filter !

    It sounds like your custom shipping option labels display correctly on the initial page load but revert to the default WooCommerce output after an AJAX refresh during the checkout process. This issue often arises when customizations aren’t applied during AJAX calls.

    To ensure your custom shipping labels persist after the AJAX /wc-ajax=update_order_review request in WooCommerce, you can utilize the woocommerce_package_rates filter.

    This filter allows you to modify shipping rates, including their labels, before they are displayed to the user. By hooking into this filter, your custom labels will be applied each time the shipping rates are calculated, including during AJAX updates.

    I hope this helps!

    Thread Starter mister pc

    (@m1st3rpc)

    Thanks @jonayedhosen !!!

    You perfectly understand the issue I meet.
    It’s quite disturbing to read that “this issue often arises”, as I would better believe it happens everytime or never ??

    So I will look at the filter solution you brought to me. I already had a look on it before, but couldn’t imagine it would do the right stuff to correct this wrong display.

    I come back in a few hours to make reporting of the solution ??

    Thanks a lot !
    Arnaud BeLO.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello mister pc,

    Thank you for your reply.

    I understand you have customized the labels of the shipping options via the woocommerce_cart_shipping_method_full_label filter and now you are facing issues with how they appear.

    Please note that <span style=”box-sizing: border-box; margin: 0px; padding: 0px;”>our support policy does not cover the custom code</span>.
    Therefore, I recommend you consult a professional developer who can assist you with the code.
    You can find a good developer at Codeable.io or WooExperts.

    You may also post your question on Woo Community Slack for answers from the community.

    I hope this helps.

    Best regards.

    Thread Starter mister pc

    (@m1st3rpc)

    Welcome back,
    Here’s my report :

    I didn’t manage to apply the woocommerce_shipping_rates filter, as it produces nothing at all. It looks like it’s not called at all: var_dump( $rates ) brings nothing on the front-end.
    So I customized the cart/cart-shipping.php template, which I had already to change anyway for other reasons. Maybe I had also changed some stuff which made the filter not applied (?). And now everything’s fine ??

    I know this is not the cleanest method for I always prefer to deal with filters/actions, but I don’t have so much time to find the right woocommerce filter (!) and battle with it…

    Thanks to all for your responses !
    Arnaud BeLO.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.