Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function order_weight($weight = null, $co_id = null, $items = null) {
- //do something with the weight here
- //for example:...
- $weight = 0;
- foreach ($items as $item) {
- $weight += $item -> product -> weight;
- }
- return $weight;
- }
- add_filter('checkout_order_weight', 'order_weight', 10, 3);
Add Comment
Please, Sign In to add comment