Skip to content

Instantly share code, notes, and snippets.

@shadimanna
Created November 15, 2019 08:47
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 shadimanna/24f4828d533a98aafae0734b1a291cfd to your computer and use it in GitHub Desktop.
Save shadimanna/24f4828d533a98aafae0734b1a291cfd to your computer and use it in GitHub Desktop.
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