Skip to content

Instantly share code, notes, and snippets.

@dennisnissle
Created January 15, 2024 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennisnissle/5ac9f8a1c1461693099dc16f394af9e1 to your computer and use it in GitHub Desktop.
Save dennisnissle/5ac9f8a1c1461693099dc16f394af9e1 to your computer and use it in GitHub Desktop.
Adjust default weight for DHL labels (in case no content weight has been set)
<?php
// Sets a default weight of 1 kg for DHL (dhl)
add_filter( 'woocommerce_gzd_shipping_provider_dhl_label_default_shipment_weight', function() {
return 1;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment