Support » Plugin: DHL for WooCommerce » Hide Mail Notification Checkbox

  • Hey there, is it possible to hide the mail notification checkbox and text if switching to on-site pickup?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Shadi Manna

    (@shadim)

    In version 2.1.0 there is a WordPress filter called “pr_shipping_dhl_email_notification_position” that controls the position of the checkbox. If you return “null” when pickup is selected, then the checkbox should not display.

    Thread Starter Benny

    (@fragbenny)

    Hey there, first of all thank you very much for the new filter. I’ve tried to accomplish this but failed. Any idea how to write such a function you mentioned?

    This is my trial:

    add_filter (‘pr_shipping_dhl_email_notification_position’, ‘my_shipping_notification_position’);

    function my_shipping_notification_position() {
    $chosen_methods = WC()->session->get( ‘chosen_shipping_methods’ );
    $chosen_shipping = $chosen_methods[0];

    if ($chosen_shipping == “local_pickup:2”){
    return null;
    }
    }

    Plugin Author Shadi Manna

    (@shadim)

    We might need to create a new hook for what you require, the current one only changes the position of where it displays.

    What you need is dependent on the selection of a shipping method and this is not possible currently.

    Thread Starter Benny

    (@fragbenny)

    Ah i see. Maybe you can create such a hook for it. I can imagine that im not the only one who needs this.

    Thanks for the support!

    Plugin Author Shadi Manna

    (@shadim)

    We will look into this and get back to you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide Mail Notification Checkbox’ is closed to new replies.