/**
  * Add any applicable pre-order fees when calculating totals
  *
  * @since 1.0
  */
 public function maybe_add_pre_order_fee()
 {
     global $woocommerce;
     // only add pre-order fees if the cart contains a pre-order
     if (!$this->cart_contains_pre_order()) {
         return;
     }
     // make sure the pre-order fee hasn't already been added
     if ($this->cart_contains_pre_order_fee()) {
         return;
     }
     $product = self::get_pre_order_product();
     // get pre-order amount
     $amount = WC_Pre_Orders_Product::get_pre_order_fee($product);
     if ($amount <= 0) {
         return;
     }
     $fee = apply_filters('wc_pre_orders_fee', array('label' => __('Pre-Order Fee', WC_Pre_Orders::TEXT_DOMAIN), 'amount' => $amount, 'tax_status' => WC_Pre_Orders_Product::get_pre_order_fee_tax_status($product)));
     // add fee
     $woocommerce->cart->add_fee($fee['label'], $fee['amount'], $fee['tax_status']);
 }