Created
November 15, 2019 08:47
-
-
Save shadimanna/24f4828d533a98aafae0734b1a291cfd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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