includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php 1 location
|
@@ 209-217 (lines=9) @@
|
| 206 |
|
* calculate_shipping function. |
| 207 |
|
* @return array |
| 208 |
|
*/ |
| 209 |
|
public function calculate_shipping( $package = array() ) { |
| 210 |
|
$args = array( |
| 211 |
|
'id' => $this->id, |
| 212 |
|
'label' => $this->title, |
| 213 |
|
'cost' => 0, |
| 214 |
|
'taxes' => false |
| 215 |
|
); |
| 216 |
|
$this->add_rate( $args ); |
| 217 |
|
} |
| 218 |
|
} |
| 219 |
|
|
includes/shipping/free-shipping/class-wc-shipping-free-shipping.php 1 location
|
@@ 157-164 (lines=8) @@
|
| 154 |
|
* Called to calculate shipping rates for this method. Rates can be added using the add_rate() method. |
| 155 |
|
* @uses WC_Shipping_Method::add_rate() |
| 156 |
|
*/ |
| 157 |
|
public function calculate_shipping( $package = array() ) { |
| 158 |
|
$this->add_rate( array( |
| 159 |
|
'id' => $this->id . $this->instance_id, |
| 160 |
|
'label' => $this->title, |
| 161 |
|
'cost' => 0, |
| 162 |
|
'taxes' => false |
| 163 |
|
) ); |
| 164 |
|
} |
| 165 |
|
} |
| 166 |
|
|