public function calculate_shipping( $package ) {
global $woocommerce;
$customer = new WC_Cart();
$meePrice = $woocommerce->cart->subtotal;
$price = 500;
if($meePrice >= 5000) {
$price = 250;
}
$rate = array(
'id' => $this->id,
'label' => $this->title,
'cost' => $price,
'calc_tax' => 'per_item'
);
// Register the rate
$this->add_rate( $rate );
}