Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_filter('pr_shipping_dhl_label_args', 'modify_item_price', 10, 2);
function modify_item_price($args, $order_id) {
if( isset( $args['items'] ) ) {
foreach ($args['items'] as $item_key => $item_value) {
if( $item_value['item_value'] == 0 ) {
$args['items'][ $item_key ]['item_value'] = 0.01;
}
}
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment