• Resolved njwp

    (@njwp)


    just some feedback or wanting to know if there is a way to do this

    you have:
    $titulo = apply_filters( 'apg_shipping_label', $metodo->label );

    Which allows us to use the filter to change the shipping label BUT at that point the label doesn’t include the colon :
    So if I return an empty string in the filter then the colon is still output

    I would like to make the shipping label completely blank in certain instances. If you include the colon in the value sent to app_shipping_label filter then I would be able to do this.
    In any case is there another way to have a blank label?

    Thanks for the great plugin

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter njwp

    (@njwp)

    oh – and further to this when you used the Woocomerce filter, you used the max priority, so I can’t override it there:
    add_filter( 'woocommerce_cart_shipping_method_full_label', 'apg_shipping_icono', PHP_INT_MAX, 2 );

    Plugin Author Emilio Calvo

    (@emiliocalvo)

    Hi @mjwp,

    Indeed, the filter only allows customizing the shipping method title, and there is another filter to be able to show or hide the text Estimated delivery time:apg_shipping_delivery, but there isn’t any filter to customize the full label or to add/remove the colon. Since we think it’s a good idea, we will add this in the next update:

    $nueva_etiqueta = apply_filters( 'apg_shipping_final_label', $nueva_etiqueta, $titulo, $precio, $imagen, $texto_entrega, $metodo );

    That way you’ll be able to completely rewrite the label as you like.

    In the filter you mentioned, we’re also going to add the $metodo object so you can manipulate the titles depending on its value.

    Thank you very much for the contribution.

    Best regards.

    • This reply was modified 9 months, 2 weeks ago by Emilio Calvo.
    Plugin Author Emilio Calvo

    (@emiliocalvo)

    We’ll review it since it might no longer be necessary to use PHP_INT_MAX as the priority. At the time, we had to use it to avoid issues.

    Thanks for the heads-up.

    Best regards.

    Thread Starter njwp

    (@njwp)

    excellent! Thanks so much for your great support

    Plugin Author Emilio Calvo

    (@emiliocalvo)

    The new version has already been published with the new filter added.

    Best regards.

    Thread Starter njwp

    (@njwp)

    Thanks so much. I’ve used your new filter and it works perfectly

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘hide shipping label’ is closed to new replies.