Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Modify WooCommerce "shipping_address_2" to be custom address number field
add_filter('pr_shipping_dhl_label_args', 'custom_shipping_address_no', 10, 2);
function custom_shipping_address_no($args, $order_id) {
$args['shipping_address']['address_2'] = get_post_meta($order_id, 'my_custom_address_no', true); // Set to your custom address number field, most likely a order meta data
return $args;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment