Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_filter('pr_shipping_dhl_label_args', 'modify_order_id_to_number', 10, 2);
function modify_order_id_to_number($args, $order_id) {
$order = wc_get_order( $order_id );
$args['dhl_settings']['dhl_label_ref'] = $order->get_order_number();
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment