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;
}
}
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!
We will look into this and get back to you.