includes/shipping/local-delivery/class-wc-shipping-local-delivery.php 1 location
|
@@ 66-70 (lines=5) @@
|
| 63 |
|
$shipping_total = $package['contents_cost'] * ( $this->fee / 100 ); |
| 64 |
|
break; |
| 65 |
|
case 'product' : |
| 66 |
|
foreach ( $package['contents'] as $item_id => $values ) { |
| 67 |
|
if ( $values['quantity'] > 0 && $values['data']->needs_shipping() ) { |
| 68 |
|
$shipping_total += $this->fee * $values['quantity']; |
| 69 |
|
} |
| 70 |
|
} |
| 71 |
|
break; |
| 72 |
|
} |
| 73 |
|
|
includes/shipping/flat-rate/class-wc-shipping-flat-rate.php 1 location
|
@@ 206-210 (lines=5) @@
|
| 203 |
|
*/ |
| 204 |
|
public function get_package_item_qty( $package ) { |
| 205 |
|
$total_quantity = 0; |
| 206 |
|
foreach ( $package['contents'] as $item_id => $values ) { |
| 207 |
|
if ( $values['quantity'] > 0 && $values['data']->needs_shipping() ) { |
| 208 |
|
$total_quantity += $values['quantity']; |
| 209 |
|
} |
| 210 |
|
} |
| 211 |
|
return $total_quantity; |
| 212 |
|
} |
| 213 |
|
|