Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function do_shipping($order_id = null) {
- global $wpdb, $wpcoDb, $wpcoShipmethod, $Item;
- if (empty($order_id)) {
- $order_id = $this -> current_order_id();
- }
- if ($this -> get_option('shippingcalc') == "Y") {
- $shipmethodsquery = "SELECT id FROM " . $wpdb -> prefix . $wpcoShipmethod -> table . "";
- if ($shipmethods = $wpdb -> get_results($shipmethodsquery)) {
- if (!empty($order_id)) {
- $wpcoDb -> model = $Item -> model;
- if ($items = $wpcoDb -> find_all(array('order_id' => $order_id))) {
- foreach ($items as $item) {
- if (!empty($item -> product -> type)) {
- if ($item -> product -> type == "tangible") {
- return true;
- }
- }
- }
- }
- }
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment